metaparse/doc/boxed_value.qbk
2015-07-19 09:53:35 +02:00

22 lines
681 B
Plaintext

[#boxed_value]
[section Boxed value]
A ['boxed value] is a type representing a constant value. It has a public static
`const` or `constexpr` member called `value`. The class represents that value as
a type, so it can be manipulated by [link metafunction template metafunction]s.
It has to be a [link metaprogramming_value template metaprogramming value].
For example the following `struct` represents the `true` value of type `bool`:
struct true_type
{
static constexpr bool value = true;
using type = true_type;
};
The `value` member is the wrapped value. `true_type::type` is an alias of
`true_type` which makes it a template metaprogramming value.
[endsect]