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/has_new_operator.qbk b/doc/has_new_operator.qbk
new file mode 100644
index 0000000..a40c34e
--- /dev/null
+++ b/doc/has_new_operator.qbk
@@ -0,0 +1,47 @@
+[/
+ Copyright 2009 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:has_new_operator has_new_operator]
+ template <class T>
+ struct has_new_operator : public __tof {};
+
+__inherit If T is a (possibly cv-qualified) type with an overloaded new-operator
+then inherits from __true_type, otherwise inherits from __false_type.
+
+[has_binary_operator_compat] Also known to be broken with the Borland/Codegear compilers.
+
+__std_ref 12.5.
+
+__header ` #include <boost/type_traits/has_new_operator.hpp>` or ` #include <boost/type_traits.hpp>`
+
+__examples
+
+Given:
+
+ class A { void* operator new(std::size_t); };
+ class B { void* operator new(std::size_t, const std::nothrow&); };
+ class C { void* operator new(std::size_t, void*); };
+ class D { void* operator new[](std::size_t); };
+ class E { void* operator new[](std::size_t, const std::nothrow&); };
+ class F { void* operator new[](std::size_t, void*); };
+
+Then:
+
+[:`has_new_operator<A>` inherits from `__true_type`.]
+
+[:`has_new_operator<B>` inherits from `__true_type`.]
+
+[:`has_new_operator<C>` inherits from `__true_type`.]
+
+[:`has_new_operator<D>` inherits from `__true_type`.]
+
+[:`has_new_operator<E>` inherits from `__true_type`.]
+
+[:`has_new_operator<F>` inherits from `__true_type`.]
+
+[endsect]
+