diff --git a/simgear/nasal/cppbind/Ghost.hxx b/simgear/nasal/cppbind/Ghost.hxx index f1545ca4..3d6c6bd1 100644 --- a/simgear/nasal/cppbind/Ghost.hxx +++ b/simgear/nasal/cppbind/Ghost.hxx @@ -1230,7 +1230,7 @@ namespace nasal // Either const CallContext& or CallContext, non-const reference // does not make sense. static_assert( - !boost::is_same::value, + !std::is_same::value, "Only const reference and value make sense!"); return ctx; }; diff --git a/simgear/nasal/cppbind/NasalHash.hxx b/simgear/nasal/cppbind/NasalHash.hxx index 59281643..97c1e6cb 100644 --- a/simgear/nasal/cppbind/NasalHash.hxx +++ b/simgear/nasal/cppbind/NasalHash.hxx @@ -24,11 +24,6 @@ #include #include -#if BOOST_VERSION >= 105600 -#include -#else -#include -#endif namespace nasal { @@ -125,9 +120,9 @@ namespace nasal * @param name Member name */ template - typename boost::enable_if< boost::is_function, - boost::function - >::type + typename std::enable_if< std::is_function::value, + std::function + >::type get(const Key& name) const { BOOST_STATIC_ASSERT(( boost::is_convertible::value @@ -242,9 +237,9 @@ namespace nasal */ template Iterator( Iterator const& other, - typename boost::enable_if_c< is_const || !is_other_const, - void* - >::type = NULL ): + typename std::enable_if< is_const || !is_other_const, + void* + >::type = NULL ): _hash(other._hash), _index(other._index) {} diff --git a/simgear/props/props.hxx b/simgear/props/props.hxx index 0d407c99..d1e8dd6a 100644 --- a/simgear/props/props.hxx +++ b/simgear/props/props.hxx @@ -24,44 +24,13 @@ #include #if PROPS_STANDALONE -// taken from: boost/utility/enable_if.hpp -#ifndef SG_LOG -# define SG_GENERAL 0 -# define SG_ALERT 0 -# define SG_WARN 1 -# define SG_LOG(type, level, message) (type) ? (std::cerr < - struct enable_if_c { - typedef T type; - }; - - template - struct enable_if_c {}; - - template - struct enable_if : public enable_if_c {}; - - template - struct disable_if_c { - typedef T type; - }; - - template - struct disable_if_c {}; - - template - struct disable_if : public disable_if_c {}; -} +# ifndef SG_LOG +# define SG_GENERAL 0 +# define SG_ALERT 0 +# define SG_WARN 1 +# define SG_LOG(type, level, message) (type) ? (std::cerr < -#if BOOST_VERSION >= 105600 -#include -#else -#include -#endif - # include # include # include @@ -1263,11 +1232,11 @@ public: * match the desired type, a conversion isn't guaranteed. */ template - T getValue(typename boost::enable_if_c::Internal> + T getValue(typename std::enable_if::Internal> ::type* dummy = 0) const; // Getter for extended property template - T getValue(typename boost::disable_if_c::Internal> + T getValue(typename std::enable_if::Internal> ::type* dummy = 0) const; /** @@ -1331,12 +1300,12 @@ public: template bool setValue(const T& val, - typename boost::enable_if_c::Internal> + typename std::enable_if::Internal> ::type* dummy = 0); template bool setValue(const T& val, - typename boost::disable_if_c::Internal> + typename std::enable_if::Internal> ::type* dummy = 0); template @@ -1899,7 +1868,7 @@ template #if PROPS_STANDALONE T #else -typename boost::disable_if, T>::type +typename std::enable_if::value, T>::type #endif getValue(const SGPropertyNode*); @@ -1967,7 +1936,7 @@ template #if PROPS_STANDALONE inline T #else -inline typename boost::enable_if, T>::type +inline typename std::enable_if::value, T>::type #endif getValue(const SGPropertyNode* node) { @@ -2053,7 +2022,7 @@ bool SGPropertyNode::tie (const SGRawValue &rawValue, bool useDefault); template -T SGPropertyNode::getValue(typename boost::disable_if_c::Internal>::type* dummy) const { using namespace simgear::props; @@ -2081,7 +2050,7 @@ T SGPropertyNode::getValue(typename boost::disable_if_c -inline T SGPropertyNode::getValue(typename boost::enable_if_c::Internal>::type* dummy) const { return ::getValue(this); @@ -2108,7 +2077,7 @@ std::vector SGPropertyNode::getChildValues(const std::string& name) const template bool SGPropertyNode::setValue(const T& val, - typename boost::disable_if_c::Internal>::type* dummy) { using namespace simgear::props; @@ -2137,7 +2106,7 @@ bool SGPropertyNode::setValue(const T& val, template inline bool SGPropertyNode::setValue(const T& val, - typename boost::enable_if_c::Internal>::type* dummy) { return ::setValue(this, val); diff --git a/simgear/structure/SGWeakReferenced.hxx b/simgear/structure/SGWeakReferenced.hxx index 24db41b8..aa039baf 100644 --- a/simgear/structure/SGWeakReferenced.hxx +++ b/simgear/structure/SGWeakReferenced.hxx @@ -21,13 +21,6 @@ #include "SGReferenced.hxx" #include "SGSharedPtr.hxx" -#include -#if BOOST_VERSION >= 105600 -#include -#else -#include -#endif - #ifdef _MSC_VER # pragma warning(push) // C4355: 'this' : used in base member initializer list @@ -121,8 +114,8 @@ private: /// Upcast in a class hierarchy with a virtual base class template static - typename boost::enable_if< - boost::is_base_of, + typename std::enable_if< + std::is_base_of::value, T* >::type up_cast(SGWeakReferenced* ptr); @@ -130,8 +123,8 @@ private: /// Upcast in a non-virtual class hierarchy template static - typename boost::disable_if< - boost::is_base_of, + typename std::enable_if< + !std::is_base_of::value, T* >::type up_cast(SGWeakReferenced* ptr) @@ -185,8 +178,8 @@ class SGVirtualWeakReferenced: /// Upcast in a class hierarchy with a virtual base class // We (clang) need the definition of SGVirtualWeakReferenced for the static_cast template -typename boost::enable_if< - boost::is_base_of, +typename std::enable_if< + std::is_base_of::value, T* >::type SGWeakReferenced::WeakData::up_cast(SGWeakReferenced* ptr)