From d6c44f0332ab122637d15070689632ceb552c9ca Mon Sep 17 00:00:00 2001 From: Arkadiy Vertleyb Date: Thu, 2 Feb 2006 02:45:46 +0000 Subject: [PATCH] temporary -- debugging cw-8.x [SVN r32503] --- test/function_ptr_from_tpl.cpp | 23 +++++++++++++++++ test/type.cpp | 47 ++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/test/function_ptr_from_tpl.cpp b/test/function_ptr_from_tpl.cpp index 9d6faa1..009860a 100755 --- a/test/function_ptr_from_tpl.cpp +++ b/test/function_ptr_from_tpl.cpp @@ -1,5 +1,28 @@ +//#undef BOOST_TYPEOF_COMPLIANT #include +#include +#include + +namespace boost { namespace type_of { + +#ifdef BOOST_TYPEOF_EMULATION + + template + typename enable_if< + is_function, + sizer, T*>::type> + >::type encode(T*); + +#else + + template + char (*encode_start(T*))[encode_type::value]; + +#endif + +}} + void f() {} diff --git a/test/type.cpp b/test/type.cpp index 50fcdb2..1925a16 100755 --- a/test/type.cpp +++ b/test/type.cpp @@ -1,3 +1,49 @@ +#include + +namespace boost { namespace type_of { + template + struct test_wrapper{}; +}} + +namespace boost { namespace type_of { namespace { + + template + struct encode_template_impl > + : push_back > + { }; + template + struct decode_template_impl, Iter> + { + typedef int P0; + typedef int P1; + typedef boost::type_of::test_wrapper< int , int > type; + typedef Iter iter; + }; + template + struct encode_type_impl > + { + typedef typename push_back >::type V0; + typedef typename encode_type< V0, P0 >::type V1; + typedef typename encode_type< V1, P1 >::type V2; + typedef V2 type; + }; + template + struct decode_type_impl, Iter> + { + typedef Iter iter0; + typedef decode_type< iter0 > d0; + typedef typename d0::type P0; + typedef typename d0::iter iter1; + typedef decode_type< iter1 > d1; + typedef typename d1::type P1; + typedef typename d1::iter iter2; + typedef boost::type_of::test_wrapper< P0 , P1> type; + typedef iter2 iter; + }; +}}} + + +/* #include "test.hpp" #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP() @@ -5,3 +51,4 @@ struct A; BOOST_TYPEOF_REGISTER_TYPE(A) BOOST_STATIC_ASSERT(boost::type_of::test::value); +*/