mirror of
https://github.com/boostorg/core.git
synced 2025-05-11 13:13:55 +00:00
Sync from upstream.
This commit is contained in:
commit
074a467d9d
@ -103,7 +103,8 @@ inline std::string fix_typeid_name( char const* n )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// class types can be incomplete
|
// class types can be incomplete
|
||||||
template<class T> std::string typeid_name_impl( int T::* )
|
// but also abstract (T[1] doesn't form)
|
||||||
|
template<class T> std::string typeid_name_impl( int T::*, T(*)[1] )
|
||||||
{
|
{
|
||||||
std::string r = fix_typeid_name( typeid(T[1]).name() );
|
std::string r = fix_typeid_name( typeid(T[1]).name() );
|
||||||
return r.substr( 0, r.size() - 4 ); // remove ' [1]' suffix
|
return r.substr( 0, r.size() - 4 ); // remove ' [1]' suffix
|
||||||
@ -116,7 +117,7 @@ template<class T> std::string typeid_name_impl( ... )
|
|||||||
|
|
||||||
template<class T> std::string typeid_name()
|
template<class T> std::string typeid_name()
|
||||||
{
|
{
|
||||||
return typeid_name_impl<T>( 0 );
|
return typeid_name_impl<T>( 0, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
// template names
|
// template names
|
||||||
|
@ -55,6 +55,13 @@ template<class T1, class T2> struct X
|
|||||||
|
|
||||||
template<class T1, class T2> struct Y;
|
template<class T1, class T2> struct Y;
|
||||||
|
|
||||||
|
class W
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
virtual void f() = 0;
|
||||||
|
};
|
||||||
|
|
||||||
enum E1
|
enum E1
|
||||||
{
|
{
|
||||||
e1
|
e1
|
||||||
@ -122,6 +129,7 @@ int main()
|
|||||||
TEST(A);
|
TEST(A);
|
||||||
TEST(B);
|
TEST(B);
|
||||||
TEST(C);
|
TEST(C);
|
||||||
|
TEST(W);
|
||||||
|
|
||||||
TEST(E1);
|
TEST(E1);
|
||||||
|
|
||||||
@ -143,6 +151,9 @@ int main()
|
|||||||
TEST(C&);
|
TEST(C&);
|
||||||
TEST(C const&);
|
TEST(C const&);
|
||||||
|
|
||||||
|
TEST(W const);
|
||||||
|
TEST(W&);
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||||
|
|
||||||
TEST(B&&);
|
TEST(B&&);
|
||||||
@ -156,6 +167,8 @@ int main()
|
|||||||
TEST(C*);
|
TEST(C*);
|
||||||
TEST(C const* volatile*);
|
TEST(C const* volatile*);
|
||||||
|
|
||||||
|
TEST(W volatile*);
|
||||||
|
|
||||||
TEST(void*);
|
TEST(void*);
|
||||||
TEST(void const* volatile*);
|
TEST(void const* volatile*);
|
||||||
|
|
||||||
@ -307,6 +320,8 @@ int main()
|
|||||||
|
|
||||||
TEST(std::pair<C, C>);
|
TEST(std::pair<C, C>);
|
||||||
|
|
||||||
|
TEST(std::pair<W, W>);
|
||||||
|
|
||||||
TEST(std::pair<void, void>);
|
TEST(std::pair<void, void>);
|
||||||
TEST(std::pair<std::pair<void, void>, void>);
|
TEST(std::pair<std::pair<void, void>, void>);
|
||||||
|
|
||||||
@ -336,9 +351,11 @@ int main()
|
|||||||
TEST(X<A const&, B&> volatile&);
|
TEST(X<A const&, B&> volatile&);
|
||||||
|
|
||||||
TEST(X<C, C>);
|
TEST(X<C, C>);
|
||||||
|
TEST(X<W, W>);
|
||||||
|
|
||||||
TEST(Y<A, B>);
|
TEST(Y<A, B>);
|
||||||
TEST(Y<C, C>);
|
TEST(Y<C, C>);
|
||||||
|
TEST(Y<W, W>);
|
||||||
|
|
||||||
TEST(X<std::pair<void, void>, void>);
|
TEST(X<std::pair<void, void>, void>);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user