]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/type_traits/doc/is_class.qbk
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / type_traits / doc / is_class.qbk
CommitLineData
7c673cae
FG
1[/
2 Copyright 2007 John Maddock.
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at
5 http://www.boost.org/LICENSE_1_0.txt).
6]
7
8[section:is_class is_class]
9 template <class T>
10 struct is_class : public __tof {};
11
12__inherit If T is a (possibly cv-qualified) class type (and not a union type) then inherits from __true_type,
13otherwise inherits from __false_type.
14
15__std_ref 3.9.2 and 9.2.
16
17__header ` #include <boost/type_traits/is_class.hpp>` or ` #include <boost/type_traits.hpp>`
18
19__compat This trait works correctly for almost all current compilers (as of June 2015), with just a minority
20of older compilers not correctly detecting all the corner cases. You can check the macro `BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION`
21which is defined to 1 when the class works correctly in all cases.
22
23__examples
24
25[:Given: `class MyClass;` then:]
26
27[:`is_class<MyClass>` inherits from `__true_type`.]
28
29[:`is_class<MyClass const>::type` is the type `__true_type`.]
30
31[:`is_class<MyClass>::value` is an integral constant
32expression that evaluates to /true/.]
33
34[:`is_class<MyClass&>::value` is an integral constant
35expression that evaluates to /false/.]
36
37[:`is_class<MyClass*>::value` is an integral constant
38expression that evaluates to /false/.]
39
40[:`is_class<T>::value_type` is the type `bool`.]
41
42[endsect]
43