basis.data.AllocatorOps.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of basis-data_2.11 Show documentation
Show all versions of basis-data_2.11 Show documentation
A foundation library for Scala focussed on efficiency and clean design
The newest version!
// ____ ___
// / __ | ___ ____ /__/___ A library of building blocks
// / __ / __ |/ ___|/ / ___|
// / /_/ / /_/ /\__ \/ /\__ \ (c) 2012-2015 Chris Sachs
// |_____/\_____\____/__/\____/ http://basis.reify.it
package basis.data
import Predef.<:<
final class AllocatorOps[+Data](val __ : Allocator[Data]) extends AnyVal {
def store[T](value: T)(implicit T: Struct[T], isStorer: Data <:< Storer): Data = {
val data = __(T.size)
T.store(data, 0L, value)
data
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy