Squashed 'third_party/boostorg/type_traits/' content from commit 059ed88
Change-Id: I222c604dfa1db194bf53bc6aa1152fb16e83ce06
git-subtree-dir: third_party/boostorg/type_traits
git-subtree-split: 059ed8839da3fecd1e8b62cdc11be006f6346b5e
diff --git a/doc/is_union.qbk b/doc/is_union.qbk
new file mode 100644
index 0000000..c21ca22
--- /dev/null
+++ b/doc/is_union.qbk
@@ -0,0 +1,48 @@
+[/
+ Copyright 2007 John Maddock.
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt).
+]
+
+[section:is_union is_union]
+ template <class T>
+ struct is_union : public __tof {};
+
+__inherit If T is a (possibly cv-qualified) union type then inherits from __true_type,
+otherwise inherits from __false_type. Currently requires some kind of compiler
+support, otherwise unions are identified as classes.
+
+__std_ref 3.9.2 and 9.5.
+
+__compat Without (some as yet unspecified) help from the
+compiler, we cannot distinguish between union and class types using only standard C++,
+as a result this type will never inherit from __true_type, unless the user explicitly
+specializes the template for their user-defined union types, or unless the compiler
+supplies some unspecified intrinsic that implements this functionality.
+Currently (June 2015) compilers more recent than Visual C++ 8, clang, GCC-4.3, Greenhills 6.0,
+Intel-11.0, and Codegear have the necessary compiler __intrinsics to ensure that this
+trait "just works". You may also test to see if the necessary __intrinsics are available
+by checking to see if the macro `BOOST_IS_UNION` is defined.
+
+
+__header ` #include <boost/type_traits/is_union.hpp>` or ` #include <boost/type_traits.hpp>`
+
+__examples
+
+Given `union my_union {};` then:
+
+[:`is_union<my_union>` inherits from `__true_type`.]
+
+[:`is_union<const my_union>::type` is the type `__true_type`.]
+
+[:`is_union<my_union>::value` is an integral constant
+expression that evaluates to /true/.]
+
+[:`is_union<my_union*>::value` is an integral constant
+expression that evaluates to /false/.]
+
+[:`is_union<T>::value_type` is the type `bool`.]
+
+[endsect]
+