From 0d1575c0b760fefec4d547546bc728f3fea63f72 Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Sun, 18 Nov 2001 17:32:19 +0000 Subject: [PATCH] add definition for integral constants initialized in-class [SVN r11723] --- include/boost/type_traits/conversion_traits.hpp | 6 ++++++ include/boost/type_traits/same_traits.hpp | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/include/boost/type_traits/conversion_traits.hpp b/include/boost/type_traits/conversion_traits.hpp index c94a4a6..3d640a5 100644 --- a/include/boost/type_traits/conversion_traits.hpp +++ b/include/boost/type_traits/conversion_traits.hpp @@ -200,6 +200,12 @@ public: void foo(); // avoid warning about all members being private }; +#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION +// A definition is required even for integral static constants +template +const bool is_convertible::value; +#endif + #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct is_convertible diff --git a/include/boost/type_traits/same_traits.hpp b/include/boost/type_traits/same_traits.hpp index 5c9fef1..6cc4228 100644 --- a/include/boost/type_traits/same_traits.hpp +++ b/include/boost/type_traits/same_traits.hpp @@ -41,6 +41,15 @@ template struct is_same { BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION +// A definition is required even for integral static constants +template +const bool is_same::value; + +template +const bool is_same::value; +#endif + #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #ifdef BOOST_MSVC