forked from boostorg/core
Fix type_name<> for cv-qualified member pointers without variadic templates. Refs #145.
This commit is contained in:
@@ -862,6 +862,8 @@ template<class T, std::size_t N> struct tn_holder<T const volatile[N]>
|
|||||||
|
|
||||||
// pointers to members
|
// pointers to members
|
||||||
|
|
||||||
|
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||||
|
|
||||||
template<class R, class T> struct tn_holder<R T::*>
|
template<class R, class T> struct tn_holder<R T::*>
|
||||||
{
|
{
|
||||||
static std::string type_name( std::string const& suffix )
|
static std::string type_name( std::string const& suffix )
|
||||||
@@ -870,7 +872,7 @@ template<class R, class T> struct tn_holder<R T::*>
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(BOOST_MSVC) && BOOST_MSVC < 1900 && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
#if defined(BOOST_MSVC) && BOOST_MSVC < 1900
|
||||||
|
|
||||||
template<class R, class T, class... A> struct tn_holder<R(T::*)(A...)>
|
template<class R, class T, class... A> struct tn_holder<R(T::*)(A...)>
|
||||||
{
|
{
|
||||||
@@ -904,7 +906,9 @@ template<class R, class T, class... A> struct tn_holder<R(T::*)(A...) const vola
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif // #if defined(BOOST_MSVC) && BOOST_MSVC < 1900
|
||||||
|
|
||||||
|
#endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||||
|
|
||||||
// strings
|
// strings
|
||||||
|
|
||||||
|
@@ -239,9 +239,18 @@ int main()
|
|||||||
TEST(B(&)[1][2][3]);
|
TEST(B(&)[1][2][3]);
|
||||||
TEST(B const volatile(***)[1][2][3]);
|
TEST(B const volatile(***)[1][2][3]);
|
||||||
|
|
||||||
|
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || !defined(BOOST_MSVC)
|
||||||
|
|
||||||
TEST(int A::*);
|
TEST(int A::*);
|
||||||
TEST(int const B::*);
|
TEST(int const B::*);
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
boost::core::type_name<int A::*>();
|
||||||
|
boost::core::type_name<int const B::*>();
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||||
|
|
||||||
TEST(void(A::*)());
|
TEST(void(A::*)());
|
||||||
|
Reference in New Issue
Block a user