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_assignable.qbk b/doc/is_assignable.qbk
new file mode 100644
index 0000000..c3f4078
--- /dev/null
+++ b/doc/is_assignable.qbk
@@ -0,0 +1,40 @@
+[/
+ Copyright 2015 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_assignable is_assignable]
+
+ template <class T, class U>
+ struct is_assignable : public __tof {};
+
+__inherit If `std::declval<T>() = std::declval<U>()` then inherits from __true_type,
+otherwise from __false_type. Type `T` must be a complete type.
+
+Note that this trait is somewhat tricky to use correctly: for example:
+
+ is_assignable<int, int>::value
+
+is `false` since `std::declval<int>()` is an ['xvalue] which can not be assigned to!
+
+If you're intention is to check for copy-assignment from some type U then use:
+
+ is_assignable<T&, const U&>::value
+
+If you're intention is to check for move-assignment then use:
+
+ is_assignable<T&, U&&>::value
+
+or simply:
+
+ is_assignable<T&, U>::value
+
+
+__compat Requires the C++11 features `decltype` and SFINAE-expressions for full support.
+
+__header ` #include <boost/type_traits/is_assignable.hpp>` or ` #include <boost/type_traits.hpp>`
+
+[endsect]
+