]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/metaparse/doc/predicate.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / metaparse / doc / predicate.qbk
1 [#predicate]
2 [section Predicate]
3
4 A ['predicate] (or unary predicate) is a
5 [link metafunction_class template metafunction class] taking one argument and
6 returning a [link boxed_value boxed value] of type `bool`.
7
8 For example the following predicate checks if its argument is the boxed `char`
9 value `x`:
10
11 struct is_x
12 {
13 template <class C>
14 struct apply
15 {
16 static constexpr bool value = (C::value == 'x');
17 using type = apply;
18 };
19
20 using type = is_x;
21 };
22
23 [endsect]
24