From a05906fd44adb1dec3c3cacab62b6f22be318ee6 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 25 Aug 2018 15:15:53 +0300 Subject: [PATCH] Add comment describing noncopyable_::base_token --- include/boost/core/noncopyable.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/core/noncopyable.hpp b/include/boost/core/noncopyable.hpp index ab30505..4a4f8ba 100644 --- a/include/boost/core/noncopyable.hpp +++ b/include/boost/core/noncopyable.hpp @@ -23,6 +23,14 @@ namespace noncopyable_ // protection from unintended ADL #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