forked from boostorg/typeof
Compare commits
3 Commits
svn-branch
...
svn-branch
Author | SHA1 | Date | |
---|---|---|---|
d5c39b3615 | |||
39361d0ac9 | |||
5fcc3c4cfd |
0
include/boost/typeof/dmc/typeof_impl.hpp
Normal file → Executable file
0
include/boost/typeof/dmc/typeof_impl.hpp
Normal file → Executable file
0
include/boost/typeof/encode_decode.hpp
Normal file → Executable file
0
include/boost/typeof/encode_decode.hpp
Normal file → Executable file
0
include/boost/typeof/encode_decode_params.hpp
Normal file → Executable file
0
include/boost/typeof/encode_decode_params.hpp
Normal file → Executable file
0
include/boost/typeof/incr_registration_group.hpp
Normal file → Executable file
0
include/boost/typeof/incr_registration_group.hpp
Normal file → Executable file
0
include/boost/typeof/int_encoding.hpp
Normal file → Executable file
0
include/boost/typeof/int_encoding.hpp
Normal file → Executable file
0
include/boost/typeof/integral_template_param.hpp
Normal file → Executable file
0
include/boost/typeof/integral_template_param.hpp
Normal file → Executable file
0
include/boost/typeof/message.hpp
Normal file → Executable file
0
include/boost/typeof/message.hpp
Normal file → Executable file
0
include/boost/typeof/modifiers.hpp
Normal file → Executable file
0
include/boost/typeof/modifiers.hpp
Normal file → Executable file
15
include/boost/typeof/msvc/typeof_impl.hpp
Normal file → Executable file
15
include/boost/typeof/msvc/typeof_impl.hpp
Normal file → Executable file
@ -104,7 +104,7 @@ namespace boost
|
||||
typedef T type;
|
||||
};
|
||||
};
|
||||
#elif BOOST_WORKAROUND(BOOST_MSVC,>=1400)
|
||||
#elif BOOST_WORKAROUND(BOOST_MSVC,==1400)
|
||||
struct msvc_extract_type_default_param {};
|
||||
|
||||
template<typename ID, typename T = msvc_extract_type_default_param>
|
||||
@ -153,7 +153,7 @@ namespace boost
|
||||
};
|
||||
};
|
||||
# endif
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC,==1310)
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC,>=1310)
|
||||
template<const std::type_info& ref_type_info>
|
||||
struct msvc_typeid_wrapper {
|
||||
typedef typename msvc_extract_type<msvc_typeid_wrapper>::id2type id2type;
|
||||
@ -184,7 +184,6 @@ namespace boost
|
||||
template<typename Organizer, typename T>
|
||||
msvc_register_type<T,Organizer> typeof_register_type(const T&);
|
||||
|
||||
|
||||
# define BOOST_TYPEOF(expr) \
|
||||
boost::type_of::msvc_typeid_wrapper<typeid(boost::type_of::encode_start(expr))>::type
|
||||
|
||||
@ -240,18 +239,10 @@ struct name {\
|
||||
{
|
||||
typedef char(*type)[encode_type<T>::value];
|
||||
};
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC,>=1310)
|
||||
template<typename T> typename disable_if<
|
||||
typename is_function<T>::type,
|
||||
typename sizer<T>::type>::type encode_start(T const&);
|
||||
|
||||
template<typename T> typename enable_if<
|
||||
typename is_function<T>::type,
|
||||
typename sizer<T>::type>::type encode_start(T&);
|
||||
# else
|
||||
template<typename T>
|
||||
typename sizer<T>::type encode_start(T const&);
|
||||
# endif
|
||||
|
||||
template<typename Organizer, typename T>
|
||||
msvc_register_type<T,Organizer> typeof_register_type(const T&,Organizer* =0);
|
||||
|
||||
|
0
include/boost/typeof/native.hpp
Normal file → Executable file
0
include/boost/typeof/native.hpp
Normal file → Executable file
0
include/boost/typeof/pointers_data_members.hpp
Normal file → Executable file
0
include/boost/typeof/pointers_data_members.hpp
Normal file → Executable file
0
include/boost/typeof/register_functions.hpp
Normal file → Executable file
0
include/boost/typeof/register_functions.hpp
Normal file → Executable file
0
include/boost/typeof/register_functions_iterate.hpp
Normal file → Executable file
0
include/boost/typeof/register_functions_iterate.hpp
Normal file → Executable file
0
include/boost/typeof/register_fundamental.hpp
Normal file → Executable file
0
include/boost/typeof/register_fundamental.hpp
Normal file → Executable file
0
include/boost/typeof/register_mem_functions.hpp
Normal file → Executable file
0
include/boost/typeof/register_mem_functions.hpp
Normal file → Executable file
0
include/boost/typeof/std/bitset.hpp
Normal file → Executable file
0
include/boost/typeof/std/bitset.hpp
Normal file → Executable file
0
include/boost/typeof/std/complex.hpp
Normal file → Executable file
0
include/boost/typeof/std/complex.hpp
Normal file → Executable file
0
include/boost/typeof/std/deque.hpp
Normal file → Executable file
0
include/boost/typeof/std/deque.hpp
Normal file → Executable file
0
include/boost/typeof/std/fstream.hpp
Normal file → Executable file
0
include/boost/typeof/std/fstream.hpp
Normal file → Executable file
0
include/boost/typeof/std/functional.hpp
Normal file → Executable file
0
include/boost/typeof/std/functional.hpp
Normal file → Executable file
0
include/boost/typeof/std/iostream.hpp
Normal file → Executable file
0
include/boost/typeof/std/iostream.hpp
Normal file → Executable file
0
include/boost/typeof/std/istream.hpp
Normal file → Executable file
0
include/boost/typeof/std/istream.hpp
Normal file → Executable file
0
include/boost/typeof/std/iterator.hpp
Normal file → Executable file
0
include/boost/typeof/std/iterator.hpp
Normal file → Executable file
0
include/boost/typeof/std/list.hpp
Normal file → Executable file
0
include/boost/typeof/std/list.hpp
Normal file → Executable file
0
include/boost/typeof/std/locale.hpp
Normal file → Executable file
0
include/boost/typeof/std/locale.hpp
Normal file → Executable file
0
include/boost/typeof/std/map.hpp
Normal file → Executable file
0
include/boost/typeof/std/map.hpp
Normal file → Executable file
0
include/boost/typeof/std/memory.hpp
Normal file → Executable file
0
include/boost/typeof/std/memory.hpp
Normal file → Executable file
0
include/boost/typeof/std/ostream.hpp
Normal file → Executable file
0
include/boost/typeof/std/ostream.hpp
Normal file → Executable file
0
include/boost/typeof/std/queue.hpp
Normal file → Executable file
0
include/boost/typeof/std/queue.hpp
Normal file → Executable file
0
include/boost/typeof/std/set.hpp
Normal file → Executable file
0
include/boost/typeof/std/set.hpp
Normal file → Executable file
0
include/boost/typeof/std/sstream.hpp
Normal file → Executable file
0
include/boost/typeof/std/sstream.hpp
Normal file → Executable file
0
include/boost/typeof/std/stack.hpp
Normal file → Executable file
0
include/boost/typeof/std/stack.hpp
Normal file → Executable file
0
include/boost/typeof/std/streambuf.hpp
Normal file → Executable file
0
include/boost/typeof/std/streambuf.hpp
Normal file → Executable file
0
include/boost/typeof/std/string.hpp
Normal file → Executable file
0
include/boost/typeof/std/string.hpp
Normal file → Executable file
0
include/boost/typeof/std/utility.hpp
Normal file → Executable file
0
include/boost/typeof/std/utility.hpp
Normal file → Executable file
0
include/boost/typeof/std/valarray.hpp
Normal file → Executable file
0
include/boost/typeof/std/valarray.hpp
Normal file → Executable file
0
include/boost/typeof/std/vector.hpp
Normal file → Executable file
0
include/boost/typeof/std/vector.hpp
Normal file → Executable file
0
include/boost/typeof/template_encoding.hpp
Normal file → Executable file
0
include/boost/typeof/template_encoding.hpp
Normal file → Executable file
0
include/boost/typeof/template_template_param.hpp
Normal file → Executable file
0
include/boost/typeof/template_template_param.hpp
Normal file → Executable file
0
include/boost/typeof/type_encoding.hpp
Normal file → Executable file
0
include/boost/typeof/type_encoding.hpp
Normal file → Executable file
0
include/boost/typeof/type_template_param.hpp
Normal file → Executable file
0
include/boost/typeof/type_template_param.hpp
Normal file → Executable file
0
include/boost/typeof/typeof.hpp
Normal file → Executable file
0
include/boost/typeof/typeof.hpp
Normal file → Executable file
0
include/boost/typeof/typeof_impl.hpp
Normal file → Executable file
0
include/boost/typeof/typeof_impl.hpp
Normal file → Executable file
5
include/boost/typeof/vector.hpp
Normal file → Executable file
5
include/boost/typeof/vector.hpp
Normal file → Executable file
@ -138,12 +138,9 @@ namespace boost { namespace type_of {
|
||||
|
||||
namespace boost { namespace type_of {
|
||||
|
||||
# if BOOST_TYPEOF_LIMIT_SIZE < 50
|
||||
template<class V, class T> struct push_back {
|
||||
typedef V type;
|
||||
};
|
||||
# endif
|
||||
//default behaviour is to let push_back ignore T, and return the input vector.
|
||||
}; //default behaviour is to let push_back ignore T, and return the input vector.
|
||||
//This is to let BOOST_TYPEOF_NESTED_TYPEDEF work properly with the default vector.
|
||||
# define BOOST_PP_LOCAL_MACRO BOOST_TYPEOF_spec_push_back
|
||||
# define BOOST_PP_LOCAL_LIMITS \
|
||||
|
0
include/boost/typeof/vector100.hpp
Normal file → Executable file
0
include/boost/typeof/vector100.hpp
Normal file → Executable file
0
include/boost/typeof/vector150.hpp
Normal file → Executable file
0
include/boost/typeof/vector150.hpp
Normal file → Executable file
0
include/boost/typeof/vector200.hpp
Normal file → Executable file
0
include/boost/typeof/vector200.hpp
Normal file → Executable file
0
include/boost/typeof/vector50.hpp
Normal file → Executable file
0
include/boost/typeof/vector50.hpp
Normal file → Executable file
0
index.html
Normal file → Executable file
0
index.html
Normal file → Executable file
0
test/data_member.cpp
Normal file → Executable file
0
test/data_member.cpp
Normal file → Executable file
26
test/experimental_1.cpp
Executable file
26
test/experimental_1.cpp
Executable file
@ -0,0 +1,26 @@
|
||||
|
||||
template<typename ID>
|
||||
struct msvc_extract_type
|
||||
{
|
||||
template<bool>
|
||||
struct id2type_impl;
|
||||
|
||||
typedef id2type_impl<true> id2type;
|
||||
};
|
||||
|
||||
template<typename T, typename ID>
|
||||
struct msvc_register_type : msvc_extract_type<ID>
|
||||
{
|
||||
template<>
|
||||
struct id2type_impl<true> //VC7.0 specific bugfeature
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
};
|
||||
|
||||
int main() {
|
||||
sizeof(msvc_register_type<double,int>);
|
||||
typedef msvc_extract_type<int>::id2type::type deduced_type;
|
||||
deduced_type f=5.0;
|
||||
return 0;
|
||||
}
|
39
test/experimental_2.cpp
Executable file
39
test/experimental_2.cpp
Executable file
@ -0,0 +1,39 @@
|
||||
|
||||
struct msvc_extract_type_default_param {};
|
||||
|
||||
template<typename ID, typename T = msvc_extract_type_default_param>
|
||||
struct msvc_extract_type;
|
||||
|
||||
template<typename ID>
|
||||
struct msvc_extract_type<ID, msvc_extract_type_default_param> {
|
||||
template<bool>
|
||||
struct id2type_impl;
|
||||
|
||||
typedef id2type_impl<true> id2type;
|
||||
};
|
||||
|
||||
template<typename ID, typename T>
|
||||
struct msvc_extract_type : msvc_extract_type<ID,msvc_extract_type_default_param>
|
||||
{
|
||||
template<>
|
||||
struct id2type_impl<true> //VC8.0 specific bugfeature
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
template<bool>
|
||||
struct id2type_impl;
|
||||
|
||||
typedef id2type_impl<true> id2type;
|
||||
};
|
||||
|
||||
template<typename T, typename ID>
|
||||
struct msvc_register_type : msvc_extract_type<ID, T>
|
||||
{
|
||||
};
|
||||
|
||||
int main() {
|
||||
sizeof(msvc_register_type<double,int>);
|
||||
typedef msvc_extract_type<int>::id2type::type deduced_type;
|
||||
deduced_type f=5.0;
|
||||
return 0;
|
||||
}
|
23
test/experimental_3.cpp
Executable file
23
test/experimental_3.cpp
Executable file
@ -0,0 +1,23 @@
|
||||
|
||||
template<typename ID>
|
||||
struct msvc_extract_type
|
||||
{
|
||||
struct id2type;
|
||||
};
|
||||
|
||||
template<typename T, typename ID>
|
||||
struct msvc_register_type : msvc_extract_type<ID>
|
||||
{
|
||||
typedef msvc_extract_type<ID> base_type;
|
||||
struct base_type::id2type // This uses nice VC6.5 and VC7.1 bugfeature
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
};
|
||||
|
||||
int main() {
|
||||
sizeof(msvc_register_type<double,int>);
|
||||
typedef msvc_extract_type<int>::id2type::type deduced_type;
|
||||
deduced_type f=5.0;
|
||||
return 0;
|
||||
}
|
9
test/experimental_4.cpp
Executable file
9
test/experimental_4.cpp
Executable file
@ -0,0 +1,9 @@
|
||||
#include <typeinfo>
|
||||
|
||||
template<const std::type_info& info>
|
||||
struct msvc_register_type {
|
||||
};
|
||||
|
||||
int main() {
|
||||
msvc_register_type<typeid(double)>;
|
||||
}
|
0
test/function.cpp
Normal file → Executable file
0
test/function.cpp
Normal file → Executable file
0
test/function_binding.cpp
Normal file → Executable file
0
test/function_binding.cpp
Normal file → Executable file
0
test/function_ptr.cpp
Normal file → Executable file
0
test/function_ptr.cpp
Normal file → Executable file
0
test/function_ptr_from_tpl.cpp
Normal file → Executable file
0
test/function_ptr_from_tpl.cpp
Normal file → Executable file
0
test/function_ref.cpp
Normal file → Executable file
0
test/function_ref.cpp
Normal file → Executable file
0
test/member_function.cpp
Normal file → Executable file
0
test/member_function.cpp
Normal file → Executable file
0
test/modifiers.cpp
Normal file → Executable file
0
test/modifiers.cpp
Normal file → Executable file
0
test/noncopyable.cpp
Normal file → Executable file
0
test/noncopyable.cpp
Normal file → Executable file
0
test/odr.hpp
Normal file → Executable file
0
test/odr.hpp
Normal file → Executable file
0
test/odr1.cpp
Normal file → Executable file
0
test/odr1.cpp
Normal file → Executable file
0
test/odr2.cpp
Normal file → Executable file
0
test/odr2.cpp
Normal file → Executable file
0
test/odr_no_uns1.cpp
Normal file → Executable file
0
test/odr_no_uns1.cpp
Normal file → Executable file
0
test/odr_no_uns1.hpp
Normal file → Executable file
0
test/odr_no_uns1.hpp
Normal file → Executable file
0
test/odr_no_uns2.cpp
Normal file → Executable file
0
test/odr_no_uns2.cpp
Normal file → Executable file
0
test/odr_no_uns2.hpp
Normal file → Executable file
0
test/odr_no_uns2.hpp
Normal file → Executable file
0
test/std.cpp
Normal file → Executable file
0
test/std.cpp
Normal file → Executable file
0
test/template_dependent.cpp
Normal file → Executable file
0
test/template_dependent.cpp
Normal file → Executable file
0
test/template_enum.cpp
Normal file → Executable file
0
test/template_enum.cpp
Normal file → Executable file
0
test/template_int.cpp
Normal file → Executable file
0
test/template_int.cpp
Normal file → Executable file
0
test/template_multiword.cpp
Normal file → Executable file
0
test/template_multiword.cpp
Normal file → Executable file
0
test/template_tpl.cpp
Normal file → Executable file
0
test/template_tpl.cpp
Normal file → Executable file
0
test/template_type.cpp
Normal file → Executable file
0
test/template_type.cpp
Normal file → Executable file
0
test/test.hpp
Normal file → Executable file
0
test/test.hpp
Normal file → Executable file
0
test/type.cpp
Normal file → Executable file
0
test/type.cpp
Normal file → Executable file
@ -1,7 +1,7 @@
|
||||
# // (C) Copyright Tobias Schwinger
|
||||
# //
|
||||
# // Use modification and distribution are subject to the boost Software License
|
||||
# // Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
|
||||
# // Version 1.0. (See http:/\/www.boost.org/LICENSE_1_0.txt).
|
||||
|
||||
# // Preprocess and run this script.
|
||||
# //
|
||||
|
Reference in New Issue
Block a user