forked from boostorg/type_traits
add definition for integral constants initialized in-class
[SVN r11723]
This commit is contained in:
@ -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>
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user