Templates for fundamental properties of types
The Boost type-traits library contains a set of very specific traits classes, each of which encapsulate a single trait from the C++ type system; for example, is a type a pointer or a reference type? Or does a type have a trivial constructor, or a const-qualifier?
The type-traits classes share a unified design: each class inherits from the type true_type if the type has the specified property and inherits from false_type otherwise.
The type-traits library also contains a set of classes that perform a specific transformation on a type; for example, they can remove a top-level const or volatile qualifier from a type. Each class that performs a transformation defines a single typedef-member type that is the result of the transformation.
The full documentation is available on boost.org.
Master | Develop | |
---|---|---|
Travis | ||
Appveyor |
Support, bugs and feature requests
Bugs and feature requests can be reported through the Gitub issue tracker (see open issues and closed issues).
You can submit your changes through a pull request.
There is no mailing-list specific to Boost TypeTraits, although you can use the general-purpose Boost mailing-list using the tag [type_traits].
Development
Clone the whole boost project, which includes the individual Boost projects as submodules (see boost+git doc):
git clone https://github.com/boostorg/boost
cd boost
git submodule update --init
The Boost TypeTraits Library is located in libs/type_traits/
.
Running tests
First, make sure you are in libs/type_traits/test
.
You can either run all the tests listed in Jamfile.v2
or run a single test:
../../../b2 <- run all tests
../../../b2 config_info <- single test
version | 1.77.0+1 |
---|---|
license | BSL-1.0Boost Software License 1.0 |
repository | https://pkg.cppget.org/1/legacy |
download | libboost-type-traits-1.77.0+1.tar.gz |
sha256 | 1e3caff9fd6ccc523c36b45ee02b290922df666971027a2a7aa1fdcd7084f758 |
project | boost |
---|---|
url | github.com/boostorg/type_traits |
doc-url | www.boost.org/doc/libs/1_77_0/libs/type_traits |
package-url | github.com/build2-packaging/boost |
boost-users@lists.boost.orgMailing list | |
package-email | packaging@build2.orgMailing list |
topics | C++Boost |
Depends (2)
libboost-config == 1.77.0 | |
libboost-static-assert == 1.77.0 |
Reviews
fail | 0 |
---|---|
pass | 1 |