]> git.lyx.org Git - lyx.git/blobdiff - 3rdparty/boost/boost/core/noncopyable.hpp
Update to boost 1.72
[lyx.git] / 3rdparty / boost / boost / core / noncopyable.hpp
index 6ae8c244dd4cf991bf7704e8b0659ab808f6c8c8..4a4f8baba5dd69114d3ba56b4f6171325a5e66ef 100644 (file)
@@ -20,7 +20,22 @@ namespace boost {
 
 namespace noncopyable_  // protection from unintended ADL
 {
-  class noncopyable
+#ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
+#define BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
+
+// noncopyable derives from base_token to enable Type Traits to detect
+// whether a type derives from noncopyable without needing the definition
+// of noncopyable itself.
+//
+// The definition of base_token is macro-guarded so that Type Trais can
+// define it locally without including this header, to avoid a dependency
+// on Core.
+
+  struct base_token {};
+
+#endif // #ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
+
+  class noncopyable: base_token
   {
   protected:
 #if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)