Compare commits

...

10 Commits

Author SHA1 Message Date
c17e6df07a Release 1.46.1
[SVN r69890]
2011-03-12 15:41:16 +00:00
4fab1b5d17 fix typeof bug on msvc-7.1 that is causing type_traits/common_type.hpp to fail to compile
[SVN r66662]
2010-11-21 21:42:52 +00:00
85eed8ff60 from trunk: Updated documentation of typeof, added documentation for BOOST_TYPEOF_MESSAGE
[SVN r66131]
2010-10-21 09:39:55 +00:00
81e54ccb1f Integrated from trunk:
#4593	Type_of does not use BOOST_TYPEOF_EMULATION for VC10 and \Za
#3520	Syntax Error in boost/typeof/typeof.hpp
#4605	Make BOOST_TYPEOF_SILENT default
Apply variadic functions patch from Sergey Zubkovsky.
Allow inclusion of typeof.hpp for compilers (borland) that does not support typeof emulation or native typeof. For these compilers, BOOST_TYPEOF_EMULATION_UNSUPPORTED will be defined, and BOOST_TYPEOF(Expr) will always result in boost::type_of::typeof_emulation_is_unsupported_on_this_compiler

[SVN r66130]
2010-10-21 09:34:15 +00:00
e9749f185f From trunk: Allow inclusion of typeof.hpp for compilers (borland) that does not support typeof emulation or native typeof. For these compilers, BOOST_TYPEOF_EMULATION_UNSUPPORTED will be defined, and BOOST_TYPEOF(Expr) will always result in boost::type_of::typeof_emulation_is_unsupported_on_this_compiler
[SVN r66129]
2010-10-21 09:26:45 +00:00
bfb19140f1 Merge documentation fixes.
* Use `doc/src/*.css` instead of `doc/html/*.css`.
* Remove wiki and people directories.
* Some documentation fixes.
* Left out `minimal.css` changes and boostbook changes because of clashes.


[SVN r63347]
2010-06-26 12:30:09 +00:00
4aab62e71c rm cmake from the release branch before it goes out broken. Policy dictates that you never commit to release, you commit to trunk and merge to release.
[SVN r56941]
2009-10-17 01:10:45 +00:00
0f21fe555a Add basic copyright/license to keep cmake out of the inspection report
[SVN r55095]
2009-07-22 21:51:01 +00:00
ef283a6a74 Merge several documentation fixes. Plus a small inspect fix.
Merged revisions 50798-50799,50837-50839,50847-50848 via svnmerge from 
https://svn.boost.org/svn/boost/trunk

........
  r50798 | danieljames | 2009-01-26 23:14:53 +0000 (Mon, 26 Jan 2009) | 5 lines
  
  Make checking for duplicated names case insensitive.
  
  This avoids generating filenames with names that only differ by case as they
  cause problems on case insensitive file systems.
........
  r50799 | danieljames | 2009-01-26 23:29:52 +0000 (Mon, 26 Jan 2009) | 1 line
  
  Label the line ending inspect errors.
........
  r50837 | danieljames | 2009-01-28 09:14:21 +0000 (Wed, 28 Jan 2009) | 1 line
  
  Add scope exit to the root html file.
........
  r50838 | danieljames | 2009-01-28 09:14:45 +0000 (Wed, 28 Jan 2009) | 1 line
  
  Fix a link in the typeof forwarding html file.
........
  r50839 | danieljames | 2009-01-28 09:14:56 +0000 (Wed, 28 Jan 2009) | 1 line
  
  Fix an incorrectly escaped right arrow.
........
  r50847 | danieljames | 2009-01-28 15:17:34 +0000 (Wed, 28 Jan 2009) | 2 lines
  
  Fix some documentation issues with scope_exit.
........
  r50848 | danieljames | 2009-01-28 15:32:46 +0000 (Wed, 28 Jan 2009) | 1 line
  
  Generate the scope_exit documentation.
........


[SVN r50849]
2009-01-28 15:53:42 +00:00
33ae5341c1 merge of cmake build files from trunk per beman
[SVN r50756]
2009-01-24 18:57:20 +00:00
77 changed files with 134 additions and 25 deletions

View File

@ -10,6 +10,7 @@ boostbook standalone
:
typeof
:
<xsl:param>boost.root=../../../..
<xsl:param>nav.layout=none
<xsl:param>navig.graphics=0
;

View File

@ -1,4 +1,4 @@
[library Boost.Typeof
[library Boost.Typeof
[authors [Vertleyb, Arkadiy], [Holt, Peder]]
[copyright 2004 2005 Arkadiy Vertleyb, Peder Holt]
[license
@ -383,6 +383,14 @@ Redefine if you want the Typeof Library to handle functions with more parameters
[endsect]
[section:messages MESSAGES]
Define `BOOST_TYPEOF_MESSAGE` before including boost/typeof/typeof.hpp to
include messages "using typeof emulation" and "using native typeof".
By default, these messages will not be displayed.
[endsect]
[section:limit_size LIMIT_SIZE]
The `BOOST_TYPEOF_LIMIT_SIZE` macro defines the size of the compile-time sequence

0
include/boost/typeof/dmc/typeof_impl.hpp Executable file → Normal file
View File

0
include/boost/typeof/encode_decode.hpp Executable file → Normal file
View File

0
include/boost/typeof/encode_decode_params.hpp Executable file → Normal file
View File

0
include/boost/typeof/incr_registration_group.hpp Executable file → Normal file
View File

0
include/boost/typeof/int_encoding.hpp Executable file → Normal file
View File

0
include/boost/typeof/integral_template_param.hpp Executable file → Normal file
View File

2
include/boost/typeof/message.hpp Executable file → Normal file
View File

@ -2,7 +2,7 @@
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
#if defined(_MSC_VER) && !defined BOOST_TYPEOF_SILENT
#if defined(_MSC_VER) && defined BOOST_TYPEOF_MESSAGES
# pragma message(BOOST_TYPEOF_TEXT)
#endif
#undef BOOST_TYPEOF_TEXT

0
include/boost/typeof/modifiers.hpp Executable file → Normal file
View File

4
include/boost/typeof/msvc/typeof_impl.hpp Executable file → Normal file
View File

@ -153,7 +153,9 @@ namespace boost
};
};
# endif
# if BOOST_WORKAROUND(BOOST_MSVC,==1310)
// EAN: preprocess this block out on advice of Peder Holt
// to eliminate errors in type_traits/common_type.hpp
# if 0 //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;

0
include/boost/typeof/native.hpp Executable file → Normal file
View File

0
include/boost/typeof/pointers_data_members.hpp Executable file → Normal file
View File

19
include/boost/typeof/register_functions.hpp Executable file → Normal file
View File

@ -24,12 +24,19 @@
enum
{
FUN_ID = BOOST_TYPEOF_UNIQUE_ID(),
FUN_PTR_ID = FUN_ID + 1 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
FUN_REF_ID = FUN_ID + 2 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
MEM_FUN_ID = FUN_ID + 3 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
CONST_MEM_FUN_ID = FUN_ID + 4 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
VOLATILE_MEM_FUN_ID = FUN_ID + 5 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
VOLATILE_CONST_MEM_FUN_ID = FUN_ID + 6 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY)
FUN_PTR_ID = FUN_ID + 1 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
FUN_REF_ID = FUN_ID + 2 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
MEM_FUN_ID = FUN_ID + 3 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
CONST_MEM_FUN_ID = FUN_ID + 4 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
VOLATILE_MEM_FUN_ID = FUN_ID + 5 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
VOLATILE_CONST_MEM_FUN_ID = FUN_ID + 6 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
FUN_VAR_ID = FUN_ID + 7 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
FUN_VAR_PTR_ID = FUN_ID + 8 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
FUN_VAR_REF_ID = FUN_ID + 9 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
MEM_FUN_VAR_ID = FUN_ID + 10 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
CONST_MEM_FUN_VAR_ID = FUN_ID + 11 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
VOLATILE_MEM_FUN_VAR_ID = FUN_ID + 12 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
VOLATILE_CONST_MEM_FUN_VAR_ID = FUN_ID + 13 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY)
};
BOOST_TYPEOF_BEGIN_ENCODE_NS

48
include/boost/typeof/register_functions_iterate.hpp Executable file → Normal file
View File

@ -15,6 +15,13 @@ struct encode_type_impl<V, R(*)(BOOST_PP_ENUM_PARAMS(n, P))>
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_VAR_PTR_ID + n) type;
};
template<class Iter>
struct decode_type_impl<boost::mpl::size_t<FUN_PTR_ID + n>, Iter>
{
@ -24,6 +31,15 @@ struct decode_type_impl<boost::mpl::size_t<FUN_PTR_ID + n>, Iter>
typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
};
template<class Iter>
struct decode_type_impl<boost::mpl::size_t<FUN_VAR_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
// function references
@ -35,6 +51,13 @@ struct decode_type_impl<boost::mpl::size_t<FUN_PTR_ID + n>, Iter>
typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_REF_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_VAR_REF_ID + n) type;
};
template<class Iter>
struct decode_type_impl<boost::mpl::size_t<FUN_REF_ID + n>, Iter>
{
@ -44,6 +67,15 @@ struct decode_type_impl<boost::mpl::size_t<FUN_PTR_ID + n>, Iter>
typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
};
template<class Iter>
struct decode_type_impl<boost::mpl::size_t<FUN_VAR_REF_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;
};
// functions
template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
@ -53,6 +85,13 @@ struct decode_type_impl<boost::mpl::size_t<FUN_PTR_ID + n>, Iter>
typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_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_VAR_ID + n) type;
};
template<class Iter>
struct decode_type_impl<boost::mpl::size_t<FUN_ID + n>, Iter>
{
@ -62,6 +101,15 @@ struct decode_type_impl<boost::mpl::size_t<FUN_PTR_ID + n>, Iter>
typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
};
template<class Iter>
struct decode_type_impl<boost::mpl::size_t<FUN_VAR_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;
};
#endif//BOOST_TYPEOF_NO_FUNCTION_TYPES
#ifndef BOOST_TYPEOF_NO_MEMBER_FUNCTION_TYPES

0
include/boost/typeof/register_fundamental.hpp Executable file → Normal file
View File

0
include/boost/typeof/register_mem_functions.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/bitset.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/complex.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/deque.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/fstream.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/functional.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/iostream.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/istream.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/iterator.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/list.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/locale.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/map.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/memory.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/ostream.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/queue.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/set.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/sstream.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/stack.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/streambuf.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/string.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/utility.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/valarray.hpp Executable file → Normal file
View File

0
include/boost/typeof/std/vector.hpp Executable file → Normal file
View File

0
include/boost/typeof/template_encoding.hpp Executable file → Normal file
View File

0
include/boost/typeof/template_template_param.hpp Executable file → Normal file
View File

0
include/boost/typeof/type_encoding.hpp Executable file → Normal file
View File

0
include/boost/typeof/type_template_param.hpp Executable file → Normal file
View File

44
include/boost/typeof/typeof.hpp Executable file → Normal file
View File

@ -15,7 +15,7 @@
#if defined(__COMO__)
# ifdef __GNUG__
# ifndef(BOOST_TYPEOF_EMULATION)
# ifndef BOOST_TYPEOF_EMULATION
# ifndef BOOST_TYPEOF_NATIVE
# define BOOST_TYPEOF_NATIVE
# endif
@ -65,7 +65,7 @@
# endif
# define BOOST_TYPEOF_KEYWORD __typeof__
# else
# error typeof emulation is not supported
# define BOOST_TYPEOF_EMULATION_UNSUPPORTED
# endif
# else // 9.x
# ifndef BOOST_TYPEOF_EMULATION
@ -75,7 +75,22 @@
# define BOOST_TYPEOF_KEYWORD __typeof__
# endif
# endif
#elif defined __CODEGEARC__
# ifndef BOOST_TYPEOF_EMULATION
# ifndef BOOST_TYPEOF_NATIVE
# define BOOST_TYPEOF_EMULATION_UNSUPPORTED
# endif
# else
# define BOOST_TYPEOF_EMULATION_UNSUPPORTED
# endif
#elif defined __BORLANDC__
# ifndef BOOST_TYPEOF_EMULATION
# ifndef BOOST_TYPEOF_NATIVE
# define BOOST_TYPEOF_EMULATION_UNSUPPORTED
# endif
# else
# define BOOST_TYPEOF_EMULATION_UNSUPPORTED
# endif
#elif defined __DMC__
# ifndef BOOST_TYPEOF_EMULATION
# ifndef BOOST_TYPEOF_NATIVE
@ -95,24 +110,21 @@
# else
# error typeof emulation is not supported
# endif
# elif (_MSC_VER >= 1310) // 7.1, 8.0
# elif (_MSC_VER >= 1310) // 7.1 ->
# ifndef BOOST_TYPEOF_EMULATION
# ifndef BOOST_TYPEOF_NATIVE
# define BOOST_TYPEOF_NATIVE
# ifndef _MSC_EXTENSIONS
# define BOOST_TYPEOF_EMULATION
# else
# define BOOST_TYPEOF_NATIVE
# endif
# endif
# endif
# ifdef BOOST_TYPEOF_NATIVE
# include <boost/typeof/msvc/typeof_impl.hpp>
# define MSVC_TYPEOF_HACK
# endif
/*# 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
@ -163,7 +175,9 @@
#define BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()\
<boost/typeof/incr_registration_group.hpp>
#ifdef BOOST_TYPEOF_EMULATION
#ifdef BOOST_TYPEOF_EMULATION_UNSUPPORTED
# include <boost/typeof/unsupported.hpp>
#elif defined BOOST_TYPEOF_EMULATION
# define BOOST_TYPEOF_TEXT "using typeof emulation"
# include <boost/typeof/message.hpp>
# include <boost/typeof/typeof_impl.hpp>

0
include/boost/typeof/typeof_impl.hpp Executable file → Normal file
View File

View File

@ -0,0 +1,29 @@
// Copyright (C) 2010 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_UNSUPPORTED_HPP_INCLUDED
#define BOOST_TYPEOF_UNSUPPORTED_HPP_INCLUDED
namespace boost { namespace type_of {
struct typeof_emulation_is_unsupported_on_this_compiler {};
}}
#define BOOST_TYPEOF(expr) boost::type_of::typeof_emulation_is_unsupported_on_this_compiler
#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;\
};
#define BOOST_TYPEOF_REGISTER_TYPE(x)
#define BOOST_TYPEOF_REGISTER_TEMPLATE(x, params)
#endif

0
include/boost/typeof/vector.hpp Executable file → Normal file
View File

0
include/boost/typeof/vector100.hpp Executable file → Normal file
View File

0
include/boost/typeof/vector150.hpp Executable file → Normal file
View File

0
include/boost/typeof/vector200.hpp Executable file → Normal file
View File

0
include/boost/typeof/vector50.hpp Executable file → Normal file
View File

2
index.html Executable file → Normal file
View File

@ -10,7 +10,7 @@ License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
</head>
<body>
Automatic redirection failed, please go to
<a href="../../doc/html/xpressive.html">../../doc/html/typeof.html</a>
<a href="../../doc/html/typeof.html">../../doc/html/typeof.html</a>
</body>
</html>

0
test/data_member.cpp Executable file → Normal file
View File

0
test/function.cpp Executable file → Normal file
View File

0
test/function_binding.cpp Executable file → Normal file
View File

0
test/function_ptr.cpp Executable file → Normal file
View File

0
test/function_ptr_from_tpl.cpp Executable file → Normal file
View File

0
test/function_ref.cpp Executable file → Normal file
View File

0
test/member_function.cpp Executable file → Normal file
View File

0
test/modifiers.cpp Executable file → Normal file
View File

0
test/noncopyable.cpp Executable file → Normal file
View File

0
test/odr.hpp Executable file → Normal file
View File

0
test/odr1.cpp Executable file → Normal file
View File

0
test/odr2.cpp Executable file → Normal file
View File

0
test/odr_no_uns1.cpp Executable file → Normal file
View File

0
test/odr_no_uns1.hpp Executable file → Normal file
View File

0
test/odr_no_uns2.cpp Executable file → Normal file
View File

0
test/odr_no_uns2.hpp Executable file → Normal file
View File

0
test/std.cpp Executable file → Normal file
View File

0
test/template_dependent.cpp Executable file → Normal file
View File

0
test/template_enum.cpp Executable file → Normal file
View File

0
test/template_int.cpp Executable file → Normal file
View File

0
test/template_multiword.cpp Executable file → Normal file
View File

0
test/template_tpl.cpp Executable file → Normal file
View File

0
test/template_type.cpp Executable file → Normal file
View File

0
test/test.hpp Executable file → Normal file
View File

0
test/type.cpp Executable file → Normal file
View File