add definition for integral constants initialized in-class

[SVN r11723]
This commit is contained in:
Jens Maurer
2001-11-18 17:32:19 +00:00
parent bf11510e71
commit 0d1575c0b7
2 changed files with 15 additions and 0 deletions

View File

@ -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 <class From, class To>
const bool is_convertible<From, To>::value;
#endif
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
template <class From>
struct is_convertible<From, void>

View File

@ -41,6 +41,15 @@ template <typename T>
struct is_same<T, T>
{ BOOST_STATIC_CONSTANT(bool, value = true); };
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
// A definition is required even for integral static constants
template <typename T, typename U>
const bool is_same<T, U>::value;
template <typename T>
const bool is_same<T, T>::value;
#endif
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
#ifdef BOOST_MSVC