Compare commits

..

48 Commits

Author SHA1 Message Date
Rene Rivera
ed7d30939d Fix outdated path to boostbook css. 2016-02-23 21:55:16 -06:00
Daniel James
6aea11f3df Add metadata file. 2015-01-25 20:50:03 +02:00
Peder Holt
e56adea1b1 Integrated from trunc: Applied patch for #5745: Use native typeof support for Oracle Solaris Studio C++ compiler
[SVN r74849]
2011-10-09 13:08:04 +00:00
Eric Niebler
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
Peder Holt
85eed8ff60 from trunk: Updated documentation of typeof, added documentation for BOOST_TYPEOF_MESSAGE
[SVN r66131]
2010-10-21 09:39:55 +00:00
Peder Holt
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
Peder Holt
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
Daniel James
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
Troy D. Straszheim
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
Troy D. Straszheim
0f21fe555a Add basic copyright/license to keep cmake out of the inspection report
[SVN r55095]
2009-07-22 21:51:01 +00:00
Daniel James
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
Troy D. Straszheim
33ae5341c1 merge of cmake build files from trunk per beman
[SVN r50756]
2009-01-24 18:57:20 +00:00
Peder Holt
cde21a588d Merged from trunk: for visual studio 8 and visual studio 9, reverted to using sizeof in 'native' typeof operator as the use of typeid caused compilation error in visual studio source code analysis.
[SVN r42200]
2007-12-20 12:04:40 +00:00
Beman Dawes
3ecb3bf102 Full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41370]
2007-11-25 18:38:02 +00:00
Beman Dawes
1c1ab4c883 Full merge from trunk at revision 41356 of entire boost-root tree.
[SVN r41369]
2007-11-25 18:07:19 +00:00
Beman Dawes
8d8d35c1ae Starting point for releases
[SVN r39706]
2007-10-05 14:25:06 +00:00
nobody
84ec781ea1 This commit was manufactured by cvs2svn to create tag
'Version_1_34_1'.

[SVN r38286]
2007-07-24 19:28:14 +00:00
Arkadiy Vertleyb
f7df17a93a Merged doc fix
[SVN r37564]
2007-05-02 20:03:05 +00:00
Arkadiy Vertleyb
ed21868c25 tutorial text fix
[SVN r36898]
2007-02-06 01:50:40 +00:00
Peder Holt
c66289f7ac From HEAD: Added documentation: BOOST_TYPEOF_NESTED_TYPEDEF can not be used at function/block scope
[SVN r36886]
2007-02-04 09:29:20 +00:00
Rene Rivera
43b4d4522c Remove obsolete Boost.Build v1 files.
[SVN r35880]
2006-11-06 17:10:46 +00:00
Peder Holt
8868adc891 Merged from HEAD: Changed specialization of encode_integral for bool to work around issues with the sun compiler
[SVN r35135]
2006-09-16 17:36:03 +00:00
Arkadiy Vertleyb
452b493b7a merged suppress inspection complain about unnamed ns
[SVN r35119]
2006-09-15 02:19:55 +00:00
Arkadiy Vertleyb
eeff4e592c Merged supress inspection unnamed namespace
[SVN r35118]
2006-09-15 02:11:47 +00:00
Peder Holt
1b65bfc95d Merged from HEAD: Fixed warnings on VC7.1 on integral encoding of bool
[SVN r35110]
2006-09-14 17:39:57 +00:00
Peder Holt
eda5c4afba Merged from HEAD: Added name to copyright.
[SVN r35060]
2006-09-10 17:43:17 +00:00
Arkadiy Vertleyb
340148f738 merged removed tab
[SVN r35057]
2006-09-10 16:55:21 +00:00
Arkadiy Vertleyb
64ba3be86f merged inspection report fixes
[SVN r35053]
2006-09-09 17:43:02 +00:00
nobody
d337b0837a This commit was manufactured by cvs2svn to create branch 'RC_1_34_0'.
[SVN r35052]
2006-09-09 17:25:10 +00:00
Peder Holt
dddbb00da4 Merged from HEAD: DMC support for BOOST_TYPEOF_NESTED_TYPEDEF
[SVN r35049]
2006-09-08 16:21:49 +00:00
Peder Holt
935b36d8f5 Merged from HEAD: Support typeof emulation for DMC: Integral argument support.
[SVN r35024]
2006-09-06 17:12:45 +00:00
Peder Holt
5bd010787a Fixed issues with support for compilers without SFINAE
[SVN r35017]
2006-09-01 19:25:45 +00:00
Peder Holt
55ac93f947 Merged from HEAD Fixed error in code for supporting compilers without SFINAE.
[SVN r35012]
2006-08-31 11:00:14 +00:00
Peder Holt
366ab1b621 Merged from HEAD: Disable enable_if for compiler that does not support it.
[SVN r35000]
2006-08-30 17:18:13 +00:00
Daniel James
aede9c2866 Remove tabs
[SVN r34996]
2006-08-29 21:14:51 +00:00
Peder Holt
2b92bbcb21 Merged from HEAD, Fixed issue with BOOST_TYPEOF_NESTED_TYPEDEF for CW in emulation mode
[SVN r34983]
2006-08-28 16:57:08 +00:00
Gennaro Prota
dff8a5c505 boost guidelines (mainly from inspect tool: tabs, license reference text, etc.); more to do...
[SVN r34753]
2006-07-27 11:48:49 +00:00
Arkadiy Vertleyb
a460694e5d *** empty log message ***
[SVN r34402]
2006-06-25 23:59:21 +00:00
Arkadiy Vertleyb
db9203fb0e merged SUPPRESS_UNNAMED_NAMESPACE
[SVN r34348]
2006-06-18 15:43:26 +00:00
Arkadiy Vertleyb
9a14e20bc5 *** empty log message ***
[SVN r34270]
2006-06-11 12:05:52 +00:00
Arkadiy Vertleyb
47a4b2a2c1 *** empty log message ***
[SVN r34215]
2006-06-07 03:00:58 +00:00
Arkadiy Vertleyb
337fe1fdf6 merged function binding
[SVN r34177]
2006-06-05 02:50:05 +00:00
Arkadiy Vertleyb
11b18afcce merged function binding
[SVN r34176]
2006-06-05 02:43:08 +00:00
Arkadiy Vertleyb
7cbdf2406a Merged fix for VC PCH
[SVN r33800]
2006-04-25 00:57:46 +00:00
Arkadiy Vertleyb
97b9bda347 merged typeof doc id
[SVN r33770]
2006-04-23 12:44:00 +00:00
Peder Holt
041f9cfd24 Merged typo in typeof doc from HEAD
[SVN r33525]
2006-03-29 17:36:53 +00:00
Peder Holt
c17f725e5f Merged doc fix for BOOST_TYPEOF_NESTED_TYPEDEF (removal of tabs in doc) from HEAD
[SVN r33461]
2006-03-23 20:54:37 +00:00
nobody
35874c8e32 This commit was manufactured by cvs2svn to create branch 'RC_1_34_0'.
[SVN r33417]
2006-03-21 02:26:31 +00:00
76 changed files with 174 additions and 64 deletions

View File

@@ -10,11 +10,12 @@ boostbook standalone
:
typeof
:
<xsl:param>boost.root=../../../..
<xsl:param>nav.layout=none
<xsl:param>navig.graphics=0
;
install html : ../../../doc/html/boostbook.css ;
install html : ../../../doc/src/boostbook.css ;
install ../ : ../../../boost.png ;

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 Normal file → Executable file
View File

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

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

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

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

0
include/boost/typeof/integral_template_param.hpp Normal file → Executable file
View 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 Normal file → Executable file
View File

View File

@@ -153,7 +153,60 @@ namespace boost
};
};
# endif
// 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;
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;
@@ -211,18 +264,19 @@ namespace boost
# define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
struct name {\
enum {_typeof_register_value=sizeof(boost::type_of::typeof_register_type<name>(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 {\
enum {_typeof_register_value=sizeof(boost::type_of::typeof_register_type<name>(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
}
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

0
include/boost/typeof/type_template_param.hpp Normal file → Executable file
View 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
@@ -143,7 +155,22 @@
# else
# error native typeof is not supported
# endif
#elif defined(__SUNPRO_CC)
# if (__SUNPRO_CC < 0x590 )
# ifdef BOOST_TYPEOF_NATIVE
# error native typeof is not supported
# endif
# ifndef BOOST_TYPEOF_EMULATION
# define BOOST_TYPEOF_EMULATION
# endif
# else
# ifndef BOOST_TYPEOF_EMULATION
# ifndef BOOST_TYPEOF_NATIVE
# define BOOST_TYPEOF_NATIVE
# endif
# define BOOST_TYPEOF_KEYWORD __typeof__
# endif
# endif
#else //unknown compiler
# ifndef BOOST_TYPEOF_NATIVE
# ifndef BOOST_TYPEOF_EMULATION
@@ -163,7 +190,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 Normal file → Executable 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 Normal file → Executable file
View File

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

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

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

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

16
meta/libraries.json Normal file
View File

@@ -0,0 +1,16 @@
{
"key": "typeof",
"name": "Typeof",
"authors": [
"Arkadiy Vertleyb",
"Peder Holt"
],
"description": "Typeof operator emulation.",
"category": [
"Emulation"
],
"maintainers": [
"Arkadiy Vertleyb <vertleyb -at- hotmail.com>",
"Peder Holt <peder.holt -at- gmail.com>"
]
}

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

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

@@ -6,5 +6,3 @@
BOOST_STATIC_ASSERT(boost::type_of::test<void()>::value);
BOOST_STATIC_ASSERT(boost::type_of::test<double(bool)>::value);
BOOST_STATIC_ASSERT(boost::type_of::test<void(...)>::value);
BOOST_STATIC_ASSERT(boost::type_of::test<float(int, ...)>::value);

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

@@ -7,16 +7,8 @@
#include <boost/type_traits/is_same.hpp>
#include <boost/static_assert.hpp>
int foo1(double);
int foo2(...);
int foo3(int, ...);
typedef int(&FREF1)(double);
typedef int(&FREF2)(...);
typedef int(&FREF3)(int, ...);
FREF1 fref1 = *foo1;
FREF2 fref2 = *foo2;
FREF3 fref3 = *foo3;
int foo(double);
typedef int(&FREF)(double);
FREF fref = *foo;
BOOST_STATIC_ASSERT((boost::is_same<BOOST_TYPEOF(fref1), int(double)>::value));
BOOST_STATIC_ASSERT((boost::is_same<BOOST_TYPEOF(fref2), int(...)>::value));
BOOST_STATIC_ASSERT((boost::is_same<BOOST_TYPEOF(fref3), int(int,...)>::value));
BOOST_STATIC_ASSERT((boost::is_same<BOOST_TYPEOF(fref), int(double)>::value));

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

@@ -8,19 +8,12 @@ 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);
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 foo1(double);
int foo2(...);
typedef int(*PTR1)(double);
typedef int(*PTR2)(...);
typedef const PTR1 CPTR1;
typedef const PTR2 CPTR2;
CPTR1 cptr1 = foo1;
CPTR2 cptr2 = foo2;
int foo(double);
typedef int(*PTR)(double);
typedef const PTR CPTR;
CPTR cptr = foo;
BOOST_STATIC_ASSERT((boost::is_same<BOOST_TYPEOF(cptr1), PTR1>::value));
BOOST_STATIC_ASSERT((boost::is_same<BOOST_TYPEOF(cptr2), PTR2>::value));
BOOST_STATIC_ASSERT((boost::is_same<BOOST_TYPEOF(cptr), PTR>::value));

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

@@ -6,23 +6,15 @@
#include <boost/type_traits/is_same.hpp>
#include <boost/static_assert.hpp>
void f1() {}
void f2(...) {}
void f()
{}
template<class T>
struct tpl1
struct tpl
{
typedef BOOST_TYPEOF_TPL(&f1) type;
typedef BOOST_TYPEOF_TPL(&f) type;
};
template<class T>
struct tpl2
{
typedef BOOST_TYPEOF_TPL(&f2) type;
};
typedef void(*fun1_type)();
typedef void(*fun2_type)(...);
typedef void(*fun_type)();
BOOST_STATIC_ASSERT((boost::is_same<tpl1<void>::type, fun1_type>::value));
BOOST_STATIC_ASSERT((boost::is_same<tpl2<void>::type, fun2_type>::value));
BOOST_STATIC_ASSERT((boost::is_same<tpl<void>::type, fun_type>::value));

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

@@ -6,5 +6,3 @@
BOOST_STATIC_ASSERT(boost::type_of::test<void(&)()>::value);
BOOST_STATIC_ASSERT(boost::type_of::test<int(&)(int, short)>::value);
BOOST_STATIC_ASSERT(boost::type_of::test<int(&)(...)>::value);
BOOST_STATIC_ASSERT(boost::type_of::test<int(&)(int,...)>::value);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

View 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.
# //