Compare commits

...

36 Commits

Author SHA1 Message Date
99f958f2a9 Created a branch from trunk
[SVN r38959]
2007-08-26 05:34:35 +00:00
24c7fe2f65 native typeof implementation for VC7.1 and VC8.0 now uses typeid() instead of sizeof() to map a type. This bypasses some bugs in Microsofts sizeof implementation, and removes a limitation on the number of typeof invocations that can be done in a single compilation unit
[SVN r38801]
2007-08-20 18:09:14 +00:00
17d05e6396 #1188 Removed extra (unnecessary) semicolons in BOOST_TYPEOF_NESTED_TYPEDEF.
[SVN r38777]
2007-08-20 06:51:54 +00:00
34ffee8e2c Remove V1 Jamfiles
[SVN r38516]
2007-08-08 19:02:26 +00:00
744db7fe1d add conditionalization for aCC and cxx
[SVN r37953]
2007-06-09 18:25:19 +00:00
e47dd5b94c *** empty log message ***
[SVN r37558]
2007-05-02 02:38:56 +00:00
07a28b16d5 tutorial text fix
[SVN r36898]
2007-02-06 01:50:40 +00:00
3b4bad9217 Added documentation: BOOST_TYPEOF_NESTED_TYPEDEF can not be used at function/block scope
[SVN r36885]
2007-02-04 09:26:13 +00:00
917725e67b Hack from Steven Watanabe to implement native typeof for VC8.0
[SVN r36497]
2006-12-23 09:28:50 +00:00
21ef2c54ec Changed specialization of encode_integral for bool to work around issues with the sun compiler
[SVN r35134]
2006-09-16 17:34:18 +00:00
0dc2a5524b suppressed inspection unnamed complain
[SVN r35117]
2006-09-14 23:19:51 +00:00
293eed92ad *** empty log message ***
[SVN r35116]
2006-09-14 23:18:14 +00:00
e689ac17bc Fixed warnings on VC7.1 on integral encoding of bool
[SVN r35109]
2006-09-14 17:38:44 +00:00
34bcfef25a Added name to copyright.
[SVN r35059]
2006-09-10 17:40:47 +00:00
7ff4eceaa4 removing tab
[SVN r35056]
2006-09-10 16:48:39 +00:00
dfb50b4e37 inspection report fixes
[SVN r35051]
2006-09-09 17:25:09 +00:00
b94ec36fbf Removed tabs in typeof_impl.hpp
[SVN r35050]
2006-09-08 16:23:16 +00:00
8f24a89307 DMC support for BOOST_TYPEOF_NESTED_TYPEDEF
[SVN r35048]
2006-09-08 16:16:57 +00:00
24230afadb Support typeof emulation for DMC: Integral argument support.
[SVN r35022]
2006-09-06 17:00:03 +00:00
86964f046d Fixed issues with support for compilers without SFINAE
[SVN r35017]
2006-09-01 19:25:45 +00:00
51e40de915 Fixed error in code for supporting compilers without SFINAE.
[SVN r35011]
2006-08-31 10:47:59 +00:00
ba61bafc4a Removed tabs from code.
[SVN r35001]
2006-08-30 17:19:32 +00:00
9d728a6b33 Disable enable_if on compilers that does not support it.
[SVN r34999]
2006-08-30 10:50:35 +00:00
f1162b5b5a Remove tabs
[SVN r34996]
2006-08-29 21:14:51 +00:00
ea8c6a9d53 Fixed error with BOOST_TYPEOF_NESTED_TYPEDEF for CW.
[SVN r34982]
2006-08-28 13:26:19 +00:00
a0af228ad0 boost guidelines (mainly from inspect tool: tabs, license reference text, etc.)
[SVN r34752]
2006-07-27 10:27:37 +00:00
471e48eccb *** empty log message ***
[SVN r34402]
2006-06-25 23:59:21 +00:00
ddacb0345b SUPPRESS_UNNAMED_NAMESPACE
[SVN r34347]
2006-06-18 15:37:56 +00:00
0f458a1ef2 *** empty log message ***
[SVN r34269]
2006-06-11 11:55:34 +00:00
e653184ec3 *** empty log message ***
[SVN r34268]
2006-06-11 11:45:21 +00:00
9cc64130ac *** empty log message ***
[SVN r34212]
2006-06-07 02:55:16 +00:00
a8112fe31d function binding
[SVN r34175]
2006-06-05 02:32:41 +00:00
8ce982a048 fix for VC PCH problem
[SVN r33799]
2006-04-25 00:42:22 +00:00
9bc7ac4b43 typeof doc id
[SVN r33769]
2006-04-23 12:09:13 +00:00
d061288eb7 Fixed typo in typeof docs
[SVN r33523]
2006-03-29 17:30:08 +00:00
878e7ab5a5 Replaced tabs with spaces in documentation of BOOST_TYPEOF_NESTED_TYPEDEF
[SVN r33460]
2006-03-23 20:50:12 +00:00
48 changed files with 633 additions and 336 deletions

View File

@ -8,6 +8,7 @@
http://www.boost.org/LICENSE_1_0.txt
</ulink>)
]
[id typeof]
[last-revision $Date$]
]
@ -79,8 +80,8 @@ she would have to specify something like this:
Not exactly elegant. To solve this problem (as well as some other problems),
the C++ standard committee is considering
a few additions to the standard language, such as `typeof/decltype` and `auto` (see
[@http://www.osl.iu.edu/~jajarvi/publications/papers/decltype_n1478.pdf
http://www.osl.iu.edu/~jajarvi/publications/papers/decltype_n1478.pdf]).
[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1607.pdf
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1607.pdf]).
The `typeof` operator (or `decltype`, which is a slightly different flavor of `typeof`)
allows one to determine the type of an expression at compile time. Using `typeof`,
@ -100,6 +101,10 @@ and becomes widely available.
[section:tuto Tutorial]
To start using typeof include the typeof header:
#include <boost/typeof/typeof.hpp>
To deduce the type of an expression at compile time
use the `BOOST_TYPEOF` macro:
@ -446,12 +451,12 @@ and template template parameters:
* A type template parameter is described by the `(class)` or `(typename)` sequence element
* A template parameter of a well-known integral type can be described by
simply supplying its type, like (`unsigned int`).
simply supplying its type, like `(unsigned int)`.
The following well-known integral types are supported:
* [`signed`/`unsigned`] `char`
* [`unsigned`] `short`
* [`unsigned`] `int`
* [`unsigned`] `long`
* `[signed/unsigned] char`
* `[unsigned] short`
* `[unsigned] int`
* `[unsigned] long`
* `unsigned`
* `bool`
* `size_t`
@ -585,13 +590,15 @@ larger expressions.
If you want to use `typeof_nested_typedef` in a template-context, use `BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr)`,
which takes care of `typename` inside the `typeof` expression.
'typeof_nested_typedef' can not be used at function/block scope.
[h4 Sample Code]
template<typename A, typename B>
struct result_of_conditional
{
BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested,true?A():B());
typedef typename nested::type type;
BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested,true?A():B())
typedef typename nested::type type;
};
template<typename A, typename B>
@ -837,7 +844,7 @@ as nested classes. Instead, instantiations can be registered:
[endsect]
[section:ackn Acknoledgements]
[section:ackn Acknowledgements]
The idea of representing a type as multiple compile-time integers,
and passing these integers across function boundaries using sizeof(),

View File

@ -1,42 +0,0 @@
#ifndef BOOST_TYPEOF_BINDING_WORKAROUND_HPP_INCLUDED
#define BOOST_TYPEOF_BINDING_WORKAROUND_HPP_INCLUDED
// workarounds related to inability to bind to const T&
/*
MSVC 7.1-, from inside a template,
can't bind a function pointer to const T&
*/
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(BOOST_MSVC,==1310) && defined(BOOST_TYPEOF_EMULATION)
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_function.hpp>
namespace boost { namespace type_of {
template<class V,class T>
sizer<typename encode_type<V, T*>::type> encode(T*,
typename enable_if<typename is_function<T>::type>::type* = 0);
}}
#elif BOOST_WORKAROUND(BOOST_MSVC,<=1310) && defined(BOOST_TYPEOF_NATIVE)
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_function.hpp>
namespace boost { namespace type_of {
template<typename T>
char (*encode_start(T*))[encode_type<T*>::value];
}}
#endif
//
#endif//BOOST_TYPEOF_BINDING_WORKAROUND_HPP_INCLUDED

View File

@ -1,6 +1,9 @@
// Copyright (C) 2004 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// boostinspect:nounnamed
#ifndef BOOST_TYPEOF_ENCODE_DECODE_HPP_INCLUDED
#define BOOST_TYPEOF_ENCODE_DECODE_HPP_INCLUDED
@ -8,27 +11,48 @@
#include <boost/mpl/deref.hpp>
#include <boost/mpl/next.hpp>
namespace boost { namespace type_of { namespace {
#ifndef BOOST_TYPEOF_SUPPRESS_UNNAMED_NAMESPACE
template<class V, class Type_Not_Registered_With_Typeof_System>
struct encode_type_impl;
template<class T, class Iter>
struct decode_type_impl
{
typedef int type; // MSVC ETI workaround
};
# define BOOST_TYPEOF_BEGIN_ENCODE_NS namespace { namespace boost_typeof {
# define BOOST_TYPEOF_END_ENCODE_NS }}
# define BOOST_TYPEOF_ENCODE_NS_QUALIFIER boost_typeof
#else
# define BOOST_TYPEOF_BEGIN_ENCODE_NS namespace boost { namespace type_of {
# define BOOST_TYPEOF_END_ENCODE_NS }}
# define BOOST_TYPEOF_ENCODE_NS_QUALIFIER boost::type_of
# define BOOST_TYPEOF_TEXT "unnamed namespace is off"
# include <boost/typeof/message.hpp>
#endif
BOOST_TYPEOF_BEGIN_ENCODE_NS
template<class V, class Type_Not_Registered_With_Typeof_System>
struct encode_type_impl;
template<class T, class Iter>
struct decode_type_impl
{
typedef int type; // MSVC ETI workaround
};
BOOST_TYPEOF_END_ENCODE_NS
namespace boost { namespace type_of {
template<class V, class T>
struct encode_type : encode_type_impl<V, T>
struct encode_type : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::encode_type_impl<V, T>
{};
template<class Iter>
struct decode_type : decode_type_impl<
struct decode_type : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::decode_type_impl<
typename Iter::type,
typename Iter::next
>
{};
}}}
}}
#endif//BOOST_TYPEOF_ENCODE_DECODE_HPP_INCLUDED

View File

@ -1,6 +1,6 @@
// Copyright (C) 2005 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_TYPEOF_ENCODE_DECODE_PARAMS_HPP_INCLUDED
#define BOOST_TYPEOF_ENCODE_DECODE_PARAMS_HPP_INCLUDED
@ -11,7 +11,7 @@
// Assumes iter0 contains initial iterator
#define BOOST_TYPEOF_DECODE_PARAM(z, n, text) \
typedef decode_type<iter##n> decode##n; \
typedef boost::type_of::decode_type<iter##n> decode##n; \
typedef typename decode##n::type p##n; \
typedef typename decode##n::iter BOOST_PP_CAT(iter, BOOST_PP_INC(n));
@ -21,14 +21,14 @@
// The P0, P1, ... PN are encoded and added to V
#define BOOST_TYPEOF_ENCODE_PARAMS_BEGIN(z, n, text)\
typename encode_type<
typename boost::type_of::encode_type<
#define BOOST_TYPEOF_ENCODE_PARAMS_END(z, n, text)\
, BOOST_PP_CAT(P, n)>::type
#define BOOST_TYPEOF_ENCODE_PARAMS(n, ID) \
BOOST_PP_REPEAT(n, BOOST_TYPEOF_ENCODE_PARAMS_BEGIN, ~) \
typename push_back<V, mpl::size_t<ID> >::type \
typename boost::type_of::push_back<V, boost::mpl::size_t<ID> >::type \
BOOST_PP_REPEAT(n, BOOST_TYPEOF_ENCODE_PARAMS_END, ~)
#endif//BOOST_TYPEOF_ENCODE_DECODE_PARAMS_HPP_INCLUDED

View File

@ -68,9 +68,12 @@ namespace boost { namespace type_of {
{};
template<class V, class T, T n>
struct encode_integral : encode_size_t< V, (typename get_unsigned<T>::type)n >
struct encode_integral : encode_size_t< V, (typename get_unsigned<T>::type)n,(((typename get_unsigned<T>::type)n)>=0x3fffffff) >
{};
template<class V, bool b>
struct encode_integral<V, bool, b> : encode_size_t< V, b?1:0, false>
{};
///////////////////////////
template<std::size_t n, class Iter, bool overflow>

View File

@ -1,6 +1,6 @@
// Copyright (C) 2005 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_TYPEOF_INTEGRAL_TEMPLATE_PARAM_HPP_INCLUDED
#define BOOST_TYPEOF_INTEGRAL_TEMPLATE_PARAM_HPP_INCLUDED
@ -55,14 +55,14 @@
// INTEGRAL_PARAM "virtual functions" implementation
#define BOOST_TYPEOF_INTEGRAL_PARAM_ENCODE(This, n)\
typedef typename encode_integral<\
typedef typename boost::type_of::encode_integral<\
BOOST_PP_CAT(V, n),\
BOOST_TYPEOF_INTEGRAL_PARAM_GETTYPE(This),\
BOOST_PP_CAT(P, n)\
>::type BOOST_PP_CAT(V, BOOST_PP_INC(n));
#define BOOST_TYPEOF_INTEGRAL_PARAM_DECODE(This, n)\
typedef decode_integral<BOOST_TYPEOF_INTEGRAL_PARAM_GETTYPE(This), BOOST_PP_CAT(iter, n)> BOOST_PP_CAT(d, n);\
typedef boost::type_of::decode_integral<BOOST_TYPEOF_INTEGRAL_PARAM_GETTYPE(This), BOOST_PP_CAT(iter, n)> BOOST_PP_CAT(d, n);\
static const BOOST_TYPEOF_INTEGRAL_PARAM_GETTYPE(This) BOOST_PP_CAT(P, n) = BOOST_PP_CAT(d, n)::value;\
typedef typename BOOST_PP_CAT(d, n)::iter BOOST_PP_CAT(iter, BOOST_PP_INC(n));

View File

@ -1,6 +1,6 @@
// Copyright (C) 2004 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_TYPEOF_MODIFIERS_HPP_INCLUDED
#define BOOST_TYPEOF_MODIFIERS_HPP_INCLUDED
@ -16,16 +16,16 @@
template<class V, class T> struct encode_type_impl<V, Fun(T)>\
{\
typedef\
typename encode_type<\
typename push_back<\
typename boost::type_of::encode_type<\
typename boost::type_of::push_back<\
V\
, mpl::size_t<ID> >::type\
, boost::mpl::size_t<ID> >::type\
, T>::type\
type;\
};\
template<class Iter> struct decode_type_impl<mpl::size_t<ID>, Iter>\
template<class Iter> struct decode_type_impl<boost::mpl::size_t<ID>, Iter>\
{\
typedef decode_type<Iter> d1;\
typedef boost::type_of::decode_type<Iter> d1;\
typedef Fun(typename d1::type) type;\
typedef typename d1::iter iter;\
}
@ -36,15 +36,15 @@
#define BOOST_TYPEOF_pointer_fun(T) T*
#define BOOST_TYPEOF_reference_fun(T) T&
namespace boost { namespace type_of { namespace {
BOOST_TYPEOF_BEGIN_ENCODE_NS
BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_const_fun);
BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_volatile_fun);
BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_volatile_const_fun);
BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_pointer_fun);
BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_reference_fun);
BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_const_fun);
BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_volatile_fun);
BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_volatile_const_fun);
BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_pointer_fun);
BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_reference_fun);
}}}
BOOST_TYPEOF_END_ENCODE_NS
#undef BOOST_TYPEOF_modifier_support
#undef BOOST_TYPEOF_const_fun
@ -60,32 +60,32 @@ namespace boost { namespace type_of { namespace {
struct encode_type_impl<V, Qualifier() T[N]>\
{\
typedef\
typename encode_type<\
typename push_back<\
typename push_back<\
typename boost::type_of::encode_type<\
typename boost::type_of::push_back<\
typename boost::type_of::push_back<\
V\
, mpl::size_t<ID> >::type\
, mpl::size_t<N> >::type\
, boost::mpl::size_t<ID> >::type\
, boost::mpl::size_t<N> >::type\
, T>::type\
type;\
};\
template<class Iter>\
struct decode_type_impl<mpl::size_t<ID>, Iter>\
struct decode_type_impl<boost::mpl::size_t<ID>, Iter>\
{\
enum{n = Iter::type::value};\
typedef decode_type<typename Iter::next> d;\
typedef boost::type_of::decode_type<typename Iter::next> d;\
typedef typename d::type Qualifier() type[n];\
typedef typename d::iter iter;\
}
namespace boost { namespace type_of { namespace {
BOOST_TYPEOF_BEGIN_ENCODE_NS
BOOST_TYPEOF_array_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_PP_EMPTY);
BOOST_TYPEOF_array_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_PP_IDENTITY(const));
BOOST_TYPEOF_array_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_PP_IDENTITY(volatile));
BOOST_TYPEOF_array_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_PP_IDENTITY(volatile const));
BOOST_TYPEOF_array_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_PP_EMPTY);
BOOST_TYPEOF_array_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_PP_IDENTITY(const));
BOOST_TYPEOF_array_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_PP_IDENTITY(volatile));
BOOST_TYPEOF_array_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_PP_IDENTITY(volatile const));
}}}
BOOST_TYPEOF_END_ENCODE_NS
#undef BOOST_TYPEOF_array_support

View File

@ -1,6 +1,7 @@
// Copyright (C) 2005 Igor Chesnokov, mailto:ichesnokov@gmail.com
// Copyright (C) 2005 Peder Holt
// Copyright (C) 2005 Igor Chesnokov, mailto:ichesnokov@gmail.com (VC 6.5,VC 7.1 + counter code)
// Copyright (C) 2005-2007 Peder Holt (VC 7.0 + framework)
// Copyright (C) 2006 Steven Watanabe (VC 8.0)
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
@ -11,6 +12,12 @@
# include <boost/config.hpp>
# include <boost/detail/workaround.hpp>
# include <boost/mpl/int.hpp>
# include <boost/type_traits/is_function.hpp>
# include <boost/utility/enable_if.hpp>
# if BOOST_WORKAROUND(BOOST_MSVC,>=1310)
# include <typeinfo>
# endif
namespace boost
{
@ -20,7 +27,7 @@ namespace boost
//Compile time constant code
# if BOOST_WORKAROUND(BOOST_MSVC,>=1300) && defined(_MSC_EXTENSIONS)
template<int N> struct the_counter;
template<typename T,int N = 5/*for similarity*/>
struct encode_counter
{
@ -37,7 +44,7 @@ namespace boost
__if_not_exists(the_counter<N + 64>)
{
__if_exists(the_counter<N + 16>)
{
{
BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter<T,N + 17>::count));
}
__if_not_exists(the_counter<N + 16>)
@ -68,7 +75,7 @@ namespace boost
# else
template<int N> struct encode_counter : encode_counter<N - 1> {};
template<> struct encode_counter<0> {};
//Need to default to a larger value than 4, as due to MSVC's ETI errors. (sizeof(int)==4)
char (*encode_index(...))[5];
@ -97,7 +104,39 @@ namespace boost
typedef T type;
};
};
# else
#elif BOOST_WORKAROUND(BOOST_MSVC,==1400)
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>
{
};
# else
template<typename ID>
struct msvc_extract_type
{
@ -114,7 +153,57 @@ namespace boost
};
};
# endif
# 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;
typedef typename id2type::type wrapped_type;
typedef typename wrapped_type::type type;
};
//This class is used for registering the type T. encode_type<T> is mapped against typeid(encode_type<T>).
//msvc_typeid_wrapper<typeid(encode_type<T>)> will now have a type typedef that equals encode_type<T>.
template<typename T>
struct encode_type
{
typedef encode_type<T> input_type;
//Invoke registration of encode_type<T>. typeid(encode_type<T>) is now mapped to encode_type<T>. Do not use registered_type for anything.
//The reason for registering encode_type<T> rather than T, is that VC handles typeid(function reference) poorly. By adding another
//level of indirection, we solve this problem.
typedef typename msvc_register_type<input_type,msvc_typeid_wrapper<typeid(input_type)> >::id2type registered_type;
typedef T type;
};
template<typename T> typename disable_if<
typename is_function<T>::type,
typename encode_type<T>::input_type>::type encode_start(T const&);
template<typename T> typename enable_if<
typename is_function<T>::type,
typename encode_type<T>::input_type>::type encode_start(T&);
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
# define BOOST_TYPEOF_TPL(expr) typename BOOST_TYPEOF(expr)
# define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
struct name {\
enum {_typeof_register_value=sizeof(typeid(boost::type_of::typeof_register_type<name>(expr)))};\
typedef typename boost::type_of::msvc_extract_type<name>::id2type id2type;\
typedef typename id2type::type type;\
};
# define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
struct name {\
enum {_typeof_register_value=sizeof(typeid(boost::type_of::typeof_register_type<name>(expr)))};\
typedef boost::type_of::msvc_extract_type<name>::id2type id2type;\
typedef id2type::type type;\
};
# else
template<int ID>
struct msvc_typeid_wrapper {
typedef typename msvc_extract_type<mpl::int_<ID> >::id2type id2type;
@ -142,13 +231,20 @@ namespace boost
//Set the next compile time constants index
BOOST_STATIC_CONSTANT(unsigned,next=value+1);
//Increment the compile time constant (only needed when extensions are not active
BOOST_TYPEOF_NEXT_INDEX(next);
BOOST_TYPEOF_NEXT_INDEX(next);
};
template<class T>
struct sizer
{
typedef char(*type)[encode_type<T>::value];
};
template<typename T>
char (*encode_start(T const&))[encode_type<T>::value];
}
}
typename sizer<T>::type encode_start(T const&);
template<typename Organizer, typename T>
msvc_register_type<T,Organizer> typeof_register_type(const T&,Organizer* =0);
# define BOOST_TYPEOF(expr) \
boost::type_of::msvc_typeid_wrapper<sizeof(*boost::type_of::encode_start(expr))>::type
@ -157,20 +253,20 @@ namespace boost
# define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
struct name {\
template<typename T>\
static boost::type_of::msvc_register_type<T,name> _typeof_register_function(const T&);\
BOOST_STATIC_CONSTANT(int,_typeof_register_value=sizeof(_typeof_register_function(expr)));\
BOOST_STATIC_CONSTANT(int,_typeof_register_value=sizeof(boost::type_of::typeof_register_type<name>(expr)));\
typedef typename boost::type_of::msvc_extract_type<name>::id2type id2type;\
typedef typename id2type::type type;\
};
# define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
struct name {\
template<typename T>\
static boost::type_of::msvc_register_type<T,name> _typeof_register_function(const T&);\
BOOST_STATIC_CONSTANT(int,_typeof_register_value=sizeof(_typeof_register_function(expr)));\
BOOST_STATIC_CONSTANT(int,_typeof_register_value=sizeof(boost::type_of::typeof_register_type<name>(expr)));\
typedef boost::type_of::msvc_extract_type<name>::id2type id2type;\
typedef id2type::type type;\
};
#endif
}
}
#endif//BOOST_TYPEOF_MSVC_TYPEOF_IMPL_HPP_INCLUDED

60
include/boost/typeof/native.hpp Executable file
View File

@ -0,0 +1,60 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_TYPEOF_NATIVE_HPP_INCLUDED
#define BOOST_TYPEOF_NATIVE_HPP_INCLUDED
#ifndef MSVC_TYPEOF_HACK
#ifdef BOOST_NO_SFINAE
namespace boost { namespace type_of {
template<class T>
T& ensure_obj(const T&);
}}
#else
#include <boost/type_traits/is_function.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost { namespace type_of {
# ifdef BOOST_NO_SFINAE
template<class T>
T& ensure_obj(const T&);
# else
template<typename T>
typename enable_if<is_function<T>, T&>::type
ensure_obj(T&);
template<typename T>
typename disable_if<is_function<T>, T&>::type
ensure_obj(const T&);
# endif
}}
#endif//BOOST_NO_SFINAE
#define BOOST_TYPEOF(expr) BOOST_TYPEOF_KEYWORD(boost::type_of::ensure_obj(expr))
#define BOOST_TYPEOF_TPL BOOST_TYPEOF
#define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
struct name {\
typedef BOOST_TYPEOF_TPL(expr) type;\
};
#define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
struct name {\
typedef BOOST_TYPEOF(expr) type;\
};
#endif//MSVC_TYPEOF_HACK
#define BOOST_TYPEOF_REGISTER_TYPE(x)
#define BOOST_TYPEOF_REGISTER_TEMPLATE(x, params)
#endif//BOOST_TYPEOF_NATIVE_HPP_INCLUDED

View File

@ -10,35 +10,30 @@
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
namespace boost
BOOST_TYPEOF_BEGIN_ENCODE_NS
enum {PTR_DATA_MEM_ID = BOOST_TYPEOF_UNIQUE_ID()};
template<class V, class P0, class P1>
struct encode_type_impl<V, P0 P1::*>
{
namespace type_of
{
namespace
{
enum {PTR_DATA_MEM_ID = BOOST_TYPEOF_UNIQUE_ID()};
typedef BOOST_TYPEOF_ENCODE_PARAMS(2, PTR_DATA_MEM_ID) type;
};
template<class V, class P0, class P1>
struct encode_type_impl<V, P0 P1::*>
{
typedef BOOST_TYPEOF_ENCODE_PARAMS(2, PTR_DATA_MEM_ID) type;
};
template<class Iter>
struct decode_type_impl<boost::mpl::size_t<PTR_DATA_MEM_ID>, Iter>
{
typedef Iter iter0;
BOOST_TYPEOF_DECODE_PARAMS(2)
template<class Iter>
struct decode_type_impl<mpl::size_t<PTR_DATA_MEM_ID>, Iter>
{
typedef Iter iter0;
BOOST_TYPEOF_DECODE_PARAMS(2)
template<class T> struct workaround{
typedef p0 T::* type;
};
template<class T> struct workaround{
typedef p0 T::* type;
};
typedef typename workaround<p1>::type type;
typedef iter2 iter;
};
typedef typename workaround<p1>::type type;
typedef iter2 iter;
};
}
}
}
BOOST_TYPEOF_END_ENCODE_NS
#endif//BOOST_TYPEOF_POINTERS_DATA_MEMBERS_HPP_INCLUDED

View File

@ -32,11 +32,12 @@ enum
VOLATILE_CONST_MEM_FUN_ID = FUN_ID + 6 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY)
};
namespace boost { namespace type_of {
BOOST_TYPEOF_BEGIN_ENCODE_NS
# define BOOST_PP_ITERATION_LIMITS (0, BOOST_TYPEOF_LIMIT_FUNCTION_ARITY)
# define BOOST_PP_FILENAME_1 <boost/typeof/register_functions_iterate.hpp>
# include BOOST_PP_ITERATE()
}}
# define BOOST_PP_ITERATION_LIMITS (0, BOOST_TYPEOF_LIMIT_FUNCTION_ARITY)
# define BOOST_PP_FILENAME_1 <boost/typeof/register_functions_iterate.hpp>
# include BOOST_PP_ITERATE()
BOOST_TYPEOF_END_ENCODE_NS
#endif//BOOST_TYPEOF_REGISTER_FUNCTIONS_HPP_INCLUDED

View File

@ -1,30 +1,28 @@
// Copyright (C) 2004 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/typeof/encode_decode_params.hpp>
#define n BOOST_PP_ITERATION()
namespace
// function pointers
template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
struct encode_type_impl<V, R(*)(BOOST_PP_ENUM_PARAMS(n, P))>
{
// function pointers
typedef R BOOST_PP_CAT(P, n);
typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_PTR_ID + n) type;
};
template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
struct encode_type_impl<V, R(*)(BOOST_PP_ENUM_PARAMS(n, P))>
{
typedef R BOOST_PP_CAT(P, n);
typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_PTR_ID + n) type;
};
template<class Iter>
struct decode_type_impl<mpl::size_t<FUN_PTR_ID + n>, Iter>
{
typedef Iter iter0;
BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
typedef BOOST_PP_CAT(p, n)(*type)(BOOST_PP_ENUM_PARAMS(n, p));
typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
};
template<class Iter>
struct decode_type_impl<boost::mpl::size_t<FUN_PTR_ID + n>, Iter>
{
typedef Iter iter0;
BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
typedef BOOST_PP_CAT(p, n)(*type)(BOOST_PP_ENUM_PARAMS(n, p));
typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
};
#ifndef BOOST_TYPEOF_NO_FUNCTION_TYPES
@ -38,7 +36,7 @@ namespace
};
template<class Iter>
struct decode_type_impl<mpl::size_t<FUN_REF_ID + n>, Iter>
struct decode_type_impl<boost::mpl::size_t<FUN_REF_ID + n>, Iter>
{
typedef Iter iter0;
BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
@ -56,7 +54,7 @@ namespace
};
template<class Iter>
struct decode_type_impl<mpl::size_t<FUN_ID + n>, Iter>
struct decode_type_impl<boost::mpl::size_t<FUN_ID + n>, Iter>
{
typedef Iter iter0;
BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
@ -66,23 +64,22 @@ namespace
#endif//BOOST_TYPEOF_NO_FUNCTION_TYPES
// member functions
// member functions
#define BOOST_TYPEOF_qualifier
#define BOOST_TYPEOF_id MEM_FUN_ID
#include <boost/typeof/register_mem_functions.hpp>
#define BOOST_TYPEOF_qualifier
#define BOOST_TYPEOF_id MEM_FUN_ID
#include <boost/typeof/register_mem_functions.hpp>
#define BOOST_TYPEOF_qualifier const
#define BOOST_TYPEOF_id CONST_MEM_FUN_ID
#include <boost/typeof/register_mem_functions.hpp>
#define BOOST_TYPEOF_qualifier const
#define BOOST_TYPEOF_id CONST_MEM_FUN_ID
#include <boost/typeof/register_mem_functions.hpp>
#define BOOST_TYPEOF_qualifier volatile
#define BOOST_TYPEOF_id VOLATILE_MEM_FUN_ID
#include <boost/typeof/register_mem_functions.hpp>
#define BOOST_TYPEOF_qualifier volatile
#define BOOST_TYPEOF_id VOLATILE_MEM_FUN_ID
#include <boost/typeof/register_mem_functions.hpp>
#define BOOST_TYPEOF_qualifier volatile const
#define BOOST_TYPEOF_id VOLATILE_CONST_MEM_FUN_ID
#include <boost/typeof/register_mem_functions.hpp>
}
#define BOOST_TYPEOF_qualifier volatile const
#define BOOST_TYPEOF_id VOLATILE_CONST_MEM_FUN_ID
#include <boost/typeof/register_mem_functions.hpp>
#undef n

View File

@ -15,7 +15,7 @@ struct encode_type_impl<V, R(T::*)(BOOST_PP_ENUM_PARAMS(n, P)) BOOST_TYPEOF_qual
};
template<class Iter>
struct decode_type_impl<mpl::size_t<BOOST_TYPEOF_id + n>, Iter>
struct decode_type_impl<boost::mpl::size_t<BOOST_TYPEOF_id + n>, Iter>
{
typedef Iter iter0;
BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_ADD(n, 2))

View File

@ -1,7 +1,7 @@
// Copyright (C) 2004 Arkadiy Vertleyb
// Copyright (C) 2005 Peder Holt
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_TYPEOF_TEMPLATE_ENCODING_HPP_INCLUDED
#define BOOST_TYPEOF_TEMPLATE_ENCODING_HPP_INCLUDED
@ -128,14 +128,14 @@
BOOST_TYPEOF_TYPEDEF_DECODED_TEMPLATE_TYPE)(Name,Params)
#define BOOST_TYPEOF_REGISTER_TEMPLATE_IMPL(Name, Params, Size, ID)\
namespace boost { namespace type_of { namespace {\
BOOST_TYPEOF_BEGIN_ENCODE_NS\
BOOST_TYPEOF_REGISTER_TEMPLATE_TEMPLATE_IMPL(Name, Params, ID)\
template<class V\
BOOST_TYPEOF_SEQ_ENUM_TRAILING(Params, BOOST_TYPEOF_REGISTER_TEMPLATE_PARAM_PAIR)\
>\
struct encode_type_impl<V, Name<BOOST_PP_ENUM_PARAMS(Size, P)> >\
{\
typedef typename push_back<V, boost::mpl::size_t<ID> >::type V0;\
typedef typename boost::type_of::push_back<V, boost::mpl::size_t<ID> >::type V0;\
BOOST_PP_SEQ_FOR_EACH_I(BOOST_TYPEOF_REGISTER_TEMPLATE_ENCODE_PARAM, ~, Params)\
typedef BOOST_PP_CAT(V, Size) type;\
};\
@ -147,6 +147,6 @@
BOOST_TYPEOF_TYPEDEF_DECODED_TYPE(Name, Params)\
typedef BOOST_PP_CAT(iter, Size) iter;\
};\
}}}
BOOST_TYPEOF_END_ENCODE_NS
#endif//BOOST_TYPEOF_TEMPLATE_ENCODING_HPP_INCLUDED

View File

@ -1,7 +1,7 @@
// Copyright (C) 2005 Peder Holt
// Copyright (C) 2005 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_TYPEOF_TEMPLATE_TEMPLATE_PARAM_HPP_INCLUDED
#define BOOST_TYPEOF_TEMPLATE_TEMPLATE_PARAM_HPP_INCLUDED
@ -23,12 +23,12 @@
//Encode / decode this
#define BOOST_TYPEOF_TEMPLATE_PARAM_ENCODE(This, n)\
typedef typename encode_template<BOOST_PP_CAT(V, n),\
typedef typename boost::type_of::encode_template<BOOST_PP_CAT(V, n),\
BOOST_PP_CAT(P, n)<BOOST_TYPEOF_SEQ_ENUM(BOOST_TYPEOF_MAKE_OBJS(BOOST_TYPEOF_TEMPLATE_PARAM_GETPARAMS(This)),BOOST_TYPEOF_PLACEHOLDER) >\
>::type BOOST_PP_CAT(V, BOOST_PP_INC(n));
#define BOOST_TYPEOF_TEMPLATE_PARAM_DECODE(This, n)\
typedef decode_template< BOOST_PP_CAT(iter, n) > BOOST_PP_CAT(d, n);\
typedef boost::type_of::decode_template< BOOST_PP_CAT(iter, n) > BOOST_PP_CAT(d, n);\
typedef typename BOOST_PP_CAT(d, n)::type BOOST_PP_CAT(P, n);\
typedef typename BOOST_PP_CAT(d, n)::iter BOOST_PP_CAT(iter,BOOST_PP_INC(n));
@ -51,22 +51,22 @@
////////////////////////////
// move to encode_decode?
BOOST_TYPEOF_BEGIN_ENCODE_NS
template<class V, class Type_Not_Registered_With_Typeof_System> struct encode_template_impl;
template<class T, class Iter> struct decode_template_impl;
BOOST_TYPEOF_END_ENCODE_NS
namespace boost { namespace type_of {
namespace
{
template<class V, class Type_Not_Registered_With_Typeof_System> struct encode_template_impl;
template<class T, class Iter> struct decode_template_impl;
}
template<class V, class T> struct encode_template
: encode_template_impl<V, T>
: BOOST_TYPEOF_ENCODE_NS_QUALIFIER::encode_template_impl<V, T>
{};
template<class Iter> struct decode_template
: decode_template_impl<typename Iter::type, typename Iter::next>
: BOOST_TYPEOF_ENCODE_NS_QUALIFIER::decode_template_impl<typename Iter::type, typename Iter::next>
{};
}}
////////////////////////////
@ -81,10 +81,10 @@ namespace boost { namespace type_of {
BOOST_PP_ENUM_PARAMS(\
BOOST_PP_SEQ_SIZE(Params),\
P)> >\
: push_back<V, mpl::size_t<ID> >\
: boost::type_of::push_back<V, boost::mpl::size_t<ID> >\
{\
};\
template<class Iter> struct decode_template_impl<mpl::size_t<ID>, Iter>\
template<class Iter> struct decode_template_impl<boost::mpl::size_t<ID>, Iter>\
{\
BOOST_PP_REPEAT(BOOST_PP_SEQ_SIZE(Params),BOOST_TYPEOF_TYPEDEF_INT_PN,_)\
typedef Name<BOOST_TYPEOF_SEQ_ENUM(Params,BOOST_TYPEOF_PLACEHOLDER) > type;\

View File

@ -1,6 +1,6 @@
// Copyright (C) 2004 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_TYPEOF_TYPE_ENCODING_HPP_INCLUDED
#define BOOST_TYPEOF_TYPE_ENCODING_HPP_INCLUDED
@ -8,18 +8,18 @@
#define BOOST_TYPEOF_REGISTER_TYPE_IMPL(T, Id) \
\
template<class V> struct encode_type_impl<V, T > \
: push_back<V, mpl::size_t<Id> > \
: boost::type_of::push_back<V, boost::mpl::size_t<Id> > \
{}; \
template<class Iter> struct decode_type_impl<mpl::size_t<Id>, Iter> \
template<class Iter> struct decode_type_impl<boost::mpl::size_t<Id>, Iter> \
{ \
typedef T type; \
typedef Iter iter; \
};
#define BOOST_TYPEOF_REGISTER_TYPE_EXPLICIT_ID(Type, Id) \
namespace boost { namespace type_of { namespace { \
BOOST_TYPEOF_REGISTER_TYPE_IMPL(Type, Id) \
}}}
BOOST_TYPEOF_BEGIN_ENCODE_NS \
BOOST_TYPEOF_REGISTER_TYPE_IMPL(Type, Id) \
BOOST_TYPEOF_END_ENCODE_NS
#define BOOST_TYPEOF_REGISTER_TYPE(Type) \
BOOST_TYPEOF_REGISTER_TYPE_EXPLICIT_ID(Type, BOOST_TYPEOF_UNIQUE_ID())

View File

@ -1,6 +1,6 @@
// Copyright (C) 2005 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_TYPEOF_TYPE_TEMPLATE_PARAM_HPP_INCLUDED
#define BOOST_TYPEOF_TYPE_TEMPLATE_PARAM_HPP_INCLUDED
@ -19,13 +19,13 @@
// TYPE_PARAM "virtual functions" implementation
#define BOOST_TYPEOF_TYPE_PARAM_ENCODE(This, n)\
typedef typename encode_type<\
typedef typename boost::type_of::encode_type<\
BOOST_PP_CAT(V, n),\
BOOST_PP_CAT(P, n)\
>::type BOOST_PP_CAT(V, BOOST_PP_INC(n));
#define BOOST_TYPEOF_TYPE_PARAM_DECODE(This, n)\
typedef decode_type< BOOST_PP_CAT(iter, n) > BOOST_PP_CAT(d, n);\
typedef boost::type_of::decode_type< BOOST_PP_CAT(iter, n) > BOOST_PP_CAT(d, n);\
typedef typename BOOST_PP_CAT(d, n)::type BOOST_PP_CAT(P, n);\
typedef typename BOOST_PP_CAT(d, n)::iter BOOST_PP_CAT(iter, BOOST_PP_INC(n));

View File

@ -1,6 +1,6 @@
// Copyright (C) 2004 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_TYPEOF_TYPEOF_HPP_INCLUDED
#define BOOST_TYPEOF_TYPEOF_HPP_INCLUDED
@ -87,7 +87,7 @@
# else
# error typeof emulation is not supported
# endif
# elif (_MSC_VER == 1310) // 7.1
# elif (_MSC_VER >= 1310) // 7.1, 8.0
# ifndef BOOST_TYPEOF_EMULATION
# ifndef BOOST_TYPEOF_NATIVE
# define BOOST_TYPEOF_NATIVE
@ -95,14 +95,32 @@
# include <boost/typeof/msvc/typeof_impl.hpp>
# define MSVC_TYPEOF_HACK
# endif
# else // 8.0
/*# else // 8.0
# ifndef BOOST_TYPEOF_NATIVE
# ifndef BOOST_TYPEOF_EMULATION
# define BOOST_TYPEOF_EMULATION
# endif
# else
# error native typeof is not supported
# endif*/
# endif
#elif defined(__HP_aCC)
# ifndef BOOST_TYPEOF_NATIVE
# ifndef BOOST_TYPEOF_EMULATION
# define BOOST_TYPEOF_EMULATION
# endif
# else
# error native typeof is not supported
# endif
#elif defined(__DECCXX)
# ifndef BOOST_TYPEOF_NATIVE
# ifndef BOOST_TYPEOF_EMULATION
# define BOOST_TYPEOF_EMULATION
# endif
# else
# error native typeof is not supported
# endif
#else //unknown compiler
@ -122,10 +140,11 @@
BOOST_TYPEOF_REGISTRATION_GROUP * 0x10000 + __LINE__
#define BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()\
<boost/typeof/increment_registration_group.hpp>
<boost/typeof/incr_registration_group.hpp>
#ifdef BOOST_TYPEOF_EMULATION
# define BOOST_TYPEOF_TEXT "using typeof emulation"
# include <boost/typeof/message.hpp>
# include <boost/typeof/typeof_impl.hpp>
# include <boost/typeof/type_encoding.hpp>
# include <boost/typeof/template_encoding.hpp>
@ -136,32 +155,12 @@
#elif defined(BOOST_TYPEOF_NATIVE)
# define BOOST_TYPEOF_TEXT "using native typeof"
# ifndef MSVC_TYPEOF_HACK
namespace boost { namespace type_of {
template<class T> T& ensure_obj(const T&);
}}
# define BOOST_TYPEOF(expr) BOOST_TYPEOF_KEYWORD(boost::type_of::ensure_obj(expr))
# define BOOST_TYPEOF_TPL BOOST_TYPEOF
# define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
struct name {\
typedef BOOST_TYPEOF_TPL(expr) type;\
};
# define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
struct name {\
typedef BOOST_TYPEOF(expr) type;\
};
# endif
# define BOOST_TYPEOF_REGISTER_TYPE(x)
# define BOOST_TYPEOF_REGISTER_TEMPLATE(x, params)
# include <boost/typeof/message.hpp>
# include <boost/typeof/native.hpp>
#else
# error typeof configuration error
#endif
#include <boost/typeof/message.hpp>
#include <boost/typeof/binding_workaround.hpp>
// auto
#define BOOST_AUTO(Var, Expr) BOOST_TYPEOF(Expr) Var = Expr
#define BOOST_AUTO_TPL(Var, Expr) BOOST_TYPEOF_TPL(Expr) Var = Expr

View File

@ -1,7 +1,7 @@
// Copyright (C) 2004, 2005 Arkadiy Vertleyb
// Copyright (C) 2005 Peder Holt
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_TYPEOF_TYPEOF_IMPL_HPP_INCLUDED
#define BOOST_TYPEOF_TYPEOF_IMPL_HPP_INCLUDED
@ -10,14 +10,16 @@
#include <boost/preprocessor/repetition/enum.hpp>
#include <boost/typeof/encode_decode.hpp>
#include <boost/typeof/vector.hpp>
#include <boost/type_traits/is_function.hpp>
#include <boost/utility/enable_if.hpp>
#define BOOST_TYPEOF_VECTOR(n) BOOST_PP_CAT(boost::type_of::vector, n)
#define BOOST_TYPEOF_sizer_item(z, n, _)\
char item ## n[V::item ## n ::value];
namespace boost { namespace type_of {
template<class V>
namespace boost { namespace type_of {
template<class V>
struct sizer
{
// char item0[V::item0::value];
@ -26,13 +28,28 @@ namespace boost { namespace type_of {
BOOST_PP_REPEAT(BOOST_TYPEOF_LIMIT_SIZE, BOOST_TYPEOF_sizer_item, ~)
};
template<class V,class T>
sizer<typename encode_type<V, T>::type> encode(const T&);
}}
#undef BOOST_TYPEOF_sizer_item
//
namespace boost { namespace type_of {
# ifdef BOOST_NO_SFINAE
template<class V, class T>
sizer<typename encode_type<V, T>::type> encode(const T&);
# else
template<class V, class T>
typename enable_if<
typename is_function<T>::type,
sizer<typename encode_type<V, T>::type> >::type encode(T&);
template<class V, class T>
typename disable_if<
typename is_function<T>::type,
sizer<typename encode_type<V, T>::type> >::type encode(const T&);
# endif
}}
//
namespace boost { namespace type_of {
template<class V>
@ -55,7 +72,7 @@ namespace boost { namespace type_of {
#define BOOST_TYPEOF_TPL typename BOOST_TYPEOF
//offset_vector is used to delay the insertion of data into the vector in order to allow
//offset_vector is used to delay the insertion of data into the vector in order to allow
//encoding to be done in many steps
namespace boost { namespace type_of {
template<typename V,typename Offset>
@ -77,6 +94,18 @@ namespace boost { namespace type_of {
BOOST_STATIC_CONSTANT(int,BOOST_PP_CAT(value,n) = sizeof(boost::type_of::encode<_typeof_start_vector>(expr).item ## n));\
typedef boost::mpl::size_t<BOOST_PP_CAT(value,n)> BOOST_PP_CAT(item,n);
#ifdef __DMC__
#define BOOST_TYPEOF_NESTED_TYPEITEM_2(z,n,expr)\
typedef typename _typeof_encode_fraction<iteration>::BOOST_PP_CAT(item,n) BOOST_PP_CAT(item,n);
#define BOOST_TYPEOF_FRACTIONTYPE()\
BOOST_PP_REPEAT(BOOST_TYPEOF_LIMIT_SIZE,BOOST_TYPEOF_NESTED_TYPEITEM_2,_)\
typedef _typeof_fraction_iter<Pos> fraction_type;
#else
#define BOOST_TYPEOF_FRACTIONTYPE()\
typedef _typeof_encode_fraction<iteration> fraction_type;
#endif
#define BOOST_TYPEOF_NESTED_TYPEDEF_IMPL(expr) \
template<int _Typeof_Iteration>\
struct _typeof_encode_fraction {\
@ -89,10 +118,24 @@ namespace boost { namespace type_of {
BOOST_STATIC_CONSTANT(int,pos=(Pos::value));\
BOOST_STATIC_CONSTANT(int,iteration=(pos/BOOST_TYPEOF_LIMIT_SIZE));\
BOOST_STATIC_CONSTANT(int,where=pos%BOOST_TYPEOF_LIMIT_SIZE);\
typedef typename boost::type_of::v_iter<_typeof_encode_fraction<iteration>,boost::mpl::int_<where> >::type type;\
BOOST_TYPEOF_FRACTIONTYPE()\
typedef typename boost::type_of::v_iter<fraction_type,boost::mpl::int_<where> >::type type;\
typedef _typeof_fraction_iter<typename Pos::next> next;\
};
#ifdef __MWERKS__
# define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
template<typename T>\
struct BOOST_PP_CAT(_typeof_template_,name) {\
BOOST_TYPEOF_NESTED_TYPEDEF_IMPL(expr)\
typedef typename boost::type_of::decode_type<_typeof_fraction_iter<boost::mpl::size_t<0> > >::type type;\
};\
typedef BOOST_PP_CAT(_typeof_template_,name)<int> name;
# define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) BOOST_TYPEOF_NESTED_TYPEDEF(name,expr)
#else
# define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
struct name {\
BOOST_TYPEOF_NESTED_TYPEDEF_IMPL(expr)\
@ -104,5 +147,6 @@ namespace boost { namespace type_of {
BOOST_TYPEOF_NESTED_TYPEDEF_IMPL(expr)\
typedef boost::type_of::decode_type<_typeof_fraction_iter<boost::mpl::size_t<0> > >::type type;\
};
#endif
#endif//BOOST_TYPEOF_COMPLIANT_TYPEOF_IMPL_HPP_INCLUDED

View File

@ -1,3 +1,9 @@
<!--
Copyright (C) 2006 Arkadiy Vertleyb
Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
-->
<html>
<head>
<meta http-equiv="refresh" content="0; URL=../../doc/html/typeof.html">

View File

@ -1,79 +0,0 @@
# Boost Typeof Library test Jamfile
subproject libs/typeof/test ;
# bring in rules for testing
import testing ;
local rule special-requirements ( toolset variant : properties * )
{
# Tru64/CXX6.5 hangs on most tests, so just turn it off completely.
if $(UNIX) && $(OS) = OSF
{
switch $(toolset)
{
case tru64cxx65* : properties =
[ replace-properties $(properties) : <build>no ] ;
}
}
return $(properties) ;
}
test-suite "typeof"
:
[ compile type.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : type_native ]
[ compile type.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : type_emulation ]
[ compile template_type.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : template_type_native ]
[ compile template_type.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : template_type_emulation ]
[ compile template_int.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : template_int_native ]
[ compile template_int.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : template_int_emulation ]
[ compile template_tpl.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : template_tpl_native ]
[ compile template_tpl.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : template_tpl_emulation ]
[ compile template_enum.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : template_enum_native ]
[ compile template_enum.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : template_enum_emulation ]
[ compile template_dependent.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : template_dependent_native ]
[ compile template_dependent.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : template_dependent_emulation ]
[ compile template_multiword.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : template_multiword_native ]
[ compile template_multiword.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : template_multiword_emulation ]
[ compile modifiers.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : modifiers_native ]
[ compile modifiers.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : modifiers_emulation ]
[ compile function.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : function_native ]
[ compile function.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : function_emulation ]
[ compile function_ptr.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : function_ptr_native ]
[ compile function_ptr.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : function_ptr_emulation ]
[ compile function_ref.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : function_ref_native ]
[ compile function_ref.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : function_ref_emulation ]
[ compile member_function.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : member_function_native ]
[ compile member_function.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : member_function_emulation ]
[ compile data_member.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : data_member_native ]
[ compile data_member.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : data_member_emulation ]
[ compile noncopyable.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : noncopyable_native ]
[ compile noncopyable.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : noncopyable_emulation ]
[ compile std.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : std_native ]
[ compile std.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : std_emulation ]
[ run odr1.cpp odr2.cpp : : : <define>BOOST_TYPEOF_NATIVE special-requirements : odr_native ]
[ run odr1.cpp odr2.cpp : : : <define>BOOST_TYPEOF_COMPLIANT special-requirements : odr_emulation ]
[ compile function_ptr_from_tpl.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : function_ptr_from_tpl_native ]
[ compile function_ptr_from_tpl.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : function_ptr_from_tpl_emulation ]
[ compile nested_typedef.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : nested_typedef_native ]
[ compile nested_typedef.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : nested_typedef_emulation ]
;

View File

@ -1,3 +1,8 @@
# Copyright (C) 2006 Vladimir Prus
# Copyright (C) 2006 Arkadiy Vertleyb
# Use, modification and distribution is subject to the Boost Software
# License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
# Boost Typeof Library test Jamfile
import set ;
@ -24,7 +29,7 @@ rule typeof-test ( source )
{
return [ compile $(source) : <define>BOOST_TYPEOF_NATIVE :
$(source:B)_native ]
[ compile $(source) : <define>BOOST_TYPEOF_COMPLIANT :
[ compile $(source) : <define>BOOST_TYPEOF_EMULATION :
$(source:B)_emulation ]
;
}
@ -32,14 +37,17 @@ rule typeof-test ( source )
rule all-tests ( )
{
local all ;
for local t in [ set.difference [ glob *.cpp ] : odr1.cpp odr2.cpp ]
# for local t in [ set.difference [ glob *.cpp ] : odr1.cpp odr2.cpp ]
for local t in [ set.difference [ glob *.cpp ] : [ glob odr*.cpp ] ]
{
all += [ typeof-test $(t) ] ;
}
all += [ run odr1.cpp odr2.cpp : : : <define>BOOST_TYPEOF_NATIVE :
odr_native ] ;
all += [ run odr1.cpp odr2.cpp : : : <define>BOOST_TYPEOF_COMPLIANT :
all += [ run odr1.cpp odr2.cpp : : : <define>BOOST_TYPEOF_EMULATION :
odr_emulation ] ;
all += [ run odr_no_uns1.cpp odr_no_uns2.cpp : : : <define>BOOST_TYPEOF_EMULATION :
odr_no_uns ] ;
return $(all) ;
}

View File

@ -1,3 +1,7 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "test.hpp"
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()

View File

@ -1,3 +1,7 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "test.hpp"
BOOST_STATIC_ASSERT(boost::type_of::test<void()>::value);

14
test/function_binding.cpp Executable file
View File

@ -0,0 +1,14 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include <boost/typeof/typeof.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/static_assert.hpp>
int foo(double);
typedef int(&FREF)(double);
FREF fref = *foo;
BOOST_STATIC_ASSERT((boost::is_same<BOOST_TYPEOF(fref), int(double)>::value));

View File

@ -1,6 +1,19 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "test.hpp"
BOOST_STATIC_ASSERT(boost::type_of::test<double(*)()>::value);
BOOST_STATIC_ASSERT(boost::type_of::test<double(*)(int, double, short, char*, bool, char, float, long, unsigned short)>::value);
BOOST_STATIC_ASSERT(boost::type_of::test<void(*)()>::value);
BOOST_STATIC_ASSERT(boost::type_of::test<void(*)(int, double, short, char*, bool, char, float, long, unsigned short)>::value);
// check that const gets stripped from function pointer
int foo(double);
typedef int(*PTR)(double);
typedef const PTR CPTR;
CPTR cptr = foo;
BOOST_STATIC_ASSERT((boost::is_same<BOOST_TYPEOF(cptr), PTR>::value));

View File

@ -1,3 +1,7 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include <boost/typeof/typeof.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/static_assert.hpp>

View File

@ -1,3 +1,7 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "test.hpp"
BOOST_STATIC_ASSERT(boost::type_of::test<void(&)()>::value);

View File

@ -1,3 +1,7 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "test.hpp"
BOOST_STATIC_ASSERT(boost::type_of::test<double(*)()>::value);

View File

@ -1,3 +1,7 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "test.hpp"
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()

View File

@ -1,3 +1,7 @@
// Copyright (C) 2006 Peder Holt
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include <boost/typeof/typeof.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/static_assert.hpp>
@ -8,7 +12,7 @@ void do_int(int) {}
struct {
template<typename T>
T operator[](const T&) {}
T operator[](const T& n) {return n;}
} int_p;

View File

@ -1,3 +1,7 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "test.hpp"
#include <boost/noncopyable.hpp>
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()

View File

@ -1,3 +1,9 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
// boostinspect:nounnamed
#include <boost/typeof/typeof.hpp>
struct foo

View File

@ -1,3 +1,7 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "odr.hpp"
#include <iostream>

View File

@ -1 +1,5 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "odr.hpp"

20
test/odr_no_uns1.cpp Executable file
View File

@ -0,0 +1,20 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Copyright (C) 2006 Peder Holt
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "odr_no_uns1.hpp"
#include "odr_no_uns2.hpp"
void odr_no_uns1()
{
odr_test_1 t1;
odr_test_2 t2;
BOOST_AUTO(v1, t1);
BOOST_AUTO(v2, t2);
}
int main()
{
return 0;
}

19
test/odr_no_uns1.hpp Executable file
View File

@ -0,0 +1,19 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Copyright (C) 2006 Peder Holt
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_TYPEOF_ODR_NO_UNS1_HPP_INCLUDED
#define BOOST_TYPEOF_ODR_NO_UNS1_HPP_INCLUDED
#define BOOST_TYPEOF_SUPPRESS_UNNAMED_NAMESPACE
#include <boost/typeof/typeof.hpp>
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
struct odr_test_1
{};
BOOST_TYPEOF_REGISTER_TYPE(odr_test_1)
#endif//BOOST_TYPEOF_ODR_NO_UNS1_HPP_INCLUDED

15
test/odr_no_uns2.cpp Executable file
View File

@ -0,0 +1,15 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Copyright (C) 2006 Peder Holt
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "odr_no_uns2.hpp"
#include "odr_no_uns1.hpp"
void odr_no_uns2()
{
odr_test_1 t1;
odr_test_2 t2;
BOOST_AUTO(v1, t1);
BOOST_AUTO(v2, t2);
}

19
test/odr_no_uns2.hpp Executable file
View File

@ -0,0 +1,19 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Copyright (C) 2006 Peder Holt
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_TYPEOF_ODR_NO_UNS2_HPP_INCLUDED
#define BOOST_TYPEOF_ODR_NO_UNS2_HPP_INCLUDED
#define BOOST_TYPEOF_SUPPRESS_UNNAMED_NAMESPACE
#include <boost/typeof/typeof.hpp>
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
struct odr_test_2
{};
BOOST_TYPEOF_REGISTER_TYPE(odr_test_2)
#endif//BOOST_TYPEOF_ODR_NO_UNS2_HPP_INCLUDED

View File

@ -1,3 +1,7 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "test.hpp"
#include <boost/typeof/std/string.hpp>

View File

@ -1,3 +1,7 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "test.hpp"
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()

View File

@ -1,3 +1,7 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "test.hpp"
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()

View File

@ -1,3 +1,7 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "test.hpp"
#include <climits>

View File

@ -1,3 +1,7 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "test.hpp"
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()

View File

@ -1,3 +1,7 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "test.hpp"
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()

View File

@ -1,3 +1,7 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "test.hpp"
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()

View File

@ -1,3 +1,7 @@
// Copyright (C) 2006 Arkadiy Vertleyb
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#include "test.hpp"
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()