From 3c402d13770726d9f97eb797994fe33d8a92ac01 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 11 Dec 2007 17:16:21 +0000 Subject: [PATCH 01/92] Fixes #1504. [SVN r41968] --- include/boost/type_traits/alignment_of.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/type_traits/alignment_of.hpp b/include/boost/type_traits/alignment_of.hpp index f18d422..e8e4834 100644 --- a/include/boost/type_traits/alignment_of.hpp +++ b/include/boost/type_traits/alignment_of.hpp @@ -17,7 +17,7 @@ #ifdef BOOST_MSVC # pragma warning(push) -# pragma warning(disable: 4121) // alignment is sensitive to packing +# pragma warning(disable: 4121 4512) // alignment is sensitive to packing #endif #if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) #pragma option push -Vx- -Ve- From 8197f3c4e03fdb5fec91b65b6ac0b511f3c3bdb5 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 18 Dec 2007 16:37:23 +0000 Subject: [PATCH 02/92] Fixes #1525. [SVN r42138] --- include/boost/type_traits/function_traits.hpp | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/include/boost/type_traits/function_traits.hpp b/include/boost/type_traits/function_traits.hpp index 2112ce7..bfc3f7e 100644 --- a/include/boost/type_traits/function_traits.hpp +++ b/include/boost/type_traits/function_traits.hpp @@ -23,14 +23,14 @@ template struct function_traits_helper; template struct function_traits_helper { - BOOST_STATIC_CONSTANT(int, arity = 0); + BOOST_STATIC_CONSTANT(unsigned, arity = 0); typedef R result_type; }; template struct function_traits_helper { - BOOST_STATIC_CONSTANT(int, arity = 1); + BOOST_STATIC_CONSTANT(unsigned, arity = 1); typedef R result_type; typedef T1 arg1_type; typedef T1 argument_type; @@ -39,7 +39,7 @@ struct function_traits_helper template struct function_traits_helper { - BOOST_STATIC_CONSTANT(int, arity = 2); + BOOST_STATIC_CONSTANT(unsigned, arity = 2); typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; @@ -50,7 +50,7 @@ struct function_traits_helper template struct function_traits_helper { - BOOST_STATIC_CONSTANT(int, arity = 3); + BOOST_STATIC_CONSTANT(unsigned, arity = 3); typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; @@ -60,7 +60,7 @@ struct function_traits_helper template struct function_traits_helper { - BOOST_STATIC_CONSTANT(int, arity = 4); + BOOST_STATIC_CONSTANT(unsigned, arity = 4); typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; @@ -72,7 +72,7 @@ template struct function_traits_helper { - BOOST_STATIC_CONSTANT(int, arity = 5); + BOOST_STATIC_CONSTANT(unsigned, arity = 5); typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; @@ -85,7 +85,7 @@ template struct function_traits_helper { - BOOST_STATIC_CONSTANT(int, arity = 6); + BOOST_STATIC_CONSTANT(unsigned, arity = 6); typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; @@ -99,7 +99,7 @@ template struct function_traits_helper { - BOOST_STATIC_CONSTANT(int, arity = 7); + BOOST_STATIC_CONSTANT(unsigned, arity = 7); typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; @@ -114,7 +114,7 @@ template struct function_traits_helper { - BOOST_STATIC_CONSTANT(int, arity = 8); + BOOST_STATIC_CONSTANT(unsigned, arity = 8); typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; @@ -130,7 +130,7 @@ template struct function_traits_helper { - BOOST_STATIC_CONSTANT(int, arity = 9); + BOOST_STATIC_CONSTANT(unsigned, arity = 9); typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; @@ -148,7 +148,7 @@ template struct function_traits_helper { - BOOST_STATIC_CONSTANT(int, arity = 10); + BOOST_STATIC_CONSTANT(unsigned, arity = 10); typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; @@ -174,7 +174,7 @@ struct function_traits : namespace detail { -template +template struct type_of_size { char elements[N]; @@ -227,7 +227,7 @@ type_of_size<11> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6, T7, T8, template struct function_traits { - BOOST_STATIC_CONSTANT(int, arity = (sizeof(detail::function_arity_helper((Function*)0))-1)); + BOOST_STATIC_CONSTANT(unsigned, arity = (sizeof(detail::function_arity_helper((Function*)0))-1)); }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION From e10f6cab4335c53cfcef1181d134e4c7091952d4 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 21 Jan 2008 18:11:09 +0000 Subject: [PATCH 03/92] Updated type traits library so that everything compiles with -Wall -pedantic with GCC. [SVN r42899] --- include/boost/type_traits/make_signed.hpp | 4 ++-- include/boost/type_traits/make_unsigned.hpp | 4 ++-- test/is_convertible_test.cpp | 6 +++--- test/make_signed_test.cpp | 16 ++++++++-------- test/make_unsigned_test.cpp | 16 ++++++++-------- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/include/boost/type_traits/make_signed.hpp b/include/boost/type_traits/make_signed.hpp index a44a640..51cfd95 100644 --- a/include/boost/type_traits/make_signed.hpp +++ b/include/boost/type_traits/make_signed.hpp @@ -72,7 +72,7 @@ struct make_signed_imp is_same, long, #if defined(BOOST_HAS_LONG_LONG) - long long + boost::long_long_type #elif defined(BOOST_HAS_MS_INT64) __int64 #else @@ -96,7 +96,7 @@ struct make_signed_imp sizeof(t_no_cv) == sizeof(unsigned long), long, #if defined(BOOST_HAS_LONG_LONG) - long long + boost::long_long_type #elif defined(BOOST_HAS_MS_INT64) __int64 #else diff --git a/include/boost/type_traits/make_unsigned.hpp b/include/boost/type_traits/make_unsigned.hpp index 5695c7f..54f9f66 100644 --- a/include/boost/type_traits/make_unsigned.hpp +++ b/include/boost/type_traits/make_unsigned.hpp @@ -72,7 +72,7 @@ struct make_unsigned_imp is_same, unsigned long, #if defined(BOOST_HAS_LONG_LONG) - unsigned long long + boost::ulong_long_type #elif defined(BOOST_HAS_MS_INT64) unsigned __int64 #else @@ -96,7 +96,7 @@ struct make_unsigned_imp sizeof(t_no_cv) == sizeof(unsigned long), unsigned long, #if defined(BOOST_HAS_LONG_LONG) - unsigned long long + boost::ulong_long_type #elif defined(BOOST_HAS_MS_INT64) unsigned __int64 #else diff --git a/test/is_convertible_test.cpp b/test/is_convertible_test.cpp index d181cb5..ece3079 100644 --- a/test/is_convertible_test.cpp +++ b/test/is_convertible_test.cpp @@ -125,9 +125,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); -BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); -BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<__int64,int>::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<__int64,char>::value), true); diff --git a/test/make_signed_test.cpp b/test/make_signed_test.cpp index b76852f..af08bd5 100644 --- a/test/make_signed_test.cpp +++ b/test/make_signed_test.cpp @@ -20,7 +20,7 @@ BOOST_CHECK_TYPE(::tt::make_signed::type, short); BOOST_CHECK_TYPE(::tt::make_signed::type, int); BOOST_CHECK_TYPE(::tt::make_signed::type, long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_signed::type, long long); +BOOST_CHECK_TYPE(::tt::make_signed::type, boost::long_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_signed<__int64>::type, __int64); #endif @@ -30,7 +30,7 @@ BOOST_CHECK_TYPE(::tt::make_signed::type, const short); BOOST_CHECK_TYPE(::tt::make_signed::type, const int); BOOST_CHECK_TYPE(::tt::make_signed::type, const long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_signed::type, const long long); +BOOST_CHECK_TYPE(::tt::make_signed::type, const boost::long_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_signed::type, const __int64); #endif @@ -40,7 +40,7 @@ BOOST_CHECK_TYPE(::tt::make_signed::type, volatile short); BOOST_CHECK_TYPE(::tt::make_signed::type, volatile int); BOOST_CHECK_TYPE(::tt::make_signed::type, volatile long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_signed::type, volatile long long); +BOOST_CHECK_TYPE(::tt::make_signed::type, volatile boost::long_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_signed::type, volatile __int64); #endif @@ -50,7 +50,7 @@ BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile s BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile int); BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile long long); +BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile boost::long_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile __int64); #endif @@ -61,7 +61,7 @@ BOOST_CHECK_TYPE(::tt::make_signed::type, short); BOOST_CHECK_TYPE(::tt::make_signed::type, int); BOOST_CHECK_TYPE(::tt::make_signed::type, long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_signed::type, long long); +BOOST_CHECK_TYPE(::tt::make_signed::type, boost::long_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_signed::type, __int64); #endif @@ -71,7 +71,7 @@ BOOST_CHECK_TYPE(::tt::make_signed::type, const short); BOOST_CHECK_TYPE(::tt::make_signed::type, const int); BOOST_CHECK_TYPE(::tt::make_signed::type, const long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_signed::type, const long long); +BOOST_CHECK_TYPE(::tt::make_signed::type, const boost::long_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_signed::type, const __int64); #endif @@ -81,7 +81,7 @@ BOOST_CHECK_TYPE(::tt::make_signed::type, volatile shor BOOST_CHECK_TYPE(::tt::make_signed::type, volatile int); BOOST_CHECK_TYPE(::tt::make_signed::type, volatile long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_signed::type, volatile long long); +BOOST_CHECK_TYPE(::tt::make_signed::type, volatile boost::long_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_signed::type, volatile __int64); #endif @@ -91,7 +91,7 @@ BOOST_CHECK_TYPE(::tt::make_signed::type, const v BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile int); BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile long long); +BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile boost::long_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_signed::type, const volatile __int64); #endif diff --git a/test/make_unsigned_test.cpp b/test/make_unsigned_test.cpp index 548828e..2ffe1b9 100644 --- a/test/make_unsigned_test.cpp +++ b/test/make_unsigned_test.cpp @@ -20,7 +20,7 @@ BOOST_CHECK_TYPE(::tt::make_unsigned::type, unsigned short); BOOST_CHECK_TYPE(::tt::make_unsigned::type, unsigned int); BOOST_CHECK_TYPE(::tt::make_unsigned::type, unsigned long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_unsigned::type, unsigned long long); +BOOST_CHECK_TYPE(::tt::make_unsigned::type, boost::ulong_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_unsigned<__int64>::type, unsigned __int64); #endif @@ -30,7 +30,7 @@ BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned short); BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned int); BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned long long); +BOOST_CHECK_TYPE(::tt::make_unsigned::type, const boost::ulong_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned __int64); #endif @@ -40,7 +40,7 @@ BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile unsigned sh BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile unsigned int); BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile unsigned long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile unsigned long long); +BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile boost::ulong_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile unsigned __int64); #endif @@ -50,7 +50,7 @@ BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile unsigned int); BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile unsigned long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile unsigned long long); +BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile boost::ulong_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile unsigned __int64); #endif @@ -61,7 +61,7 @@ BOOST_CHECK_TYPE(::tt::make_unsigned::type, unsigned short); BOOST_CHECK_TYPE(::tt::make_unsigned::type, unsigned int); BOOST_CHECK_TYPE(::tt::make_unsigned::type, unsigned long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_unsigned::type, unsigned long long); +BOOST_CHECK_TYPE(::tt::make_unsigned::type, boost::ulong_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_unsigned::type, unsigned __int64); #endif @@ -71,7 +71,7 @@ BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned int); BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned long long); +BOOST_CHECK_TYPE(::tt::make_unsigned::type, const boost::ulong_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_unsigned::type, const unsigned __int64); #endif @@ -81,7 +81,7 @@ BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile un BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile unsigned int); BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile unsigned long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile unsigned long long); +BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile boost::ulong_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_unsigned::type, volatile unsigned __int64); #endif @@ -91,7 +91,7 @@ BOOST_CHECK_TYPE(::tt::make_unsigned::type, const BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile unsigned int); BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile unsigned long); #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile unsigned long long); +BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile boost::ulong_long_type); #elif defined(BOOST_HAS_MS_INT64) BOOST_CHECK_TYPE(::tt::make_unsigned::type, const volatile unsigned __int64); #endif From e80413f337b918e1a7b2b9743b577e7e4c448dc4 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 4 Feb 2008 09:17:35 +0000 Subject: [PATCH 04/92] Removed dead file. [SVN r43085] --- .../boost_typetraits/category/background.html | 699 ------------------ 1 file changed, 699 deletions(-) delete mode 100644 doc/html/boost_typetraits/category/background.html diff --git a/doc/html/boost_typetraits/category/background.html b/doc/html/boost_typetraits/category/background.html deleted file mode 100644 index 3891995..0000000 --- a/doc/html/boost_typetraits/category/background.html +++ /dev/null @@ -1,699 +0,0 @@ - - - -Background and Tutorial - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
- -

- The following is an updated version of the article "C++ Type traits" - by John Maddock and Steve Cleary that appeared in the October 2000 issue - of Dr Dobb's Journal. -

-

- Generic programming (writing code which works with any data type meeting - a set of requirements) has become the method of choice for providing reusable - code. However, there are times in generic programming when "generic" - just isn't good enough - sometimes the differences between types are too - large for an efficient generic implementation. This is when the traits technique - becomes important - by encapsulating those properties that need to be considered - on a type by type basis inside a traits class, we can minimize the amount - of code that has to differ from one type to another, and maximize the amount - of generic code. -

-

- Consider an example: when working with character strings, one common operation - is to determine the length of a null terminated string. Clearly it's possible - to write generic code that can do this, but it turns out that there are much - more efficient methods available: for example, the C library functions strlen and wcslen - are usually written in assembler, and with suitable hardware support can - be considerably faster than a generic version written in C++. The authors - of the C++ standard library realized this, and abstracted the properties - of char and wchar_t - into the class char_traits. - Generic code that works with character strings can simply use char_traits<>::length to determine the length of a null - terminated string, safe in the knowledge that specializations of char_traits will use the most appropriate - method available to them. -

-
- - Type Traits -
-

- Class char_traits is a classic - example of a collection of type specific properties wrapped up in a single - class - what Nathan Myers termed a baggage class[1]. In the Boost type-traits library, - we[2] have written a set of - very specific traits classes, each of which encapsulate a single trait from - the C++ type system; for example, is a type a pointer or a reference type? - Or does a type have a trivial constructor, or a const-qualifier? The type-traits - classes share a unified design: each class inherits from a the type true_type if - the type has the specified property and inherits from false_type - otherwise. As we will show, these classes can be used in generic programming - to determine the properties of a given type and introduce optimizations that - are appropriate for that case. -

-

- The type-traits library also contains a set of classes that perform a specific - transformation on a type; for example, they can remove a top-level const - or volatile qualifier from a type. Each class that performs a transformation - defines a single typedef-member type - that is the result of the transformation. All of the type-traits classes - are defined inside namespace boost; - for brevity, namespace-qualification is omitted in most of the code samples - given. -

-
- - Implementation -
-

- There are far too many separate classes contained in the type-traits library - to give a full implementation here - see the source code in the Boost library - for the full details - however, most of the implementation is fairly repetitive - anyway, so here we will just give you a flavor for how some of the classes - are implemented. Beginning with possibly the simplest class in the library, - is_void<T> inherits - from true_type - only if T is void. -

-
-template <typename T> 
-struct is_void : public false_type{};
-
-template <> 
-struct is_void<void> : public true_type{};
-
-

- Here we define a primary version of the template class is_void, - and provide a full-specialization when T - is void. While full specialization - of a template class is an important technique, sometimes we need a solution - that is halfway between a fully generic solution, and a full specialization. - This is exactly the situation for which the standards committee defined partial - template-class specialization. As an example, consider the class boost::is_pointer<T>: - here we needed a primary version that handles all the cases where T is not - a pointer, and a partial specialization to handle all the cases where T is - a pointer: -

-
-template <typename T> 
-struct is_pointer : public false_type{};
-
-template <typename T> 
-struct is_pointer<T*> : public true_type{};
-
-

- The syntax for partial specialization is somewhat arcane and could easily - occupy an article in its own right; like full specialization, in order to - write a partial specialization for a class, you must first declare the primary - template. The partial specialization contains an extra <...> after - the class name that contains the partial specialization parameters; these - define the types that will bind to that partial specialization rather than - the default template. The rules for what can appear in a partial specialization - are somewhat convoluted, but as a rule of thumb if you can legally write - two function overloads of the form: -

-
-void foo(T);
-void foo(U);
-
-

- Then you can also write a partial specialization of the form: -

-
-template <typename T>
-class c{ /*details*/ };
-
-template <typename T>
-class c<U>{ /*details*/ };
-
-

- This rule is by no means foolproof, but it is reasonably simple to remember - and close enough to the actual rule to be useful for everyday use. -

-

- As a more complex example of partial specialization consider the class remove_extent<T>. - This class defines a single typedef-member type - that is the same type as T but with any top-level array bounds removed; this - is an example of a traits class that performs a transformation on a type: -

-
-template <typename T> 
-struct remove_extent
-{ typedef T type; };
-
-template <typename T, std::size_t N> 
-struct remove_extent<T[N]>
-{ typedef T type; };
-
-

- The aim of remove_extent - is this: imagine a generic algorithm that is passed an array type as a template - parameter, remove_extent - provides a means of determining the underlying type of the array. For example - remove_extent<int[4][5]>::type would evaluate to the type int[5]. This example also shows that the number - of template parameters in a partial specialization does not have to match - the number in the default template. However, the number of parameters that - appear after the class name do have to match the number and type of the parameters - in the default template. -

-
- - Optimized - copy -
-

- As an example of how the type traits classes can be used, consider the standard - library algorithm copy: -

-
-template<typename Iter1, typename Iter2>
-Iter2 copy(Iter1 first, Iter1 last, Iter2 out);
-
-

- Obviously, there's no problem writing a generic version of copy that works - for all iterator types Iter1 - and Iter2; however, there - are some circumstances when the copy operation can best be performed by a - call to memcpy. In order - to implement copy in terms of memcpy - all of the following conditions need to be met: -

-
    -
  • - Both of the iterator types Iter1 - and Iter2 must be pointers. -
  • -
  • - Both Iter1 and Iter2 must point to the same type - excluding - const and volatile-qualifiers. -
  • -
  • - The type pointed to by Iter1 - must have a trivial assignment operator. -
  • -
-

- By trivial assignment operator we mean that the type is either a scalar type[3] or: -

-
    -
  • - The type has no user defined assignment operator. -
  • -
  • - The type does not have any data members that are references. -
  • -
  • - All base classes, and all data member objects must have trivial assignment - operators. -
  • -
-

- If all these conditions are met then a type can be copied using memcpy rather than using a compiler generated - assignment operator. The type-traits library provides a class has_trivial_assign, - such that has_trivial_assign<T>::value is true only if T has a trivial assignment - operator. This class "just works" for scalar types, but has to - be explicitly specialised for class/struct types that also happen to have - a trivial assignment operator. In other words if has_trivial_assign - gives the wrong answer, it will give the "safe" wrong answer - - that trivial assignment is not allowable. -

-

- The code for an optimized version of copy that uses memcpy - where appropriate is given in the examples. - The code begins by defining a template function do_copy - that performs a "slow but safe" copy. The last parameter passed - to this function may be either a true_type - or a false_type. - Following that there is an overload of docopy - that uses `memcpy`: this time the iterators are required to actually be pointers - to the same type, and the final parameter must be a `_true_type. Finally, the version of - copy calls docopy`, passing `_has_trivial_assign<value_type>()` - as the final parameter: this will dispatch to the optimized version where - appropriate, otherwise it will call the "slow but safe version". -

-
- - Was - it worth it? -
-

- It has often been repeated in these columns that "premature optimization - is the root of all evil" [4]. - So the question must be asked: was our optimization premature? To put this - in perspective the timings for our version of copy compared a conventional - generic copy[5] are shown in - table 1. -

-

- Clearly the optimization makes a difference in this case; but, to be fair, - the timings are loaded to exclude cache miss effects - without this accurate - comparison between algorithms becomes difficult. However, perhaps we can - add a couple of caveats to the premature optimization rule: -

-
    -
  • - If you use the right algorithm for the job in the first place then optimization - will not be required; in some cases, memcpy is the right algorithm. -
  • -
  • - If a component is going to be reused in many places by many people then - optimizations may well be worthwhile where they would not be so for a single - case - in other words, the likelihood that the optimization will be absolutely - necessary somewhere, sometime is that much higher. Just as importantly - the perceived value of the stock implementation will be higher: there is - no point standardizing an algorithm if users reject it on the grounds that - there are better, more heavily optimized versions available. -
  • -
-
-

Table 1.1. Time taken to copy 1000 elements using `copy<const - T*, T*>` (times in micro-seconds)

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- Version -

-
-

- T -

-
-

- Time -

-
-

- "Optimized" copy -

-
-

- char -

-
-

- 0.99 -

-
-

- Conventional copy -

-
-

- char -

-
-

- 8.07 -

-
-

- "Optimized" copy -

-
-

- int -

-
-

- 2.52 -

-
-

- Conventional copy -

-
-

- int -

-
-

- 8.02 -

-
-
-
- - Pair - of References -
-

- The optimized copy example shows how type traits may be used to perform optimization - decisions at compile-time. Another important usage of type traits is to allow - code to compile that otherwise would not do so unless excessive partial specialization - is used. This is possible by delegating partial specialization to the type - traits classes. Our example for this form of usage is a pair that can hold - references [6]. -

-

- First, let us examine the definition of std::pair, - omitting the comparison operators, default constructor, and template copy - constructor for simplicity: -

-
-template <typename T1, typename T2> 
-struct pair 
-{
-typedef T1 first_type;
-typedef T2 second_type;
-
-T1 first;
-T2 second;
-
-pair(const T1 & nfirst, const T2 & nsecond)
-:first(nfirst), second(nsecond) { }
-};
-
-

- Now, this "pair" cannot hold references as it currently stands, - because the constructor would require taking a reference to a reference, - which is currently illegal [7]. - Let us consider what the constructor's parameters would have to be in order - to allow "pair" to hold non-reference types, references, and constant - references: -

-
-

Table 1.2. Required Constructor Argument Types

-
---- - - - - - - - - - - - - - - - - - - -
-

- Type of T1 -

-
-

- Type of parameter to initializing constructor -

-
-

- T -

-
-

- const T & -

-
-

- T & -

-
-

- T & -

-
-

- const T & -

-
-

- const T & -

-
-
-

- A little familiarity with the type traits classes allows us to construct - a single mapping that allows us to determine the type of parameter from the - type of the contained class. The type traits classes provide a transformation - add_reference, - which adds a reference to its type, unless it is already a reference. -

-
-

Table 1.3. Using add_reference to synthesize the correct constructor - type

-
----- - - - - - - - - - - - - - - - - - - - - - - -
-

- Type of T1 -

-
-

- Type of const T1 -

-
-

- Type of add_reference<const - T1>::type -

-
-

- T -

-
-

- const T -

-
-

- const T & -

-
-

- T & -

-
-

- T & [8] -

-
-

- T & -

-
-

- const T & -

-
-

- const T & -

-
-

- const T & -

-
-
-

- This allows us to build a primary template definition for pair - that can contain non-reference types, reference types, and constant reference - types: -

-
-template <typename T1, typename T2> 
-struct pair 
-{
-typedef T1 first_type;
-typedef T2 second_type;
-
-T1 first;
-T2 second;
-
-pair(boost::add_reference<const T1>::type nfirst,
-      boost::add_reference<const T2>::type nsecond)
-:first(nfirst), second(nsecond) { }
-};
-
-

- Add back in the standard comparison operators, default constructor, and template - copy constructor (which are all the same), and you have a std::pair - that can hold reference types! -

-

- This same extension could have been done using partial template specialization - of pair, but to specialize - pair in this way would require - three partial specializations, plus the primary template. Type traits allows - us to define a single primary template that adjusts itself auto-magically - to any of these partial specializations, instead of a brute-force partial - specialization approach. Using type traits in this fashion allows programmers - to delegate partial specialization to the type traits classes, resulting - in code that is easier to maintain and easier to understand. -

-
- - Conclusion -
-

- We hope that in this article we have been able to give you some idea of what - type-traits are all about. A more complete listing of the available classes - are in the boost documentation, along with further examples using type traits. - Templates have enabled C++ uses to take the advantage of the code reuse that - generic programming brings; hopefully this article has shown that generic - programming does not have to sink to the lowest common denominator, and that - templates can be optimal as well as generic. -

-
- - Acknowledgements -
-

- The authors would like to thank Beman Dawes and Howard Hinnant for their - helpful comments when preparing this article. -

-
- - References -
-
    -
  1. - Nathan C. Myers, C++ Report, June 1995. -
  2. -
  3. - The type traits library is based upon contributions by Steve Cleary, Beman - Dawes, Howard Hinnant and John Maddock: it can be found at www.boost.org. -
  4. -
  5. - A scalar type is an arithmetic type (i.e. a built-in integer or floating - point type), an enumeration type, a pointer, a pointer to member, or a - const- or volatile-qualified version of one of these types. -
  6. -
  7. - This quote is from Donald Knuth, ACM Computing Surveys, December 1974, - pg 268. -
  8. -
  9. - The test code is available as part of the boost utility library (see algo_opt_examples.cpp), - the code was compiled with gcc 2.95 with all optimisations turned on, tests - were conducted on a 400MHz Pentium II machine running Microsoft Windows - 98. -
  10. -
  11. - John Maddock and Howard Hinnant have submitted a "compressed_pair" - library to Boost, which uses a technique similar to the one described here - to hold references. Their pair also uses type traits to determine if any - of the types are empty, and will derive instead of contain to conserve - space -- hence the name "compressed". -
  12. -
  13. - This is actually an issue with the C++ Core Language Working Group (issue - #106), submitted by Bjarne Stroustrup. The tentative resolution is to allow - a "reference to a reference to T" to mean the same thing as a - "reference to T", but only in template instantiation, in a method - similar to multiple cv-qualifiers. -
  14. -
  15. - For those of you who are wondering why this shouldn't be const-qualified, - remember that references are always implicitly constant (for example, you - can't re-assign a reference). Remember also that "const T &" - is something completely different. For this reason, cv-qualifiers on template - type arguments that are references are ignored. -
  16. -
-
- - - -
Copyright © 2000, 2006 Adobe Systems Inc, David Abrahams, - Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, Jesse Jones, Mat - Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert - Ramey and Jeremy Siek
-
-
-PrevUpHomeNext -
- - From 00b86fc75cfa38331c4d3f5c2b75eaab571778c9 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 7 Feb 2008 10:29:59 +0000 Subject: [PATCH 05/92] Added fix for inspection report. [SVN r43150] --- cxx_type_traits.htm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cxx_type_traits.htm b/cxx_type_traits.htm index a0f1a68..4022212 100644 --- a/cxx_type_traits.htm +++ b/cxx_type_traits.htm @@ -2,7 +2,8 @@ - + +

Automatic redirection failed, please go to doc/html/boost_typetraits/background.html.

From 1f23f44e862d43d0f49c09ec4c1571108de21094 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 21 Feb 2008 13:51:18 +0000 Subject: [PATCH 06/92] Added link to PDF docs, and regenerated. [SVN r43354] --- doc/Jamfile.v2 | 3 +- doc/html/boost_typetraits/background.html | 55 ++++++++----------- doc/html/boost_typetraits/category.html | 9 +-- .../boost_typetraits/category/alignment.html | 12 ++-- .../boost_typetraits/category/function.html | 12 ++-- .../boost_typetraits/category/transform.html | 20 +++---- .../category/value_traits.html | 9 +-- .../category/value_traits/primary.html | 15 +++-- .../category/value_traits/properties.html | 12 ++-- .../category/value_traits/relate.html | 12 ++-- doc/html/boost_typetraits/credits.html | 9 +-- doc/html/boost_typetraits/examples.html | 9 +-- doc/html/boost_typetraits/examples/copy.html | 12 ++-- .../boost_typetraits/examples/destruct.html | 12 ++-- doc/html/boost_typetraits/examples/fill.html | 12 ++-- doc/html/boost_typetraits/examples/iter.html | 12 ++-- .../boost_typetraits/examples/to_double.html | 12 ++-- doc/html/boost_typetraits/intrinsics.html | 11 ++-- doc/html/boost_typetraits/intro.html | 9 +-- doc/html/boost_typetraits/mpl.html | 9 +-- doc/html/boost_typetraits/reference.html | 9 +-- .../boost_typetraits/reference/add_const.html | 14 ++--- .../boost_typetraits/reference/add_cv.html | 14 ++--- .../reference/add_pointer.html | 14 ++--- .../reference/add_reference.html | 14 ++--- .../reference/add_volatile.html | 14 ++--- .../reference/aligned_storage.html | 12 ++-- .../reference/alignment_of.html | 12 ++-- .../boost_typetraits/reference/decay.html | 14 ++--- .../boost_typetraits/reference/extent.html | 12 ++-- .../reference/floating_point_promotion.html | 14 ++--- .../reference/function_traits.html | 16 +++--- .../reference/has_no_throw_def_cons.html | 9 +-- .../reference/has_nothrow_assign.html | 12 ++-- .../reference/has_nothrow_constructor.html | 12 ++-- .../reference/has_nothrow_copy.html | 12 ++-- .../reference/has_nothrow_cp_cons.html | 9 +-- .../reference/has_trivial_assign.html | 12 ++-- .../reference/has_trivial_constructor.html | 12 ++-- .../reference/has_trivial_copy.html | 12 ++-- .../reference/has_trivial_cp_cons.html | 9 +-- .../reference/has_trivial_def_cons.html | 9 +-- .../reference/has_trivial_destructor.html | 12 ++-- .../reference/has_virtual_destructor.html | 12 ++-- .../reference/integral_constant.html | 12 ++-- .../reference/integral_promotion.html | 14 ++--- .../reference/is_abstract.html | 12 ++-- .../reference/is_arithmetic.html | 12 ++-- .../boost_typetraits/reference/is_array.html | 12 ++-- .../reference/is_base_of.html | 12 ++-- .../boost_typetraits/reference/is_class.html | 12 ++-- .../reference/is_complex.html | 12 ++-- .../reference/is_compound.html | 12 ++-- .../boost_typetraits/reference/is_const.html | 12 ++-- .../reference/is_convertible.html | 15 +++-- .../boost_typetraits/reference/is_empty.html | 12 ++-- .../boost_typetraits/reference/is_enum.html | 12 ++-- .../reference/is_floating_point.html | 12 ++-- .../reference/is_function.html | 15 +++-- .../reference/is_fundamental.html | 12 ++-- .../reference/is_integral.html | 12 ++-- .../reference/is_member_function_pointer.html | 12 ++-- .../reference/is_member_object_pointer.html | 12 ++-- .../reference/is_member_pointer.html | 12 ++-- .../boost_typetraits/reference/is_object.html | 12 ++-- .../boost_typetraits/reference/is_pod.html | 12 ++-- .../reference/is_pointer.html | 12 ++-- .../reference/is_polymorphic.html | 12 ++-- .../reference/is_reference.html | 12 ++-- .../boost_typetraits/reference/is_same.html | 12 ++-- .../boost_typetraits/reference/is_scalar.html | 12 ++-- .../boost_typetraits/reference/is_signed.html | 12 ++-- .../reference/is_stateless.html | 15 +++-- .../boost_typetraits/reference/is_union.html | 12 ++-- .../reference/is_unsigned.html | 12 ++-- .../boost_typetraits/reference/is_void.html | 12 ++-- .../reference/is_volatile.html | 12 ++-- .../reference/make_signed.html | 14 ++--- .../reference/make_unsigned.html | 14 ++--- .../boost_typetraits/reference/promote.html | 14 ++--- doc/html/boost_typetraits/reference/rank.html | 12 ++-- .../reference/remove_all_extents.html | 14 ++--- .../reference/remove_const.html | 14 ++--- .../boost_typetraits/reference/remove_cv.html | 14 ++--- .../reference/remove_extent.html | 14 ++--- .../reference/remove_pointer.html | 14 ++--- .../reference/remove_reference.html | 14 ++--- .../reference/remove_volatile.html | 14 ++--- .../reference/type_with_alignment.html | 12 ++-- doc/html/boost_typetraits/user_defined.html | 12 ++-- doc/html/index.html | 14 +++-- doc/type_traits.qbk | 3 + 92 files changed, 582 insertions(+), 575 deletions(-) diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index 7143451..c15db9f 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -39,7 +39,7 @@ boostbook standalone # PDF Options: # TOC Generation: this is needed for FOP-0.9 and later: - # fop1.extensions=1 + fop1.extensions=0 xep.extensions=1 # TOC generation: this is needed for FOP 0.2, but must not be set to zero for FOP-0.9! fop.extensions=0 @@ -65,3 +65,4 @@ boostbook standalone + diff --git a/doc/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index 64d11c0..6d49b8e 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -56,7 +56,7 @@ method available to them.

- + Type Traits

@@ -84,7 +84,7 @@ given.

- + Implementation

@@ -97,8 +97,7 @@ from true_type only if T is void.

-
-template <typename T> 
+
template <typename T> 
 struct is_void : public false_type{};
 
 template <> 
@@ -116,8 +115,7 @@
       a pointer, and a partial specialization to handle all the cases where T is
       a pointer:
     

-
-template <typename T> 
+
template <typename T> 
 struct is_pointer : public false_type{};
 
 template <typename T> 
@@ -134,15 +132,13 @@
       but as a rule of thumb if you can legally write two function overloads of the
       form:
     

-
-void foo(T);
+
void foo(T);
 void foo(U);
 

Then you can also write a partial specialization of the form:

-
-template <typename T>
+
template <typename T>
 class c{ /*details*/ };
 
 template <typename T>
@@ -158,8 +154,7 @@
       that is the same type as T but with any top-level array bounds removed; this
       is an example of a traits class that performs a transformation on a type:
     

-
-template <typename T> 
+
template <typename T> 
 struct remove_extent
 { typedef T type; };
 
@@ -179,15 +174,14 @@
       in the default template.
     

- + Optimized copy

As an example of how the type traits classes can be used, consider the standard library algorithm copy:

-
-template<typename Iter1, typename Iter2>
+
template<typename Iter1, typename Iter2>
 Iter2 copy(Iter1 first, Iter1 last, Iter2 out);
 

@@ -253,7 +247,7 @@ otherwise it will call the "slow but safe version".

- + Was it worth it?

@@ -286,7 +280,7 @@

-

Table 1.1. Time taken to copy 1000 elements using `copy<const +

Table 1.1. Time taken to copy 1000 elements using `copy<const T*, T*>` (times in micro-seconds)

@@ -385,7 +379,7 @@

- + Pair of References

@@ -401,8 +395,7 @@ the comparison operators, default constructor, and template copy constructor for simplicity:

-
-template <typename T1, typename T2> 
+
template <typename T1, typename T2> 
 struct pair 
 {
 typedef T1 first_type;
@@ -423,7 +416,7 @@
       to hold non-reference types, references, and constant references:
     

-

Table 1.2. Required Constructor Argument Types

+

Table 1.2. Required Constructor Argument Types

@@ -488,7 +481,7 @@ adds a reference to its type, unless it is already a reference.

-

Table 1.3. Using add_reference to synthesize the correct constructor +

Table 1.3. Using add_reference to synthesize the correct constructor type

@@ -574,8 +567,7 @@ that can contain non-reference types, reference types, and constant reference types:

-
-template <typename T1, typename T2> 
+
template <typename T1, typename T2> 
 struct pair 
 {
 typedef T1 first_type;
@@ -606,7 +598,7 @@
       easier to maintain and easier to understand.
     

- + Conclusion

@@ -619,7 +611,7 @@ can be optimal as well as generic.

- + Acknowledgements

@@ -627,7 +619,7 @@ comments when preparing this article.

- + References
    @@ -677,13 +669,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/category.html b/doc/html/boost_typetraits/category.html index a089195..cdf6353 100644 --- a/doc/html/boost_typetraits/category.html +++ b/doc/html/boost_typetraits/category.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -47,13 +47,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/category/alignment.html b/doc/html/boost_typetraits/category/alignment.html index 93ee9ed..6d5ea02 100644 --- a/doc/html/boost_typetraits/category/alignment.html +++ b/doc/html/boost_typetraits/category/alignment.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -36,8 +36,7 @@

Synopsis

-
-template <std::size_t Align>
+
template <std::size_t Align>
 struct type_with_alignment;
 
 template <std::size_t Size, std::size_t Align>
@@ -46,13 +45,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/category/function.html b/doc/html/boost_typetraits/category/function.html index 9c601a6..b32289e 100644 --- a/doc/html/boost_typetraits/category/function.html +++ b/doc/html/boost_typetraits/category/function.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -36,20 +36,20 @@

Synopsis

-
-template <std::size_t Align>
+
template <std::size_t Align>
 struct function_traits;
 
- +

+

diff --git a/doc/html/boost_typetraits/category/transform.html b/doc/html/boost_typetraits/category/transform.html index f4805fc..a91fa23 100644 --- a/doc/html/boost_typetraits/category/transform.html +++ b/doc/html/boost_typetraits/category/transform.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -36,8 +36,7 @@

Synopsis:

-
-template <class T>
+
template <class T>
 struct add_const;
 
 template <class T>
@@ -92,7 +91,7 @@
 struct remove_volatile;
 
- + Broken Compiler Workarounds:
@@ -117,8 +116,7 @@

The first part guarantees the successful compilation of something like this:

-
-BOOST_STATIC_ASSERT((is_same<char, remove_reference<char&>::type>::value));
+
BOOST_STATIC_ASSERT((is_same<char, remove_reference<char&>::type>::value));
 BOOST_STATIC_ASSERT((is_same<char const, remove_reference<char const&>::type>::value));
 BOOST_STATIC_ASSERT((is_same<char volatile, remove_reference<char volatile&>::type>::value));
 BOOST_STATIC_ASSERT((is_same<char const volatile, remove_reference<char const volatile&>::type>::value));
@@ -133,8 +131,7 @@
         int or other built-in type,
         but for their own types as well:
       

-
-namespace myspace{
+
namespace myspace{
    struct MyClass {};
 }
 // declare this at global scope:
@@ -152,13 +149,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/category/value_traits.html b/doc/html/boost_typetraits/category/value_traits.html index 2be34d3..9a9f27c 100644 --- a/doc/html/boost_typetraits/category/value_traits.html +++ b/doc/html/boost_typetraits/category/value_traits.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -48,13 +48,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/category/value_traits/primary.html b/doc/html/boost_typetraits/category/value_traits/primary.html index bb82e5f..bd026c2 100644 --- a/doc/html/boost_typetraits/category/value_traits/primary.html +++ b/doc/html/boost_typetraits/category/value_traits/primary.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -48,8 +48,7 @@

Synopsis:

-
-template <class T>
+
template <class T>
 struct is_array<T>;
   
 template <class T>
@@ -93,8 +92,7 @@
           A type may belong to more than one of these categories, in addition to
           one of the primary categories.
         

-
-template <class T>
+
template <class T>
 struct is_arithmetic;
 
 template <class T>
@@ -115,13 +113,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/category/value_traits/properties.html b/doc/html/boost_typetraits/category/value_traits/properties.html index cbe6c24..bf034ae 100644 --- a/doc/html/boost_typetraits/category/value_traits/properties.html +++ b/doc/html/boost_typetraits/category/value_traits/properties.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -33,8 +33,7 @@

Synopsis:

-
-template <class T>
+
template <class T>
 struct alignment_of;
 
 template <class T>
@@ -109,13 +108,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/category/value_traits/relate.html b/doc/html/boost_typetraits/category/value_traits/relate.html index 2ec8d13..938f763 100644 --- a/doc/html/boost_typetraits/category/value_traits/relate.html +++ b/doc/html/boost_typetraits/category/value_traits/relate.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -34,8 +34,7 @@

Synopsis:

-
-template <class Base, class Derived>
+
template <class Base, class Derived>
 struct is_base_of;
 
 template <class From, class To>
@@ -47,13 +46,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/credits.html b/doc/html/boost_typetraits/credits.html index 954bff6..69085e0 100644 --- a/doc/html/boost_typetraits/credits.html +++ b/doc/html/boost_typetraits/credits.html @@ -13,8 +13,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -61,13 +61,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/examples.html b/doc/html/boost_typetraits/examples.html index f3966c9..afa695d 100644 --- a/doc/html/boost_typetraits/examples.html +++ b/doc/html/boost_typetraits/examples.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -41,13 +41,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/examples/copy.html b/doc/html/boost_typetraits/examples/copy.html index bc55a07..e7cc4d1 100644 --- a/doc/html/boost_typetraits/examples/copy.html +++ b/doc/html/boost_typetraits/examples/copy.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -33,8 +33,7 @@ to determine whether to use memcpy to optimise the copy operation (see copy_example.cpp):

-
-//
+
//
 // opt::copy
 // same semantics as std::copy
 // calls memcpy where appropriate.
@@ -79,13 +78,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/examples/destruct.html b/doc/html/boost_typetraits/examples/destruct.html index de97cb2..4545f5e 100644 --- a/doc/html/boost_typetraits/examples/destruct.html +++ b/doc/html/boost_typetraits/examples/destruct.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -31,8 +31,7 @@ Demonstrates a simple algorithm that uses __has_trivial_destruct to determine whether to destructors need to be called (see trivial_destructor_example.cpp):

-
-//
+
//
 // algorithm destroy_array:
 // The reverse of std::unitialized_copy, takes a block of
 // initialized memory and calls destructors on all objects therein.
@@ -66,13 +65,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/examples/fill.html b/doc/html/boost_typetraits/examples/fill.html index d371390..9e75407 100644 --- a/doc/html/boost_typetraits/examples/fill.html +++ b/doc/html/boost_typetraits/examples/fill.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -33,8 +33,7 @@ to determine whether to use memset to optimise the fill operation (see fill_example.cpp):

-
-//
+
//
 // fill
 // same as std::fill, but uses memset where appropriate
 //
@@ -73,13 +72,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/examples/iter.html b/doc/html/boost_typetraits/examples/iter.html index f3c1318..3c8f937 100644 --- a/doc/html/boost_typetraits/examples/iter.html +++ b/doc/html/boost_typetraits/examples/iter.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -36,8 +36,7 @@ the swap to ensure that the algorithm works correctly for both proxying iterators, and even iterators of different types (see iter_swap_example.cpp):

-
-//
+
//
 // iter_swap:
 // tests whether iterator is a proxying iterator or not, and
 // uses optimal form accordingly:
@@ -82,13 +81,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/examples/to_double.html b/doc/html/boost_typetraits/examples/to_double.html index c1a59f0..fa515ea 100644 --- a/doc/html/boost_typetraits/examples/to_double.html +++ b/doc/html/boost_typetraits/examples/to_double.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -31,8 +31,7 @@ Demonstrates a conversion of Numeric Types and enum types to double:

-
-template<class T>
+
template<class T>
 inline double to_double(T const& value)
 {
     typedef typename boost::promote<T>::type promoted;
@@ -42,13 +41,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/intrinsics.html b/doc/html/boost_typetraits/intrinsics.html index 8c40bbe..8a27fdc 100644 --- a/doc/html/boost_typetraits/intrinsics.html +++ b/doc/html/boost_typetraits/intrinsics.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -71,7 +71,7 @@ of the following macros:

-

Table 1.4. Macros for Compiler Intrinsics

+

Table 1.4. Macros for Compiler Intrinsics

@@ -227,13 +227,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/intro.html b/doc/html/boost_typetraits/intro.html index d0e1cca..ba07a52 100644 --- a/doc/html/boost_typetraits/intro.html +++ b/doc/html/boost_typetraits/intro.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -48,13 +48,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/mpl.html b/doc/html/boost_typetraits/mpl.html index 3eddb4a..063944a 100644 --- a/doc/html/boost_typetraits/mpl.html +++ b/doc/html/boost_typetraits/mpl.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -45,13 +45,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference.html b/doc/html/boost_typetraits/reference.html index e0200a3..9638957 100644 --- a/doc/html/boost_typetraits/reference.html +++ b/doc/html/boost_typetraits/reference.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -104,13 +104,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/add_const.html b/doc/html/boost_typetraits/reference/add_const.html index 90feb0b..dd4bcd4 100644 --- a/doc/html/boost_typetraits/reference/add_const.html +++ b/doc/html/boost_typetraits/reference/add_const.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct add_const
 {
    typedef see-below type;
@@ -54,7 +53,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.5. Examples

+

Table 1.5. Examples

@@ -129,13 +128,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/add_cv.html b/doc/html/boost_typetraits/reference/add_cv.html index 81da4df..8fe48aa 100644 --- a/doc/html/boost_typetraits/reference/add_cv.html +++ b/doc/html/boost_typetraits/reference/add_cv.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct add_cv
 {
    typedef see-below type;
@@ -55,7 +54,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.6. Examples

+

Table 1.6. Examples

@@ -132,13 +131,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/add_pointer.html b/doc/html/boost_typetraits/reference/add_pointer.html index b6588e1..c4e9c66 100644 --- a/doc/html/boost_typetraits/reference/add_pointer.html +++ b/doc/html/boost_typetraits/reference/add_pointer.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct add_pointer
 {
    typedef see-below type;
@@ -57,7 +56,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.7. Examples

+

Table 1.7. Examples

@@ -131,13 +130,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/add_reference.html b/doc/html/boost_typetraits/reference/add_reference.html index 15fd08a..b14b4e4 100644 --- a/doc/html/boost_typetraits/reference/add_reference.html +++ b/doc/html/boost_typetraits/reference/add_reference.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct add_reference
 {
    typedef see-below type;
@@ -54,7 +53,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.8. Examples

+

Table 1.8. Examples

@@ -128,13 +127,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/add_volatile.html b/doc/html/boost_typetraits/reference/add_volatile.html index 0dd76f7..15e8d78 100644 --- a/doc/html/boost_typetraits/reference/add_volatile.html +++ b/doc/html/boost_typetraits/reference/add_volatile.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct add_volatile
 {
    typedef see-below type;
@@ -54,7 +53,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.9. Examples

+

Table 1.9. Examples

@@ -130,13 +129,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/aligned_storage.html b/doc/html/boost_typetraits/reference/aligned_storage.html index 5c2ee56..286cde6 100644 --- a/doc/html/boost_typetraits/reference/aligned_storage.html +++ b/doc/html/boost_typetraits/reference/aligned_storage.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <std::size_t Size, std::size_t Align>
+
template <std::size_t Size, std::size_t Align>
 struct aligned_storage
 {
    typedef see-below type;
@@ -46,13 +45,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/reference/alignment_of.html b/doc/html/boost_typetraits/reference/alignment_of.html index 1759dc0..1b364b6 100644 --- a/doc/html/boost_typetraits/reference/alignment_of.html +++ b/doc/html/boost_typetraits/reference/alignment_of.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct alignment_of : public integral_constant<std::size_t, ALIGNOF(T)> {};
 

@@ -89,13 +88,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/decay.html b/doc/html/boost_typetraits/reference/decay.html index c3f7d2e..d59b743 100644 --- a/doc/html/boost_typetraits/reference/decay.html +++ b/doc/html/boost_typetraits/reference/decay.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct decay
 {
    typedef see-below type;
@@ -49,7 +48,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.10. Examples

+

Table 1.10. Examples

@@ -135,13 +134,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/extent.html b/doc/html/boost_typetraits/reference/extent.html index caa6195..5680d42 100644 --- a/doc/html/boost_typetraits/reference/extent.html +++ b/doc/html/boost_typetraits/reference/extent.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T, std::size_t N = 0>
+
template <class T, std::size_t N = 0>
 struct extent : public integral_constant<std::size_t, EXTENT(T,N)> {};
 

@@ -121,13 +120,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/floating_point_promotion.html b/doc/html/boost_typetraits/reference/floating_point_promotion.html index b1dbd38..58dd94f 100644 --- a/doc/html/boost_typetraits/reference/floating_point_promotion.html +++ b/doc/html/boost_typetraits/reference/floating_point_promotion.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -27,8 +27,7 @@ floating_point_promotion
-
-template <class T>
+
template <class T>
 struct floating_point_promotion
 {
    typedef see-below type;
@@ -50,7 +49,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.11. Examples

+

Table 1.11. Examples

@@ -113,13 +112,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/function_traits.html b/doc/html/boost_typetraits/reference/function_traits.html index 3ca347b..d05e611 100644 --- a/doc/html/boost_typetraits/reference/function_traits.html +++ b/doc/html/boost_typetraits/reference/function_traits.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct function_traits
 {
    static const std::size_t    arity = see-below;
@@ -60,7 +59,7 @@
         

-

Table 1.12. Function Traits Members

+

Table 1.12. Function Traits Members

@@ -123,7 +122,7 @@

-

Table 1.13. Examples

+

Table 1.13. Examples

@@ -259,13 +258,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html b/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html index b71350d..5fc5eee 100644 --- a/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html +++ b/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -32,13 +32,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/has_nothrow_assign.html b/doc/html/boost_typetraits/reference/has_nothrow_assign.html index 669a827..838e62b 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_assign.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_assign.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct has_nothrow_assign : public true_type-or-false_type {};
 

@@ -57,13 +56,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html index 1406f0f..7762bb1 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -27,8 +27,7 @@ has_nothrow_constructor
-
-template <class T>
+
template <class T>
 struct has_nothrow_constructor : public true_type-or-false_type {};
 
 template <class T>
@@ -64,13 +63,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/reference/has_nothrow_copy.html b/doc/html/boost_typetraits/reference/has_nothrow_copy.html index 20b5fd7..3e8046c 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_copy.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_copy.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct has_nothrow_copy : public true_type-or-false_type {};
 
 template <class T>
@@ -63,13 +62,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html b/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html index 1ef91c3..501c597 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -32,13 +32,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/has_trivial_assign.html b/doc/html/boost_typetraits/reference/has_trivial_assign.html index 968064d..956cf55 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_assign.html +++ b/doc/html/boost_typetraits/reference/has_trivial_assign.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct has_trivial_assign : public true_type-or-false_type {};
 

@@ -114,13 +113,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/has_trivial_constructor.html b/doc/html/boost_typetraits/reference/has_trivial_constructor.html index 0960f00..ac29da3 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_constructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_constructor.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -27,8 +27,7 @@ has_trivial_constructor
-
-template <class T>
+
template <class T>
 struct has_trivial_constructor : public true_type-or-false_type {};
 
 template <class T>
@@ -124,13 +123,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/reference/has_trivial_copy.html b/doc/html/boost_typetraits/reference/has_trivial_copy.html index 124a2e7..f1fa15b 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_copy.html +++ b/doc/html/boost_typetraits/reference/has_trivial_copy.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct has_trivial_copy : public true_type-or-false_type {};
 
 template <class T>
@@ -120,13 +119,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html b/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html index 2cc9178..df8099e 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -32,13 +32,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/has_trivial_def_cons.html b/doc/html/boost_typetraits/reference/has_trivial_def_cons.html index 5af22bb..3704060 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_def_cons.html +++ b/doc/html/boost_typetraits/reference/has_trivial_def_cons.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -32,13 +32,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/has_trivial_destructor.html b/doc/html/boost_typetraits/reference/has_trivial_destructor.html index 740179f..cf77ae8 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_destructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_destructor.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct has_trivial_destructor : public true_type-or-false_type {};
 

@@ -117,13 +116,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/has_virtual_destructor.html b/doc/html/boost_typetraits/reference/has_virtual_destructor.html index 43810e2..0509149 100644 --- a/doc/html/boost_typetraits/reference/has_virtual_destructor.html +++ b/doc/html/boost_typetraits/reference/has_virtual_destructor.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct has_virtual_destructor : public true_type-or-false_type {};
 

@@ -56,13 +55,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/integral_constant.html b/doc/html/boost_typetraits/reference/integral_constant.html index e6384e8..1a5cd28 100644 --- a/doc/html/boost_typetraits/reference/integral_constant.html +++ b/doc/html/boost_typetraits/reference/integral_constant.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T, T val>
+
template <class T, T val>
 struct integral_constant
 {
    typedef integral_constant<T, val>  type;
@@ -48,13 +47,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/reference/integral_promotion.html b/doc/html/boost_typetraits/reference/integral_promotion.html index 908a74e..a02f240 100644 --- a/doc/html/boost_typetraits/reference/integral_promotion.html +++ b/doc/html/boost_typetraits/reference/integral_promotion.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct integral_promotion
 {
    typedef see-below type;
@@ -50,7 +49,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.14. Examples

+

Table 1.14. Examples

@@ -113,13 +112,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/is_abstract.html b/doc/html/boost_typetraits/reference/is_abstract.html index 79c4770..bb9494a 100644 --- a/doc/html/boost_typetraits/reference/is_abstract.html +++ b/doc/html/boost_typetraits/reference/is_abstract.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_abstract : public true_type-or-false_type {};
 

@@ -106,13 +105,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_arithmetic.html b/doc/html/boost_typetraits/reference/is_arithmetic.html index 757785a..8e2b695 100644 --- a/doc/html/boost_typetraits/reference/is_arithmetic.html +++ b/doc/html/boost_typetraits/reference/is_arithmetic.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_arithmetic : public true_type-or-false_type {};
 

@@ -89,13 +88,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_array.html b/doc/html/boost_typetraits/reference/is_array.html index 1862cd6..8a1be84 100644 --- a/doc/html/boost_typetraits/reference/is_array.html +++ b/doc/html/boost_typetraits/reference/is_array.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_array : public true_type-or-false_type {};
 

@@ -92,13 +91,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_base_of.html b/doc/html/boost_typetraits/reference/is_base_of.html index b64c5fa..fe814bf 100644 --- a/doc/html/boost_typetraits/reference/is_base_of.html +++ b/doc/html/boost_typetraits/reference/is_base_of.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class Base, class Derived>
+
template <class Base, class Derived>
 struct is_base_of : public true_type-or-false_type {};
 

@@ -141,13 +140,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_class.html b/doc/html/boost_typetraits/reference/is_class.html index ee73ee6..caddc27 100644 --- a/doc/html/boost_typetraits/reference/is_class.html +++ b/doc/html/boost_typetraits/reference/is_class.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_class : public true_type-or-false_type {};
 

@@ -125,13 +124,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_complex.html b/doc/html/boost_typetraits/reference/is_complex.html index 7b51fbf..97338b4 100644 --- a/doc/html/boost_typetraits/reference/is_complex.html +++ b/doc/html/boost_typetraits/reference/is_complex.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_complex : public true_type-or-false_type {};
 

@@ -47,13 +46,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_compound.html b/doc/html/boost_typetraits/reference/is_compound.html index d23e651..4c6569a 100644 --- a/doc/html/boost_typetraits/reference/is_compound.html +++ b/doc/html/boost_typetraits/reference/is_compound.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_compound : public true_type-or-false_type {};
 

@@ -108,13 +107,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_const.html b/doc/html/boost_typetraits/reference/is_const.html index b774a2d..79975cd 100644 --- a/doc/html/boost_typetraits/reference/is_const.html +++ b/doc/html/boost_typetraits/reference/is_const.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_const : public true_type-or-false_type {};
 

@@ -118,13 +117,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_convertible.html b/doc/html/boost_typetraits/reference/is_convertible.html index 363adc2..aae4b1a 100644 --- a/doc/html/boost_typetraits/reference/is_convertible.html +++ b/doc/html/boost_typetraits/reference/is_convertible.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class From, class To>
+
template <class From, class To>
 struct is_convertible : public true_type-or-false_type {};
 

@@ -59,8 +58,7 @@ This template will also produce compiler errors if the conversion is ambiguous, for example:

-
-struct A {};
+
struct A {};
 struct B : A {};
 struct C : A {};
 struct D : B, C {};
@@ -159,13 +157,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/reference/is_empty.html b/doc/html/boost_typetraits/reference/is_empty.html index 17cf607..5016b46 100644 --- a/doc/html/boost_typetraits/reference/is_empty.html +++ b/doc/html/boost_typetraits/reference/is_empty.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_empty : public true_type-or-false_type {};
 

@@ -121,13 +120,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_enum.html b/doc/html/boost_typetraits/reference/is_enum.html index 081eb22..c7198f1 100644 --- a/doc/html/boost_typetraits/reference/is_enum.html +++ b/doc/html/boost_typetraits/reference/is_enum.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_enum : public true_type-or-false_type {};
 

@@ -125,13 +124,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_floating_point.html b/doc/html/boost_typetraits/reference/is_floating_point.html index e839de5..a3a8b89 100644 --- a/doc/html/boost_typetraits/reference/is_floating_point.html +++ b/doc/html/boost_typetraits/reference/is_floating_point.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_floating_point : public true_type-or-false_type {};
 

@@ -87,13 +86,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_function.html b/doc/html/boost_typetraits/reference/is_function.html index 79c3b36..95c036c 100644 --- a/doc/html/boost_typetraits/reference/is_function.html +++ b/doc/html/boost_typetraits/reference/is_function.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_function : public true_type-or-false_type {};
 

@@ -37,8 +36,7 @@ Note that this template does not detect pointers to functions, or references to functions, these are detected by is_pointer and is_reference respectively:

-
-typedef int f1();      // f1 is of function type.
+
typedef int f1();      // f1 is of function type.
 typedef int (f2*)();   // f2 is a pointer to a function.
 typedef int (f3&)();   // f3 is a reference to a function.
 
@@ -175,13 +173,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/is_fundamental.html b/doc/html/boost_typetraits/reference/is_fundamental.html index 9f78751..ca29d1b 100644 --- a/doc/html/boost_typetraits/reference/is_fundamental.html +++ b/doc/html/boost_typetraits/reference/is_fundamental.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_fundamental : public true_type-or-false_type {};
 

@@ -92,13 +91,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_integral.html b/doc/html/boost_typetraits/reference/is_integral.html index e4dbb1e..ec8986f 100644 --- a/doc/html/boost_typetraits/reference/is_integral.html +++ b/doc/html/boost_typetraits/reference/is_integral.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_integral : public true_type-or-false_type {};
 

@@ -88,13 +87,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_member_function_pointer.html b/doc/html/boost_typetraits/reference/is_member_function_pointer.html index d658c82..2d3ae1e 100644 --- a/doc/html/boost_typetraits/reference/is_member_function_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_function_pointer.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -27,8 +27,7 @@ is_member_function_pointer
-
-template <class T>
+
template <class T>
 struct is_member_function_pointer : public true_type-or-false_type {};
 

@@ -102,13 +101,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_member_object_pointer.html b/doc/html/boost_typetraits/reference/is_member_object_pointer.html index 47affae..8a41d11 100644 --- a/doc/html/boost_typetraits/reference/is_member_object_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_object_pointer.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -27,8 +27,7 @@ is_member_object_pointer
-
-template <class T>
+
template <class T>
 struct is_member_object_pointer : public true_type-or-false_type {};
 

@@ -102,13 +101,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_member_pointer.html b/doc/html/boost_typetraits/reference/is_member_pointer.html index 8af5ac9..91ce7dc 100644 --- a/doc/html/boost_typetraits/reference/is_member_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_pointer.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_member_pointer : public true_type-or-false_type {};
 

@@ -88,13 +87,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_object.html b/doc/html/boost_typetraits/reference/is_object.html index 4db0775..1adf00b 100644 --- a/doc/html/boost_typetraits/reference/is_object.html +++ b/doc/html/boost_typetraits/reference/is_object.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_object : public true_type-or-false_type {};
 

@@ -131,13 +130,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_pod.html b/doc/html/boost_typetraits/reference/is_pod.html index 848267b..1ed071a 100644 --- a/doc/html/boost_typetraits/reference/is_pod.html +++ b/doc/html/boost_typetraits/reference/is_pod.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_pod : public true_type-or-false_type {};
 

@@ -118,13 +117,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_pointer.html b/doc/html/boost_typetraits/reference/is_pointer.html index 9f1fa46..8958a5c 100644 --- a/doc/html/boost_typetraits/reference/is_pointer.html +++ b/doc/html/boost_typetraits/reference/is_pointer.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_pointer : public true_type-or-false_type {};
 

@@ -124,13 +123,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_polymorphic.html b/doc/html/boost_typetraits/reference/is_polymorphic.html index 5f48303..a5b4fbc 100644 --- a/doc/html/boost_typetraits/reference/is_polymorphic.html +++ b/doc/html/boost_typetraits/reference/is_polymorphic.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_polymorphic : public true_type-or-false_type {};
 

@@ -104,13 +103,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_reference.html b/doc/html/boost_typetraits/reference/is_reference.html index c4e4b58..32fe6fa 100644 --- a/doc/html/boost_typetraits/reference/is_reference.html +++ b/doc/html/boost_typetraits/reference/is_reference.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_reference : public true_type-or-false_type {};
 

@@ -95,13 +94,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_same.html b/doc/html/boost_typetraits/reference/is_same.html index efda38a..59452c6 100644 --- a/doc/html/boost_typetraits/reference/is_same.html +++ b/doc/html/boost_typetraits/reference/is_same.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T, class U>
+
template <class T, class U>
 struct is_same : public true_type-or-false_type {};
 

@@ -109,13 +108,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_scalar.html b/doc/html/boost_typetraits/reference/is_scalar.html index b791cbc..c895870 100644 --- a/doc/html/boost_typetraits/reference/is_scalar.html +++ b/doc/html/boost_typetraits/reference/is_scalar.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_scalar : public true_type-or-false_type {};
 

@@ -124,13 +123,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_signed.html b/doc/html/boost_typetraits/reference/is_signed.html index ee0a985..d248dad 100644 --- a/doc/html/boost_typetraits/reference/is_signed.html +++ b/doc/html/boost_typetraits/reference/is_signed.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_signed : public true_type-or-false_type {};
 

@@ -118,13 +117,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_stateless.html b/doc/html/boost_typetraits/reference/is_stateless.html index a81c185..f4472d4 100644 --- a/doc/html/boost_typetraits/reference/is_stateless.html +++ b/doc/html/boost_typetraits/reference/is_stateless.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_stateless : public true_type-or-false_type {};
 

@@ -44,8 +43,7 @@ only inherits from true_type if the following expression is true:

-
-::boost::has_trivial_constructor<T>::value
+
::boost::has_trivial_constructor<T>::value
 && ::boost::has_trivial_copy<T>::value
 && ::boost::has_trivial_destructor<T>::value
 && ::boost::is_class<T>::value
@@ -74,13 +72,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/reference/is_union.html b/doc/html/boost_typetraits/reference/is_union.html index e74b394..ea59e84 100644 --- a/doc/html/boost_typetraits/reference/is_union.html +++ b/doc/html/boost_typetraits/reference/is_union.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_union : public true_type-or-false_type {};
 

@@ -111,13 +110,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_unsigned.html b/doc/html/boost_typetraits/reference/is_unsigned.html index a8f3121..59004b0 100644 --- a/doc/html/boost_typetraits/reference/is_unsigned.html +++ b/doc/html/boost_typetraits/reference/is_unsigned.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_unsigned : public true_type-or-false_type {};
 

@@ -120,13 +119,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_void.html b/doc/html/boost_typetraits/reference/is_void.html index 4e06720..516e4f7 100644 --- a/doc/html/boost_typetraits/reference/is_void.html +++ b/doc/html/boost_typetraits/reference/is_void.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_void : public true_type-or-false_type {};
 

@@ -98,13 +97,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/is_volatile.html b/doc/html/boost_typetraits/reference/is_volatile.html index 450a824..d66ddbc 100644 --- a/doc/html/boost_typetraits/reference/is_volatile.html +++ b/doc/html/boost_typetraits/reference/is_volatile.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct is_volatile : public true_type-or-false_type {};
 

@@ -98,13 +97,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/make_signed.html b/doc/html/boost_typetraits/reference/make_signed.html index d7ee39c..1a7aecb 100644 --- a/doc/html/boost_typetraits/reference/make_signed.html +++ b/doc/html/boost_typetraits/reference/make_signed.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct make_signed
 {
    typedef see-below type;
@@ -55,7 +54,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.15. Examples

+

Table 1.15. Examples

@@ -144,13 +143,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/make_unsigned.html b/doc/html/boost_typetraits/reference/make_unsigned.html index 18eb27f..e1ce164 100644 --- a/doc/html/boost_typetraits/reference/make_unsigned.html +++ b/doc/html/boost_typetraits/reference/make_unsigned.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct make_unsigned
 {
    typedef see-below type;
@@ -55,7 +54,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.16. Examples

+

Table 1.16. Examples

@@ -145,13 +144,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/promote.html b/doc/html/boost_typetraits/reference/promote.html index 7e8a7ed..088369c 100644 --- a/doc/html/boost_typetraits/reference/promote.html +++ b/doc/html/boost_typetraits/reference/promote.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct promote
 {
    typedef see-below type;
@@ -52,7 +51,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.17. Examples

+

Table 1.17. Examples

@@ -114,13 +113,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/rank.html b/doc/html/boost_typetraits/reference/rank.html index 177322f..11535db 100644 --- a/doc/html/boost_typetraits/reference/rank.html +++ b/doc/html/boost_typetraits/reference/rank.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct rank : public integral_constant<std::size_t, RANK(T)> {};
 

@@ -109,13 +108,14 @@

- +

+

diff --git a/doc/html/boost_typetraits/reference/remove_all_extents.html b/doc/html/boost_typetraits/reference/remove_all_extents.html index 0c578e3..a77101e 100644 --- a/doc/html/boost_typetraits/reference/remove_all_extents.html +++ b/doc/html/boost_typetraits/reference/remove_all_extents.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct remove_all_extents
 {
    typedef see-below type;
@@ -55,7 +54,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.18. Examples

+

Table 1.18. Examples

@@ -141,13 +140,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/remove_const.html b/doc/html/boost_typetraits/reference/remove_const.html index d9701f5..c42c2ca 100644 --- a/doc/html/boost_typetraits/reference/remove_const.html +++ b/doc/html/boost_typetraits/reference/remove_const.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct remove_const
 {
    typedef see-below type;
@@ -54,7 +53,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.19. Examples

+

Table 1.19. Examples

@@ -141,13 +140,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/remove_cv.html b/doc/html/boost_typetraits/reference/remove_cv.html index 5ddec45..e7fc15e 100644 --- a/doc/html/boost_typetraits/reference/remove_cv.html +++ b/doc/html/boost_typetraits/reference/remove_cv.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct remove_cv
 {
    typedef see-below type;
@@ -54,7 +53,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.20. Examples

+

Table 1.20. Examples

@@ -141,13 +140,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/remove_extent.html b/doc/html/boost_typetraits/reference/remove_extent.html index 1d79cf4..5a277db 100644 --- a/doc/html/boost_typetraits/reference/remove_extent.html +++ b/doc/html/boost_typetraits/reference/remove_extent.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct remove_extent
 {
    typedef see-below type;
@@ -55,7 +54,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.21. Examples

+

Table 1.21. Examples

@@ -141,13 +140,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/remove_pointer.html b/doc/html/boost_typetraits/reference/remove_pointer.html index f651a79..3fd04e5 100644 --- a/doc/html/boost_typetraits/reference/remove_pointer.html +++ b/doc/html/boost_typetraits/reference/remove_pointer.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct remove_pointer
 {
    typedef see-below type;
@@ -54,7 +53,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.22. Examples

+

Table 1.22. Examples

@@ -140,13 +139,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/remove_reference.html b/doc/html/boost_typetraits/reference/remove_reference.html index 4aa377e..c67ee77 100644 --- a/doc/html/boost_typetraits/reference/remove_reference.html +++ b/doc/html/boost_typetraits/reference/remove_reference.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct remove_reference
 {
    typedef see-below type;
@@ -54,7 +53,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.23. Examples

+

Table 1.23. Examples

@@ -128,13 +127,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/remove_volatile.html b/doc/html/boost_typetraits/reference/remove_volatile.html index 333f9d3..8c3bbdc 100644 --- a/doc/html/boost_typetraits/reference/remove_volatile.html +++ b/doc/html/boost_typetraits/reference/remove_volatile.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <class T>
+
template <class T>
 struct remove_volatile
 {
    typedef see-below type;
@@ -54,7 +53,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.24. Examples

+

Table 1.24. Examples

@@ -141,13 +140,14 @@
- +

+

diff --git a/doc/html/boost_typetraits/reference/type_with_alignment.html b/doc/html/boost_typetraits/reference/type_with_alignment.html index c0cabeb..3c8b133 100644 --- a/doc/html/boost_typetraits/reference/type_with_alignment.html +++ b/doc/html/boost_typetraits/reference/type_with_alignment.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ -
-template <std::size_t Align>
+
template <std::size_t Align>
 struct type_with_alignment
 {
    typedef see-below type;
@@ -45,13 +44,14 @@
 
- +

+

diff --git a/doc/html/boost_typetraits/user_defined.html b/doc/html/boost_typetraits/user_defined.html index aaa5add..31ce7b1 100644 --- a/doc/html/boost_typetraits/user_defined.html +++ b/doc/html/boost_typetraits/user_defined.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -34,8 +34,7 @@ or boost::false_type as appropriate:

-
-#include <boost/type_traits/is_pod.hpp>
+
#include <boost/type_traits/is_pod.hpp>
 #include <boost/type_traits/is_class.hpp>
 #include <boost/type_traits/is_union.hpp>
 
@@ -64,13 +63,14 @@
 
- +

+

diff --git a/doc/html/index.html b/doc/html/index.html index 09c933a..39b19c2 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -12,8 +12,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -30,7 +30,7 @@ Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert Ramey and Jeremy Siek

-

+

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)

@@ -155,10 +155,14 @@
Credits
+

+ A printer-friendly PDF + version of this manual is also available. +

- - + +

Last revised: November 07, 2007 at 18:38:23 +0000

Last revised: November 08, 2007 at 09:38:22 +0000


Next
diff --git a/doc/type_traits.qbk b/doc/type_traits.qbk index e53adaf..9bf50f8 100644 --- a/doc/type_traits.qbk +++ b/doc/type_traits.qbk @@ -116,6 +116,9 @@ [def __decay [link boost_typetraits.reference.decay decay]] [def __is_complex [link boost_typetraits.reference.is_complex is_complex]] +A printer-friendly [@http://svn.boost.org/svn/boost/sandbox/pdf/type_traits/release/type_traits.pdf + PDF version of this manual is also available]. + [section:intro Introduction] The Boost type-traits library contains a From 78eba00f6bbadca6ef87975d4535e70e0eae087e Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 15 Mar 2008 12:59:21 +0000 Subject: [PATCH 07/92] Update type traits links for new location. [SVN r43621] --- doc/credits.qbk | 4 ++-- doc/examples.qbk | 11 ++++++----- doc/intrinsics.qbk | 2 +- doc/mpl.qbk | 8 ++++---- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/doc/credits.qbk b/doc/credits.qbk index f8aab31..2c6c2cd 100644 --- a/doc/credits.qbk +++ b/doc/credits.qbk @@ -8,8 +8,8 @@ [section:credits Credits] This documentation was pulled together by John Maddock, using -[@../../tools/quickbook/doc/html/index.html Boost.Quickbook] -and [@boostbook.html Boost.DocBook]. +[@../../../../tools/quickbook/doc/html/index.html Boost.Quickbook] +and [@../../../../doc/html/boostbook.html Boost.DocBook]. The original version of this library was created by Steve Cleary, Beman Dawes, Howard Hinnant, and John Maddock. John Maddock is the diff --git a/doc/examples.qbk b/doc/examples.qbk index 386571c..32729d9 100644 --- a/doc/examples.qbk +++ b/doc/examples.qbk @@ -11,7 +11,7 @@ Demonstrates a version of `std::copy` that uses `__has_trivial_assign` to determine whether to use `memcpy` to optimise the copy operation -(see [@../../libs/type_traits/examples/copy_example.cpp copy_example.cpp]): +(see [@../../examples/copy_example.cpp copy_example.cpp]): // // opt::copy @@ -62,7 +62,7 @@ determine whether to use `memcpy` to optimise the copy operation Demonstrates a version of `std::fill` that uses `__has_trivial_assign` to determine whether to use `memset` to optimise the fill operation -(see [@../../libs/type_traits/examples/fill_example.cpp fill_example.cpp]): +(see [@../../examples/fill_example.cpp fill_example.cpp]): // // fill @@ -107,7 +107,7 @@ determine whether to use `memset` to optimise the fill operation Demonstrates a simple algorithm that uses `__has_trivial_destruct` to determine whether to destructors need to be called -(see [@../../libs/type_traits/examples/trivial_destructor_example.cpp trivial_destructor_example.cpp]): +(see [@../../examples/trivial_destructor_example.cpp trivial_destructor_example.cpp]): // // algorithm destroy_array: @@ -153,7 +153,7 @@ same as `std::iter_swap` does), however if they are proxying iterators then takes special care over the swap to ensure that the algorithm works correctly for both proxying iterators, and even iterators of different types -(see [@../../libs/type_traits/examples/iter_swap_example.cpp iter_swap_example.cpp]): +(see [@../../examples/iter_swap_example.cpp iter_swap_example.cpp]): // // iter_swap: @@ -203,7 +203,8 @@ different types [section:to_double Convert Numeric Types and Enums to double] Demonstrates a conversion of -[@../../libs/numeric/conversion/doc/definitions.html#numtypes Numeric Types] +[@../../../../libs/numeric/conversion/doc/html/boost_numericconversion/definitions.html#boost_numericconversion.definitions.numeric_types +Numeric Types] and enum types to double: template diff --git a/doc/intrinsics.qbk b/doc/intrinsics.qbk index 12f20e1..d8a0734 100644 --- a/doc/intrinsics.qbk +++ b/doc/intrinsics.qbk @@ -41,7 +41,7 @@ The following traits classes are dependent on one or more of the above: * __is_stateless The hooks for compiler-intrinsic support are defined in -[@../../boost/type_traits/intrinsics.hpp boost/type_traits/intrinsics.hpp], adding support for new compilers is simply +[@../../../../boost/type_traits/intrinsics.hpp boost/type_traits/intrinsics.hpp], adding support for new compilers is simply a matter of defining one of more of the following macros: [table Macros for Compiler Intrinsics diff --git a/doc/mpl.qbk b/doc/mpl.qbk index a9255c8..cc023d6 100644 --- a/doc/mpl.qbk +++ b/doc/mpl.qbk @@ -8,13 +8,13 @@ [section:mpl MPL Interoperability] All the value based traits in this library conform to MPL's requirements -for an [@../../libs/mpl/doc/refmanual/integral-constant.html Integral Constant type]: that includes a number of rather intrusive +for an [@../../../../libs/mpl/doc/refmanual/integral-constant.html Integral Constant type]: that includes a number of rather intrusive workarounds for broken compilers. Purely as an implementation detail, this -means that `__true_type` inherits from [@../../libs/mpl/doc/refmanual/bool.html `boost::mpl::true_`], `__false_type` inherits -from [@../../libs/mpl/doc/refmanual/bool.html `boost::mpl::false_`], and `__integral_constant` inherits from -[@../../libs/mpl/doc/refmanual/integral-c.html `boost::mpl::integral_c`] (provided `T` is not `bool`) +means that `__true_type` inherits from [@../../../../libs/mpl/doc/refmanual/bool.html `boost::mpl::true_`], `__false_type` inherits +from [@../../../../libs/mpl/doc/refmanual/bool.html `boost::mpl::false_`], and `__integral_constant` inherits from +[@../../../../libs/mpl/doc/refmanual/integral-c.html `boost::mpl::integral_c`] (provided `T` is not `bool`) [endsect] From 8fa9c7e6a709d6b91830339b891e52e77e8fff5e Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 15 Mar 2008 13:04:57 +0000 Subject: [PATCH 08/92] Regenerate the type traits docs, to get changes from [43621]. Refs #1686. [SVN r43622] --- doc/html/boost_typetraits/background.html | 122 ++++++++++-------- doc/html/boost_typetraits/category.html | 6 +- .../boost_typetraits/category/alignment.html | 17 +-- .../boost_typetraits/category/function.html | 15 ++- .../boost_typetraits/category/transform.html | 55 ++++---- .../category/value_traits.html | 14 +- .../category/value_traits/primary.html | 58 +++++---- .../category/value_traits/properties.html | 57 ++++---- .../category/value_traits/relate.html | 15 ++- doc/html/boost_typetraits/credits.html | 12 +- doc/html/boost_typetraits/examples.html | 6 +- doc/html/boost_typetraits/examples/copy.html | 19 +-- .../boost_typetraits/examples/destruct.html | 17 +-- doc/html/boost_typetraits/examples/fill.html | 21 +-- doc/html/boost_typetraits/examples/iter.html | 23 ++-- .../boost_typetraits/examples/to_double.html | 11 +- doc/html/boost_typetraits/intrinsics.html | 38 +++--- doc/html/boost_typetraits/intro.html | 10 +- doc/html/boost_typetraits/mpl.html | 20 +-- doc/html/boost_typetraits/reference.html | 6 +- .../boost_typetraits/reference/add_const.html | 13 +- .../boost_typetraits/reference/add_cv.html | 13 +- .../reference/add_pointer.html | 13 +- .../reference/add_reference.html | 13 +- .../reference/add_volatile.html | 13 +- .../reference/aligned_storage.html | 9 +- .../reference/alignment_of.html | 15 ++- .../boost_typetraits/reference/decay.html | 11 +- .../boost_typetraits/reference/extent.html | 19 +-- .../reference/floating_point_promotion.html | 11 +- .../reference/function_traits.html | 15 ++- .../reference/has_no_throw_def_cons.html | 8 +- .../reference/has_nothrow_assign.html | 15 ++- .../reference/has_nothrow_constructor.html | 19 +-- .../reference/has_nothrow_copy.html | 19 +-- .../reference/has_nothrow_cp_cons.html | 8 +- .../reference/has_trivial_assign.html | 21 +-- .../reference/has_trivial_constructor.html | 23 ++-- .../reference/has_trivial_copy.html | 23 ++-- .../reference/has_trivial_cp_cons.html | 8 +- .../reference/has_trivial_def_cons.html | 8 +- .../reference/has_trivial_destructor.html | 21 +-- .../reference/has_virtual_destructor.html | 21 +-- .../reference/integral_constant.html | 9 +- .../reference/integral_promotion.html | 11 +- .../reference/is_abstract.html | 21 +-- .../reference/is_arithmetic.html | 23 ++-- .../boost_typetraits/reference/is_array.html | 19 +-- .../reference/is_base_of.html | 21 +-- .../boost_typetraits/reference/is_class.html | 25 ++-- .../reference/is_complex.html | 11 +- .../reference/is_compound.html | 21 +-- .../boost_typetraits/reference/is_const.html | 19 +-- .../reference/is_convertible.html | 24 ++-- .../boost_typetraits/reference/is_empty.html | 21 +-- .../boost_typetraits/reference/is_enum.html | 21 +-- .../reference/is_floating_point.html | 19 +-- .../reference/is_function.html | 30 +++-- .../reference/is_fundamental.html | 25 ++-- .../reference/is_integral.html | 19 +-- .../reference/is_member_function_pointer.html | 23 ++-- .../reference/is_member_object_pointer.html | 23 ++-- .../reference/is_member_pointer.html | 19 +-- .../boost_typetraits/reference/is_object.html | 19 +-- .../boost_typetraits/reference/is_pod.html | 19 +-- .../reference/is_pointer.html | 19 +-- .../reference/is_polymorphic.html | 19 +-- .../reference/is_reference.html | 19 +-- .../boost_typetraits/reference/is_same.html | 19 +-- .../boost_typetraits/reference/is_scalar.html | 19 +-- .../boost_typetraits/reference/is_signed.html | 19 +-- .../reference/is_stateless.html | 22 ++-- .../boost_typetraits/reference/is_union.html | 23 ++-- .../reference/is_unsigned.html | 19 +-- .../boost_typetraits/reference/is_void.html | 19 +-- .../reference/is_volatile.html | 19 +-- .../reference/make_signed.html | 11 +- .../reference/make_unsigned.html | 11 +- .../boost_typetraits/reference/promote.html | 15 ++- doc/html/boost_typetraits/reference/rank.html | 17 +-- .../reference/remove_all_extents.html | 13 +- .../reference/remove_const.html | 13 +- .../boost_typetraits/reference/remove_cv.html | 13 +- .../reference/remove_extent.html | 13 +- .../reference/remove_pointer.html | 13 +- .../reference/remove_reference.html | 13 +- .../reference/remove_volatile.html | 13 +- .../reference/type_with_alignment.html | 9 +- doc/html/boost_typetraits/user_defined.html | 21 +-- doc/html/index.html | 6 +- 90 files changed, 905 insertions(+), 815 deletions(-) diff --git a/doc/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index 6d49b8e..4beb97f 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -3,7 +3,7 @@ Background and Tutorial - + @@ -12,7 +12,7 @@ - + @@ -24,7 +24,7 @@

The following is an updated version of the article "C++ Type traits" @@ -56,19 +56,19 @@ method available to them.

- - Type Traits + + Type Traits

Class char_traits is a classic example of a collection of type specific properties wrapped up in a single - class - what Nathan Myers termed a baggage class[1]. In the Boost type-traits library, - we[2] have written a set of very + class - what Nathan Myers termed a baggage class[1]. In the Boost type-traits library, + we[2] have written a set of very specific traits classes, each of which encapsulate a single trait from the C++ type system; for example, is a type a pointer or a reference type? Or does a type have a trivial constructor, or a const-qualifier? The type-traits classes - share a unified design: each class inherits from a the type true_type - if the type has the specified property and inherits from false_type + share a unified design: each class inherits from a the type true_type + if the type has the specified property and inherits from false_type otherwise. As we will show, these classes can be used in generic programming to determine the properties of a given type and introduce optimizations that are appropriate for that case. @@ -84,8 +84,8 @@ given.

- - Implementation + + Implementation

There are far too many separate classes contained in the type-traits library @@ -94,17 +94,18 @@ anyway, so here we will just give you a flavor for how some of the classes are implemented. Beginning with possibly the simplest class in the library, is_void<T> inherits - from true_type + from true_type only if T is void.

-
template <typename T> 
-struct is_void : public false_type{};
+
+template <typename T> 
+struct is_void : public false_type{};
 
 template <> 
-struct is_void<void> : public true_type{};
+struct is_void<void> : public true_type{};
 

- Here we define a primary version of the template class is_void, + Here we define a primary version of the template class is_void, and provide a full-specialization when T is void. While full specialization of a template class is an important technique, sometimes we need a solution @@ -115,11 +116,12 @@ a pointer, and a partial specialization to handle all the cases where T is a pointer:

-
template <typename T> 
-struct is_pointer : public false_type{};
+
+template <typename T> 
+struct is_pointer : public false_type{};
 
 template <typename T> 
-struct is_pointer<T*> : public true_type{};
+struct is_pointer<T*> : public true_type{};
 

The syntax for partial specialization is somewhat arcane and could easily occupy @@ -132,13 +134,15 @@ but as a rule of thumb if you can legally write two function overloads of the form:

-
void foo(T);
+
+void foo(T);
 void foo(U);
 

Then you can also write a partial specialization of the form:

-
template <typename T>
+
+template <typename T>
 class c{ /*details*/ };
 
 template <typename T>
@@ -154,18 +158,19 @@
       that is the same type as T but with any top-level array bounds removed; this
       is an example of a traits class that performs a transformation on a type:
     

-
template <typename T> 
-struct remove_extent
+
+template <typename T> 
+struct remove_extent
 { typedef T type; };
 
 template <typename T, std::size_t N> 
-struct remove_extent<T[N]>
+struct remove_extent<T[N]>
 { typedef T type; };
 

- The aim of remove_extent + The aim of remove_extent is this: imagine a generic algorithm that is passed an array type as a template - parameter, remove_extent + parameter, remove_extent provides a means of determining the underlying type of the array. For example remove_extent<int[4][5]>::type would evaluate to the type int[5]. This example also shows that the number of template parameters in a partial specialization does not have to match the @@ -174,14 +179,15 @@ in the default template.

- - Optimized copy + + Optimized copy

As an example of how the type traits classes can be used, consider the standard library algorithm copy:

-
template<typename Iter1, typename Iter2>
+
+template<typename Iter1, typename Iter2>
 Iter2 copy(Iter1 first, Iter1 last, Iter2 out);
 

@@ -208,7 +214,7 @@

- By trivial assignment operator we mean that the type is either a scalar type[3] or: + By trivial assignment operator we mean that the type is either a scalar type[3] or:

  • @@ -224,20 +230,20 @@

If all these conditions are met then a type can be copied using memcpy rather than using a compiler generated - assignment operator. The type-traits library provides a class has_trivial_assign, + assignment operator. The type-traits library provides a class has_trivial_assign, such that has_trivial_assign<T>::value is true only if T has a trivial assignment operator. This class "just works" for scalar types, but has to be explicitly specialised for class/struct types that also happen to have a trivial - assignment operator. In other words if has_trivial_assign + assignment operator. In other words if has_trivial_assign gives the wrong answer, it will give the "safe" wrong answer - that trivial assignment is not allowable.

The code for an optimized version of copy that uses memcpy - where appropriate is given in the + where appropriate is given in the examples. The code begins by defining a template function do_copy that performs a "slow but safe" - copy. The last parameter passed to this function may be either a true_type - or a false_type. + copy. The last parameter passed to this function may be either a true_type + or a false_type. Following that there is an overload of docopy that uses `memcpy`: this time the iterators are required to actually be pointers to the same type, and the final parameter must be a `_true_type. Finally, the version @@ -247,15 +253,15 @@ otherwise it will call the "slow but safe version".

- - Was it worth it? + + Was it worth it?

It has often been repeated in these columns that "premature optimization - is the root of all evil" [4]. + is the root of all evil" [4]. So the question must be asked: was our optimization premature? To put this in perspective the timings for our version of copy compared a conventional - generic copy[5] are shown in table + generic copy[5] are shown in table 1.

@@ -280,7 +286,7 @@

-

Table 1.1. Time taken to copy 1000 elements using `copy<const +

Table 1.1. Time taken to copy 1000 elements using `copy<const T*, T*>` (times in micro-seconds)

Boost C++ LibrariesHomeHome Libraries People FAQ
@@ -379,8 +385,8 @@

- - Pair of References + + Pair of References

The optimized copy example shows how type traits may be used to perform optimization @@ -388,14 +394,15 @@ code to compile that otherwise would not do so unless excessive partial specialization is used. This is possible by delegating partial specialization to the type traits classes. Our example for this form of usage is a pair that can hold - references [6]. + references [6].

First, let us examine the definition of std::pair, omitting the comparison operators, default constructor, and template copy constructor for simplicity:

-
template <typename T1, typename T2> 
+
+template <typename T1, typename T2> 
 struct pair 
 {
 typedef T1 first_type;
@@ -411,12 +418,12 @@
 

Now, this "pair" cannot hold references as it currently stands, because the constructor would require taking a reference to a reference, which is currently - illegal [7]. Let us consider what + illegal [7]. Let us consider what the constructor's parameters would have to be in order to allow "pair" to hold non-reference types, references, and constant references:

-

Table 1.2. Required Constructor Argument Types

+

Table 1.2. Required Constructor Argument Types

@@ -477,11 +484,11 @@

A little familiarity with the type traits classes allows us to construct a single mapping that allows us to determine the type of parameter from the type - of the contained class. The type traits classes provide a transformation add_reference, which + of the contained class. The type traits classes provide a transformation add_reference, which adds a reference to its type, unless it is already a reference.

-

Table 1.3. Using add_reference to synthesize the correct constructor +

Table 1.3. Using add_reference to synthesize the correct constructor type

@@ -567,7 +574,8 @@ that can contain non-reference types, reference types, and constant reference types:

-
template <typename T1, typename T2> 
+
+template <typename T1, typename T2> 
 struct pair 
 {
 typedef T1 first_type;
@@ -576,8 +584,8 @@
 T1 first;
 T2 second;
 
-pair(boost::add_reference<const T1>::type nfirst,
-      boost::add_reference<const T2>::type nsecond)
+pair(boost::add_reference<const T1>::type nfirst,
+      boost::add_reference<const T2>::type nsecond)
 :first(nfirst), second(nsecond) { }
 };
 
@@ -598,8 +606,8 @@ easier to maintain and easier to understand.

- - Conclusion + + Conclusion

We hope that in this article we have been able to give you some idea of what @@ -611,16 +619,16 @@ can be optimal as well as generic.

- - Acknowledgements + + Acknowledgements

The authors would like to thank Beman Dawes and Howard Hinnant for their helpful comments when preparing this article.

- - References + + References
  1. diff --git a/doc/html/boost_typetraits/category.html b/doc/html/boost_typetraits/category.html index cdf6353..fb652db 100644 --- a/doc/html/boost_typetraits/category.html +++ b/doc/html/boost_typetraits/category.html @@ -3,7 +3,7 @@ Type Traits by Category - + @@ -12,7 +12,7 @@
- + @@ -24,7 +24,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,23 +24,24 @@

Some low level memory management routines need to synthesize a POD type with - specific alignment properties. The template type_with_alignment - finds the smallest type with a specified alignment, while template aligned_storage + specific alignment properties. The template type_with_alignment + finds the smallest type with a specified alignment, while template aligned_storage creates a type with a specific size and alignment.

Synopsis

-
template <std::size_t Align>
-struct type_with_alignment;
+
+template <std::size_t Align>
+struct type_with_alignment;
 
 template <std::size_t Size, std::size_t Align>
-struct aligned_storage;
+struct aligned_storage;
 
Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/category/function.html b/doc/html/boost_typetraits/category/function.html index b32289e..52e18cd 100644 --- a/doc/html/boost_typetraits/category/function.html +++ b/doc/html/boost_typetraits/category/function.html @@ -3,7 +3,7 @@ Decomposing Function Types - + @@ -12,7 +12,7 @@
- + @@ -24,20 +24,21 @@

- The class template function_traits - extracts information from function types (see also is_function). + The class template function_traits + extracts information from function types (see also is_function). This traits class allows you to tell how many arguments a function takes, what those argument types are, and what the return type is.

Synopsis

-
template <std::size_t Align>
-struct function_traits;
+
+template <std::size_t Align>
+struct function_traits;
 
Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/category/transform.html b/doc/html/boost_typetraits/category/transform.html index a91fa23..df430ca 100644 --- a/doc/html/boost_typetraits/category/transform.html +++ b/doc/html/boost_typetraits/category/transform.html @@ -3,7 +3,7 @@ Type Traits that Transform One Type to Another - + @@ -12,7 +12,7 @@
- + @@ -24,7 +24,7 @@

@@ -36,63 +36,64 @@

Synopsis:

-
template <class T>
-struct add_const;
+
+template <class T>
+struct add_const;
 
 template <class T>
-struct add_cv;
+struct add_cv;
 
 template <class T>
-struct add_pointer;
+struct add_pointer;
 
 template <class T>
-struct add_reference;
+struct add_reference;
 
 template <class T>
-struct add_volatile;
+struct add_volatile;
 
 template <class T>
-struct decay;
+struct decay;
 
 template <class T>
-struct floating_point_promotion;
+struct floating_point_promotion;
 
 template <class T>
-struct integral_promotion;
+struct integral_promotion;
 
 template <class T>
-struct make_signed;
+struct make_signed;
 
 template <class T>
-struct make_unsigned;
+struct make_unsigned;
 
 template <class T>
-struct promote;
+struct promote;
 
 template <class T>
-struct remove_all_extents;
+struct remove_all_extents;
 
 template <class T>
-struct remove_const;
+struct remove_const;
 
 template <class T>
-struct remove_cv;
+struct remove_cv;
 
 template <class T>
-struct remove_extent;
+struct remove_extent;
 
 template <class T>
-struct remove_pointer;
+struct remove_pointer;
 
 template <class T>
-struct remove_reference;
+struct remove_reference;
 
 template <class T>
-struct remove_volatile;
+struct remove_volatile;
 
- - Broken + + Broken Compiler Workarounds:

@@ -116,7 +117,8 @@

The first part guarantees the successful compilation of something like this:

-
BOOST_STATIC_ASSERT((is_same<char, remove_reference<char&>::type>::value));
+
+BOOST_STATIC_ASSERT((is_same<char, remove_reference<char&>::type>::value));
 BOOST_STATIC_ASSERT((is_same<char const, remove_reference<char const&>::type>::value));
 BOOST_STATIC_ASSERT((is_same<char volatile, remove_reference<char volatile&>::type>::value));
 BOOST_STATIC_ASSERT((is_same<char const volatile, remove_reference<char const volatile&>::type>::value));
@@ -131,7 +133,8 @@
         int or other built-in type,
         but for their own types as well:
       

-
namespace myspace{
+
+namespace myspace{
    struct MyClass {};
 }
 // declare this at global scope:
diff --git a/doc/html/boost_typetraits/category/value_traits.html b/doc/html/boost_typetraits/category/value_traits.html
index 9a9f27c..c2795f5 100644
--- a/doc/html/boost_typetraits/category/value_traits.html
+++ b/doc/html/boost_typetraits/category/value_traits.html
@@ -3,7 +3,7 @@
 
 Type Traits that Describe the Properties of a Type
 
-
+
 
 
 
@@ -12,7 +12,7 @@
 
 
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,7 +24,7 @@
@@ -37,13 +37,13 @@

These traits are all value traits, which is to say the - traits classes all inherit from integral_constant, + traits classes all inherit from integral_constant, and are used to access some numerical property of a type. Often this is a simple true or false Boolean value, but in a few cases may be some other integer value (for example when dealing with type alignments, or array bounds: - see alignment_of, - rank - and extent). + see alignment_of, + rank + and extent).

Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/category/value_traits/primary.html b/doc/html/boost_typetraits/category/value_traits/primary.html index bd026c2..5799c9b 100644 --- a/doc/html/boost_typetraits/category/value_traits/primary.html +++ b/doc/html/boost_typetraits/category/value_traits/primary.html @@ -3,7 +3,7 @@ Categorizing a Type - + @@ -12,7 +12,7 @@
- + @@ -24,7 +24,7 @@

@@ -33,13 +33,13 @@ are compositions of one or more primary traits.

- For any given type, exactly one primary type trait will inherit from true_type, - and all the others will inherit from false_type, + For any given type, exactly one primary type trait will inherit from true_type, + and all the others will inherit from false_type, in other words these traits are mutually exclusive.

- This means that is_integral<T>::value - and is_floating_point<T>::value + This means that is_integral<T>::value + and is_floating_point<T>::value will only ever be true for built-in types; if you want to check for a user-defined class type that behaves "as if" it is an integral or floating point type, then use the std::numeric_limits @@ -48,67 +48,69 @@

Synopsis:

-
template <class T>
-struct is_array<T>;
+
+template <class T>
+struct is_array<T>;
   
 template <class T>
-struct is_class<T>;
+struct is_class<T>;
 
 template <class T>
-struct is_complex<T>;
+struct is_complex<T>;
   
 template <class T>
-struct is_enum<T>;
+struct is_enum<T>;
   
 template <class T>
-struct is_floating_point<T>;
+struct is_floating_point<T>;
   
 template <class T>
-struct is_function<T>;
+struct is_function<T>;
 
 template <class T>
-struct is_integral<T>;
+struct is_integral<T>;
   
 template <class T>
-struct is_member_function_pointer<T>;
+struct is_member_function_pointer<T>;
   
 template <class T>
-struct is_member_object_pointer<T>;
+struct is_member_object_pointer<T>;
   
 template <class T>
-struct is_pointer<T>;
+struct is_pointer<T>;
   
 template <class T>
-struct is_reference<T>;
+struct is_reference<T>;
   
 template <class T>
-struct is_union<T>;
+struct is_union<T>;
   
 template <class T>
-struct is_void<T>;
+struct is_void<T>;
 

The following traits are made up of the union of one or more type categorizations. A type may belong to more than one of these categories, in addition to one of the primary categories.

-
template <class T>
-struct is_arithmetic;
+
+template <class T>
+struct is_arithmetic;
 
 template <class T>
-struct is_compound;
+struct is_compound;
 
 template <class T>
-struct is_fundamental;
+struct is_fundamental;
 
 template <class T>
-struct is_member_pointer;
+struct is_member_pointer;
 
 template <class T>
-struct is_object;
+struct is_object;
 
 template <class T>
-struct is_scalar;
+struct is_scalar;
 
Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/category/value_traits/properties.html b/doc/html/boost_typetraits/category/value_traits/properties.html index bf034ae..b1a3a5d 100644 --- a/doc/html/boost_typetraits/category/value_traits/properties.html +++ b/doc/html/boost_typetraits/category/value_traits/properties.html @@ -3,7 +3,7 @@ General Type Properties - + @@ -12,7 +12,7 @@
- + @@ -24,7 +24,7 @@

@@ -33,77 +33,78 @@

Synopsis:

-
template <class T>
-struct alignment_of;
+
+template <class T>
+struct alignment_of;
 
 template <class T>
-struct has_nothrow_assign;
+struct has_nothrow_assign;
 
 template <class T>
-struct has_nothrow_constructor;
+struct has_nothrow_constructor;
 
 template <class T>
-struct has_nothrow_default_constructor;
+struct has_nothrow_default_constructor;
 
 template <class T>
-struct has_nothrow_copy;
+struct has_nothrow_copy;
 
 template <class T>
-struct has_nothrow_copy_constructor;
+struct has_nothrow_copy_constructor;
 
 template <class T>
-struct has_trivial_assign;
+struct has_trivial_assign;
 
 template <class T>
-struct has_trivial_constructor;
+struct has_trivial_constructor;
 
 template <class T>
-struct has_trivial_default_constructor;
+struct has_trivial_default_constructor;
 
 template <class T>
-struct has_trivial_copy;
+struct has_trivial_copy;
 
 template <class T>
-struct has_trivial_copy_constructor;
+struct has_trivial_copy_constructor;
 
 template <class T>
-struct has_trivial_destructor;
+struct has_trivial_destructor;
 
 template <class T>
-struct has_virtual_destructor;
+struct has_virtual_destructor;
 
 template <class T>
-struct is_abstract;
+struct is_abstract;
 
 template <class T>
-struct is_const;
+struct is_const;
 
 template <class T>
-struct is_empty;
+struct is_empty;
 
 template <class T>
-struct is_stateless;
+struct is_stateless;
 
 template <class T>
-struct is_pod;
+struct is_pod;
 
 template <class T>
-struct is_polymorphic;
+struct is_polymorphic;
 
 template <class T>
-struct is_signed;
+struct is_signed;
 
 template <class T>
-struct is_unsigned;
+struct is_unsigned;
 
 template <class T>
-struct is_volatile;
+struct is_volatile;
 
 template <class T, std::size_t N = 0>
-struct extent;
+struct extent;
 
 template <class T>
-struct rank;
+struct rank;
 
Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/category/value_traits/relate.html b/doc/html/boost_typetraits/category/value_traits/relate.html index 938f763..09db8ea 100644 --- a/doc/html/boost_typetraits/category/value_traits/relate.html +++ b/doc/html/boost_typetraits/category/value_traits/relate.html @@ -3,7 +3,7 @@ Relationships Between Two Types - + @@ -12,7 +12,7 @@
- + @@ -24,7 +24,7 @@

@@ -34,14 +34,15 @@

Synopsis:

-
template <class Base, class Derived>
-struct is_base_of;
+
+template <class Base, class Derived>
+struct is_base_of;
 
 template <class From, class To>
-struct is_convertible;
+struct is_convertible;
 
 template <class T, class U>
-struct is_same;
+struct is_same;
 
Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/credits.html b/doc/html/boost_typetraits/credits.html index 69085e0..5ba3552 100644 --- a/doc/html/boost_typetraits/credits.html +++ b/doc/html/boost_typetraits/credits.html @@ -3,7 +3,7 @@ Credits - + @@ -11,7 +11,7 @@
- + @@ -23,11 +23,11 @@

- This documentation was pulled together by John Maddock, using Boost.Quickbook - and Boost.DocBook. + This documentation was pulled together by John Maddock, using Boost.Quickbook + and Boost.DocBook.

The original version of this library was created by Steve Cleary, Beman Dawes, @@ -49,7 +49,7 @@ Aleksey Gurtovoy added MPL integration to the library.

- The is_convertible + The is_convertible template is based on code originally devised by Andrei Alexandrescu, see "Generic<Programming>: Mappings between Types and Values".

diff --git a/doc/html/boost_typetraits/examples.html b/doc/html/boost_typetraits/examples.html index afa695d..3003c46 100644 --- a/doc/html/boost_typetraits/examples.html +++ b/doc/html/boost_typetraits/examples.html @@ -3,7 +3,7 @@ Examples - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,7 +24,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,16 +24,17 @@

Demonstrates a version of std::copy - that uses has_trivial_assign + that uses has_trivial_assign to determine whether to use memcpy - to optimise the copy operation (see copy_example.cpp): + to optimise the copy operation (see copy_example.cpp):

-
//
+
+//
 // opt::copy
 // same semantics as std::copy
 // calls memcpy where appropriate.
@@ -42,7 +43,7 @@
 namespace detail{
 
 template<typename I1, typename I2, bool b>
-I2 copy_imp(I1 first, I1 last, I2 out, const boost::integral_constant<bool, b>&)
+I2 copy_imp(I1 first, I1 last, I2 out, const boost::integral_constant<bool, b>&)
 {
    while(first != last)
    {
@@ -54,7 +55,7 @@
 }
 
 template<typename T>
-T* copy_imp(const T* first, const T* last, T* out, const boost::true_type&)
+T* copy_imp(const T* first, const T* last, T* out, const boost::true_type&)
 {
    memcpy(out, first, (last-first)*sizeof(T));
    return out+(last-first);
@@ -72,7 +73,7 @@
    // requirement we detect with overload resolution):
    //
    typedef typename std::iterator_traits<I1>::value_type value_type;
-   return detail::copy_imp(first, last, out, boost::has_trivial_assign<value_type>());
+   return detail::copy_imp(first, last, out, boost::has_trivial_assign<value_type>());
 }
 
diff --git a/doc/html/boost_typetraits/examples/destruct.html b/doc/html/boost_typetraits/examples/destruct.html index 4545f5e..1f26bb7 100644 --- a/doc/html/boost_typetraits/examples/destruct.html +++ b/doc/html/boost_typetraits/examples/destruct.html @@ -3,7 +3,7 @@ An Example that Omits Destructor Calls For Types with Trivial Destructors - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,14 +24,15 @@

Demonstrates a simple algorithm that uses __has_trivial_destruct - to determine whether to destructors need to be called (see trivial_destructor_example.cpp): + to determine whether to destructors need to be called (see trivial_destructor_example.cpp):

-
//
+
+//
 // algorithm destroy_array:
 // The reverse of std::unitialized_copy, takes a block of
 // initialized memory and calls destructors on all objects therein.
@@ -40,7 +41,7 @@
 namespace detail{
 
 template <class T>
-void do_destroy_array(T* first, T* last, const boost::false_type&)
+void do_destroy_array(T* first, T* last, const boost::false_type&)
 {
    while(first != last)
    {
@@ -50,7 +51,7 @@
 }
 
 template <class T>
-inline void do_destroy_array(T* first, T* last, const boost::true_type&)
+inline void do_destroy_array(T* first, T* last, const boost::true_type&)
 {
 }
 
@@ -59,7 +60,7 @@
 template <class T>
 inline void destroy_array(T* p1, T* p2)
 {
-   detail::do_destroy_array(p1, p2, ::boost::has_trivial_destructor<T>());
+   detail::do_destroy_array(p1, p2, ::boost::has_trivial_destructor<T>());
 }
 
diff --git a/doc/html/boost_typetraits/examples/fill.html b/doc/html/boost_typetraits/examples/fill.html index 9e75407..4ad227f 100644 --- a/doc/html/boost_typetraits/examples/fill.html +++ b/doc/html/boost_typetraits/examples/fill.html @@ -3,7 +3,7 @@ An Optimised Version of std::fill - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,23 +24,24 @@

Demonstrates a version of std::fill - that uses has_trivial_assign + that uses has_trivial_assign to determine whether to use memset - to optimise the fill operation (see fill_example.cpp): + to optimise the fill operation (see fill_example.cpp):

-
//
+
+//
 // fill
 // same as std::fill, but uses memset where appropriate
 //
 namespace detail{
 
 template <typename I, typename T, bool b>
-void do_fill(I first, I last, const T& val, const boost::integral_constant<bool, b>&)
+void do_fill(I first, I last, const T& val, const boost::integral_constant<bool, b>&)
 {
    while(first != last)
    {
@@ -50,7 +51,7 @@
 }
 
 template <typename T>
-void do_fill(T* first, T* last, const T& val, const boost::true_type&)
+void do_fill(T* first, T* last, const T& val, const boost::true_type&)
 {
    std::memset(first, val, last-first);
 }
@@ -64,8 +65,8 @@
    // We can do an optimised fill if T has a trivial assignment 
    // operator and if it's size is one:
    //
-   typedef boost::integral_constant<bool, 
-      ::boost::has_trivial_assign<T>::value && (sizeof(T) == 1)> truth_type;
+   typedef boost::integral_constant<bool, 
+      ::boost::has_trivial_assign<T>::value && (sizeof(T) == 1)> truth_type;
    detail::do_fill(first, last, val, truth_type());
 }
 
diff --git a/doc/html/boost_typetraits/examples/iter.html b/doc/html/boost_typetraits/examples/iter.html index 3c8f937..ec04c97 100644 --- a/doc/html/boost_typetraits/examples/iter.html +++ b/doc/html/boost_typetraits/examples/iter.html @@ -3,7 +3,7 @@ An improved Version of std::iter_swap - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,7 +24,7 @@

@@ -34,9 +34,10 @@ of it's dereferenced arguments (the same as std::iter_swap does), however if they are proxying iterators then takes special care over the swap to ensure that the algorithm works correctly for both proxying iterators, - and even iterators of different types (see iter_swap_example.cpp): + and even iterators of different types (see iter_swap_example.cpp):

-
//
+
+//
 // iter_swap:
 // tests whether iterator is a proxying iterator or not, and
 // uses optimal form accordingly:
@@ -44,7 +45,7 @@
 namespace detail{
 
 template <typename I>
-static void do_swap(I one, I two, const boost::false_type&)
+static void do_swap(I one, I two, const boost::false_type&)
 {
    typedef typename std::iterator_traits<I>::value_type v_t;
    v_t v = *one;
@@ -52,7 +53,7 @@
    *two = v;
 }
 template <typename I>
-static void do_swap(I one, I two, const boost::true_type&)
+static void do_swap(I one, I two, const boost::true_type&)
 {
    using std::swap;
    swap(*one, *two);
@@ -70,10 +71,10 @@
    typedef typename std::iterator_traits<I1>::reference r1_t;
    typedef typename std::iterator_traits<I2>::reference r2_t;
 
-   typedef boost::integral_constant<bool,
-      ::boost::is_reference<r1_t>::value
-      && ::boost::is_reference<r2_t>::value
-      && ::boost::is_same<r1_t, r2_t>::value> truth_type;
+   typedef boost::integral_constant<bool,
+      ::boost::is_reference<r1_t>::value
+      && ::boost::is_reference<r2_t>::value
+      && ::boost::is_same<r1_t, r2_t>::value> truth_type;
 
    detail::do_swap(one, two, truth_type());
 }
diff --git a/doc/html/boost_typetraits/examples/to_double.html b/doc/html/boost_typetraits/examples/to_double.html
index fa515ea..976d4a9 100644
--- a/doc/html/boost_typetraits/examples/to_double.html
+++ b/doc/html/boost_typetraits/examples/to_double.html
@@ -3,7 +3,7 @@
 
 Convert Numeric Types and Enums to double
 
-
+
 
 
 
@@ -12,7 +12,7 @@
 
 
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,14 +24,15 @@

- Demonstrates a conversion of Numeric + Demonstrates a conversion of Numeric Types and enum types to double:

-
template<class T>
+
+template<class T>
 inline double to_double(T const& value)
 {
     typedef typename boost::promote<T>::type promoted;
diff --git a/doc/html/boost_typetraits/intrinsics.html b/doc/html/boost_typetraits/intrinsics.html
index 8a27fdc..2ac02bc 100644
--- a/doc/html/boost_typetraits/intrinsics.html
+++ b/doc/html/boost_typetraits/intrinsics.html
@@ -3,7 +3,7 @@
 
 Support for Compiler Intrinsics
 
-
+
 
 
 
@@ -12,7 +12,7 @@
 
 
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,7 +24,7 @@

There are some traits that can not be implemented within the current C++ language: @@ -38,16 +38,16 @@ for all types (but all have safe fallback positions if this support is unavailable):

The following traits classes can't be portably implemented in the C++ language, @@ -55,23 +55,23 @@ all the compilers we know about:

The following traits classes are dependent on one or more of the above:

- The hooks for compiler-intrinsic support are defined in boost/type_traits/intrinsics.hpp, + The hooks for compiler-intrinsic support are defined in boost/type_traits/intrinsics.hpp, adding support for new compilers is simply a matter of defining one of more of the following macros:

-

Table 1.4. Macros for Compiler Intrinsics

+

Table 1.4. Macros for Compiler Intrinsics

Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/intro.html b/doc/html/boost_typetraits/intro.html index ba07a52..01a84d8 100644 --- a/doc/html/boost_typetraits/intro.html +++ b/doc/html/boost_typetraits/intro.html @@ -3,7 +3,7 @@ Introduction - + @@ -12,7 +12,7 @@
- + @@ -24,7 +24,7 @@

The Boost type-traits library contains a set of very specific traits classes, @@ -34,8 +34,8 @@

The type-traits classes share a unified design: each class inherits from a - the type true_type - if the type has the specified property and inherits from false_type + the type true_type + if the type has the specified property and inherits from false_type otherwise.

diff --git a/doc/html/boost_typetraits/mpl.html b/doc/html/boost_typetraits/mpl.html index 063944a..8338fdd 100644 --- a/doc/html/boost_typetraits/mpl.html +++ b/doc/html/boost_typetraits/mpl.html @@ -3,7 +3,7 @@ MPL Interoperability - + @@ -12,7 +12,7 @@

Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,22 +24,22 @@

All the value based traits in this library conform to MPL's requirements for - an Integral + an Integral Constant type: that includes a number of rather intrusive workarounds for broken compilers.

- Purely as an implementation detail, this means that true_type - inherits from boost::mpl::true_, - false_type - inherits from boost::mpl::false_, - and integral_constant<T, + Purely as an implementation detail, this means that true_type + inherits from boost::mpl::true_, + false_type + inherits from boost::mpl::false_, + and integral_constant<T, v> - inherits from boost::mpl::integral_c<T,v> + inherits from boost::mpl::integral_c<T,v> (provided T is not bool)

diff --git a/doc/html/boost_typetraits/reference.html b/doc/html/boost_typetraits/reference.html index 9638957..26d6dfe 100644 --- a/doc/html/boost_typetraits/reference.html +++ b/doc/html/boost_typetraits/reference.html @@ -3,7 +3,7 @@ Alphabetical Reference - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,7 +24,7 @@
add_const
diff --git a/doc/html/boost_typetraits/reference/add_const.html b/doc/html/boost_typetraits/reference/add_const.html index dd4bcd4..033e2c0 100644 --- a/doc/html/boost_typetraits/reference/add_const.html +++ b/doc/html/boost_typetraits/reference/add_const.html @@ -3,7 +3,7 @@ add_const - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,9 +24,10 @@
-
template <class T>
+
+template <class T>
 struct add_const
 {
    typedef see-below type;
@@ -44,7 +45,7 @@
         does not support partial specialization of class-templates then this template
         will compile, but the member type
         will always be the same as type T
-        except where compiler
+        except where compiler
         workarounds have been applied.
       

@@ -53,7 +54,7 @@ or #include <boost/type_traits.hpp>

-

Table 1.5. Examples

+

Table 1.5. Examples

Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/reference/add_cv.html b/doc/html/boost_typetraits/reference/add_cv.html index 8fe48aa..f1c5667 100644 --- a/doc/html/boost_typetraits/reference/add_cv.html +++ b/doc/html/boost_typetraits/reference/add_cv.html @@ -3,7 +3,7 @@ add_cv - + @@ -12,7 +12,7 @@
- + @@ -24,9 +24,10 @@
-
template <class T>
+
+template <class T>
 struct add_cv
 {
    typedef see-below type;
@@ -45,7 +46,7 @@
         does not support partial specialization of class-templates then this template
         will compile, but the member type
         will always be the same as type T
-        except where compiler
+        except where compiler
         workarounds have been applied.
       

@@ -54,7 +55,7 @@ or #include <boost/type_traits.hpp>

-

Table 1.6. Examples

+

Table 1.6. Examples

Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/reference/add_pointer.html b/doc/html/boost_typetraits/reference/add_pointer.html index c4e9c66..d17fb2b 100644 --- a/doc/html/boost_typetraits/reference/add_pointer.html +++ b/doc/html/boost_typetraits/reference/add_pointer.html @@ -3,7 +3,7 @@ add_pointer - + @@ -12,7 +12,7 @@
- + @@ -24,9 +24,10 @@
-
template <class T>
+
+template <class T>
 struct add_pointer
 {
    typedef see-below type;
@@ -47,7 +48,7 @@
         does not support partial specialization of class-templates then this template
         will compile, but the member type
         will always be the same as type T
-        except where compiler
+        except where compiler
         workarounds have been applied.
       

@@ -56,7 +57,7 @@ or #include <boost/type_traits.hpp>

-

Table 1.7. Examples

+

Table 1.7. Examples

Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/reference/add_reference.html b/doc/html/boost_typetraits/reference/add_reference.html index b14b4e4..63f7027 100644 --- a/doc/html/boost_typetraits/reference/add_reference.html +++ b/doc/html/boost_typetraits/reference/add_reference.html @@ -3,7 +3,7 @@ add_reference - + @@ -12,7 +12,7 @@
- + @@ -24,9 +24,10 @@
-
template <class T>
+
+template <class T>
 struct add_reference
 {
    typedef see-below type;
@@ -44,7 +45,7 @@
         does not support partial specialization of class-templates then this template
         will compile, but the member type
         will always be the same as type T
-        except where compiler
+        except where compiler
         workarounds have been applied.
       

@@ -53,7 +54,7 @@ or #include <boost/type_traits.hpp>

-

Table 1.8. Examples

+

Table 1.8. Examples

Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/reference/add_volatile.html b/doc/html/boost_typetraits/reference/add_volatile.html index 15e8d78..63f57b7 100644 --- a/doc/html/boost_typetraits/reference/add_volatile.html +++ b/doc/html/boost_typetraits/reference/add_volatile.html @@ -3,7 +3,7 @@ add_volatile - + @@ -12,7 +12,7 @@
- + @@ -24,9 +24,10 @@
-
template <class T>
+
+template <class T>
 struct add_volatile
 {
    typedef see-below type;
@@ -44,7 +45,7 @@
         does not support partial specialization of class-templates then this template
         will compile, but the member type
         will always be the same as type T
-        except where compiler
+        except where compiler
         workarounds have been applied.
       

@@ -53,7 +54,7 @@ or #include <boost/type_traits.hpp>

-

Table 1.9. Examples

+

Table 1.9. Examples

Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/reference/aligned_storage.html b/doc/html/boost_typetraits/reference/aligned_storage.html index 286cde6..4ad8c7c 100644 --- a/doc/html/boost_typetraits/reference/aligned_storage.html +++ b/doc/html/boost_typetraits/reference/aligned_storage.html @@ -3,7 +3,7 @@ aligned_storage - + @@ -12,7 +12,7 @@
- + @@ -24,9 +24,10 @@
-
template <std::size_t Size, std::size_t Align>
+
+template <std::size_t Size, std::size_t Align>
 struct aligned_storage
 {
    typedef see-below type;
diff --git a/doc/html/boost_typetraits/reference/alignment_of.html b/doc/html/boost_typetraits/reference/alignment_of.html
index 1b364b6..c79cca8 100644
--- a/doc/html/boost_typetraits/reference/alignment_of.html
+++ b/doc/html/boost_typetraits/reference/alignment_of.html
@@ -3,7 +3,7 @@
 
 alignment_of
 
-
+
 
 
 
@@ -12,7 +12,7 @@
 
 
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,10 +24,11 @@
-
template <class T>
-struct alignment_of : public integral_constant<std::size_t, ALIGNOF(T)> {};
+
+template <class T>
+struct alignment_of : public integral_constant<std::size_t, ALIGNOF(T)> {};
 

Inherits: Class template alignmentof inherits from `_integral_constant<std::size_t, @@ -52,7 +53,7 @@

alignment_of<int> - inherits from integral_constant<std::size_t, ALIGNOF(int)>. + inherits from integral_constant<std::size_t, ALIGNOF(int)>.

@@ -61,7 +62,7 @@

- alignment_of<char>::type is the type integral_constant<std::size_t, ALIGNOF(char)>. + alignment_of<char>::type is the type integral_constant<std::size_t, ALIGNOF(char)>.

diff --git a/doc/html/boost_typetraits/reference/decay.html b/doc/html/boost_typetraits/reference/decay.html index d59b743..149f124 100644 --- a/doc/html/boost_typetraits/reference/decay.html +++ b/doc/html/boost_typetraits/reference/decay.html @@ -3,7 +3,7 @@ decay - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,9 +24,10 @@
-
template <class T>
+
+template <class T>
 struct decay
 {
    typedef see-below type;
@@ -48,7 +49,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.10. Examples

+

Table 1.10. Examples

Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/reference/extent.html b/doc/html/boost_typetraits/reference/extent.html index 5680d42..310fb41 100644 --- a/doc/html/boost_typetraits/reference/extent.html +++ b/doc/html/boost_typetraits/reference/extent.html @@ -3,7 +3,7 @@ extent - + @@ -12,7 +12,7 @@
- + @@ -24,21 +24,22 @@
-
template <class T, std::size_t N = 0>
-struct extent : public integral_constant<std::size_t, EXTENT(T,N)> {};
+
+template <class T, std::size_t N = 0>
+struct extent : public integral_constant<std::size_t, EXTENT(T,N)> {};
 

Inherits: Class template extent inherits - from integral_constant<std::size_t, EXTENT(T,N)>, + from integral_constant<std::size_t, EXTENT(T,N)>, where EXTENT(T,N) is the number of elements in the N'th array dimention of type T.

If T is not an array type, or if N > - rank<T>::value, or if the N'th array bound is incomplete, + rank<T>::value, or if the N'th array bound is incomplete, then EXTENT(T,N) is zero.

@@ -53,7 +54,7 @@

- extent<int[1]> inherits from integral_constant<std::size_t, 1>. + extent<int[1]> inherits from integral_constant<std::size_t, 1>.

@@ -63,7 +64,7 @@

extent<double[2][3][4], - 1>::type is the type integral_constant<std::size_t, 3>. + 1>::type is the type integral_constant<std::size_t, 3>.

diff --git a/doc/html/boost_typetraits/reference/floating_point_promotion.html b/doc/html/boost_typetraits/reference/floating_point_promotion.html index 58dd94f..6637972 100644 --- a/doc/html/boost_typetraits/reference/floating_point_promotion.html +++ b/doc/html/boost_typetraits/reference/floating_point_promotion.html @@ -3,7 +3,7 @@ floating_point_promotion - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,10 +24,11 @@
-
template <class T>
+
+template <class T>
 struct floating_point_promotion
 {
    typedef see-below type;
@@ -49,7 +50,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.11. Examples

+

Table 1.11. Examples

Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/reference/function_traits.html b/doc/html/boost_typetraits/reference/function_traits.html index d05e611..a343b6d 100644 --- a/doc/html/boost_typetraits/reference/function_traits.html +++ b/doc/html/boost_typetraits/reference/function_traits.html @@ -3,7 +3,7 @@ function_traits - + @@ -12,7 +12,7 @@
- + @@ -24,9 +24,10 @@
-
template <class T>
+
+template <class T>
 struct function_traits
 {
    static const std::size_t    arity = see-below;
@@ -55,11 +56,11 @@
 
Boost C++ LibrariesHomeHome Libraries People FAQ

function_traits is intended to introspect only C++ functions of the form R (), R( A1 ), R ( A1, ... etc. ) and not function pointers or class member - functions. To convert a function pointer type to a suitable type use remove_pointer. + functions. To convert a function pointer type to a suitable type use remove_pointer.

-

Table 1.12. Function Traits Members

+

Table 1.12. Function Traits Members

@@ -122,7 +123,7 @@

-

Table 1.13. Examples

+

Table 1.13. Examples

diff --git a/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html b/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html index 5fc5eee..669d9d1 100644 --- a/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html +++ b/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html @@ -3,7 +3,7 @@ has_nothrow_default_constructor - + @@ -12,7 +12,7 @@
- + @@ -24,10 +24,10 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/reference/has_nothrow_assign.html b/doc/html/boost_typetraits/reference/has_nothrow_assign.html index 838e62b..56de2ff 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_assign.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_assign.html @@ -3,7 +3,7 @@ has_nothrow_assign - + @@ -12,7 +12,7 @@
- + @@ -24,15 +24,16 @@
-
template <class T>
-struct has_nothrow_assign : public true_type-or-false_type {};
+
+template <class T>
+struct has_nothrow_assign : public true_type-or-false_type {};
 

Inherits: If T is a (possibly cv-qualified) - type with a non-throwing assignment-operator then inherits from true_type, - otherwise inherits from false_type. + type with a non-throwing assignment-operator then inherits from true_type, + otherwise inherits from false_type. Type T must be a complete type.

diff --git a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html index 7762bb1..26f3c17 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html @@ -3,7 +3,7 @@ has_nothrow_constructor - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,19 +24,20 @@
-
template <class T>
-struct has_nothrow_constructor : public true_type-or-false_type {};
+
+template <class T>
+struct has_nothrow_constructor : public true_type-or-false_type {};
 
 template <class T>
-struct has_nothrow_default_constructor : public true_type-or-false_type {};
+struct has_nothrow_default_constructor : public true_type-or-false_type {};
 

Inherits: If T is a (possibly cv-qualified) - type with a non-throwing default-constructor then inherits from true_type, - otherwise inherits from false_type. + type with a non-throwing default-constructor then inherits from true_type, + otherwise inherits from false_type. Type T must be a complete type.

@@ -52,7 +53,7 @@ Without some (as yet unspecified) help from the compiler, has_nothrow_constructor will never report that a class or struct has a non-throwing default-constructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual - C++ 8 has the necessary compiler intrinsics + C++ 8 has the necessary compiler intrinsics to ensure that this trait "just works".

diff --git a/doc/html/boost_typetraits/reference/has_nothrow_copy.html b/doc/html/boost_typetraits/reference/has_nothrow_copy.html index 3e8046c..56a9b5f 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_copy.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_copy.html @@ -3,7 +3,7 @@ has_nothrow_copy - + @@ -12,7 +12,7 @@

Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,18 +24,19 @@
-
template <class T>
-struct has_nothrow_copy : public true_type-or-false_type {};
+
+template <class T>
+struct has_nothrow_copy : public true_type-or-false_type {};
 
 template <class T>
-struct has_nothrow_copy_constructor : public true_type-or-false_type {};
+struct has_nothrow_copy_constructor : public true_type-or-false_type {};
 

Inherits: If T is a (possibly cv-qualified) - type with a non-throwing copy-constructor then inherits from true_type, - otherwise inherits from false_type. + type with a non-throwing copy-constructor then inherits from true_type, + otherwise inherits from false_type. Type T must be a complete type.

@@ -51,7 +52,7 @@ Without some (as yet unspecified) help from the compiler, has_nothrow_copy will never report that a class or struct has a non-throwing copy-constructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual - C++ 8 has the necessary compiler intrinsics + C++ 8 has the necessary compiler intrinsics to ensure that this trait "just works".

diff --git a/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html b/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html index 501c597..0625fed 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html @@ -3,7 +3,7 @@ has_nothrow_copy_constructor - + @@ -12,7 +12,7 @@

Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,10 +24,10 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/reference/has_trivial_assign.html b/doc/html/boost_typetraits/reference/has_trivial_assign.html index 956cf55..49c9475 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_assign.html +++ b/doc/html/boost_typetraits/reference/has_trivial_assign.html @@ -3,7 +3,7 @@ has_trivial_assign - + @@ -12,7 +12,7 @@
- + @@ -24,15 +24,16 @@
-
template <class T>
-struct has_trivial_assign : public true_type-or-false_type {};
+
+template <class T>
+struct has_trivial_assign : public true_type-or-false_type {};
 

Inherits: If T is a (possibly cv-qualified) - type with a trivial assignment-operator then inherits from true_type, - otherwise inherits from false_type. + type with a trivial assignment-operator then inherits from true_type, + otherwise inherits from false_type.

If a type has a trivial assignment-operator then the operator has the same @@ -48,7 +49,7 @@ Without some (as yet unspecified) help from the compiler, has_trivial_assign will never report that a user-defined class or struct has a trivial constructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW - 9 and Visual C++ 8 have the necessary compiler intrinsics + 9 and Visual C++ 8 have the necessary compiler intrinsics to detect user-defined classes with trivial constructors.

@@ -67,7 +68,7 @@

has_trivial_assign<int> - inherits from true_type. + inherits from true_type.

@@ -76,7 +77,7 @@

- has_trivial_assign<char*>::type is the type true_type. + has_trivial_assign<char*>::type is the type true_type.

diff --git a/doc/html/boost_typetraits/reference/has_trivial_constructor.html b/doc/html/boost_typetraits/reference/has_trivial_constructor.html index ac29da3..70ee93a 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_constructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_constructor.html @@ -3,7 +3,7 @@ has_trivial_constructor - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,19 +24,20 @@
-
template <class T>
-struct has_trivial_constructor : public true_type-or-false_type {};
+
+template <class T>
+struct has_trivial_constructor : public true_type-or-false_type {};
 
 template <class T>
-struct has_trivial_default_constructor : public true_type-or-false_type {};
+struct has_trivial_default_constructor : public true_type-or-false_type {};
 

Inherits: If T is a (possibly cv-qualified) - type with a trivial default-constructor then inherits from true_type, - otherwise inherits from false_type. + type with a trivial default-constructor then inherits from true_type, + otherwise inherits from false_type.

These two traits are synonyms for each other. @@ -57,7 +58,7 @@ Without some (as yet unspecified) help from the compiler, has_trivial_constructor will never report that a user-defined class or struct has a trivial constructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW - 9 and Visual C++ 8 have the necessary compiler intrinsics + 9 and Visual C++ 8 have the necessary compiler intrinsics to detect user-defined classes with trivial constructors.

@@ -75,7 +76,7 @@

- has_trivial_constructor<int> inherits from true_type. + has_trivial_constructor<int> inherits from true_type.

@@ -85,7 +86,7 @@

has_trivial_constructor<char*>::type - is the type true_type. + is the type true_type.

diff --git a/doc/html/boost_typetraits/reference/has_trivial_copy.html b/doc/html/boost_typetraits/reference/has_trivial_copy.html index f1fa15b..7247af4 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_copy.html +++ b/doc/html/boost_typetraits/reference/has_trivial_copy.html @@ -3,7 +3,7 @@ has_trivial_copy - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,18 +24,19 @@
-
template <class T>
-struct has_trivial_copy : public true_type-or-false_type {};
+
+template <class T>
+struct has_trivial_copy : public true_type-or-false_type {};
 
 template <class T>
-struct has_trivial_copy_constructor : public true_type-or-false_type {};
+struct has_trivial_copy_constructor : public true_type-or-false_type {};
 

Inherits: If T is a (possibly cv-qualified) - type with a trivial copy-constructor then inherits from true_type, - otherwise inherits from false_type. + type with a trivial copy-constructor then inherits from true_type, + otherwise inherits from false_type.

These two traits are synonyms for each other. @@ -54,7 +55,7 @@ Without some (as yet unspecified) help from the compiler, has_trivial_copy will never report that a user-defined class or struct has a trivial constructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW - 9 and Visual C++ 8 have the necessary compiler intrinsics + 9 and Visual C++ 8 have the necessary compiler intrinsics to detect user-defined classes with trivial constructors.

@@ -73,7 +74,7 @@

has_trivial_copy<int> - inherits from true_type. + inherits from true_type.

@@ -82,7 +83,7 @@

- has_trivial_copy<char*>::type is the type true_type. + has_trivial_copy<char*>::type is the type true_type.

diff --git a/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html b/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html index df8099e..f8e0387 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html @@ -3,7 +3,7 @@ has_trivial_copy_constructor - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,10 +24,10 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/reference/has_trivial_def_cons.html b/doc/html/boost_typetraits/reference/has_trivial_def_cons.html index 3704060..d7d7efc 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_def_cons.html +++ b/doc/html/boost_typetraits/reference/has_trivial_def_cons.html @@ -3,7 +3,7 @@ has_trivial_default_constructor - + @@ -12,7 +12,7 @@
- + @@ -24,10 +24,10 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/reference/has_trivial_destructor.html b/doc/html/boost_typetraits/reference/has_trivial_destructor.html index cf77ae8..95994cb 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_destructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_destructor.html @@ -3,7 +3,7 @@ has_trivial_destructor - + @@ -12,7 +12,7 @@
- + @@ -24,15 +24,16 @@
-
template <class T>
-struct has_trivial_destructor : public true_type-or-false_type {};
+
+template <class T>
+struct has_trivial_destructor : public true_type-or-false_type {};
 

Inherits: If T is a (possibly cv-qualified) - type with a trivial destructor then inherits from true_type, - otherwise inherits from false_type. + type with a trivial destructor then inherits from true_type, + otherwise inherits from false_type.

If a type has a trivial destructor then the destructor has no effect: calls @@ -50,7 +51,7 @@ Without some (as yet unspecified) help from the compiler, has_trivial_destructor will never report that a user-defined class or struct has a trivial destructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW - 9 and Visual C++ 8 have the necessary compiler intrinsics + 9 and Visual C++ 8 have the necessary compiler intrinsics to detect user-defined classes with trivial constructors.

@@ -68,7 +69,7 @@

- has_trivial_destructor<int> inherits from true_type. + has_trivial_destructor<int> inherits from true_type.

@@ -78,7 +79,7 @@

has_trivial_destructor<char*>::type - is the type true_type. + is the type true_type.

diff --git a/doc/html/boost_typetraits/reference/has_virtual_destructor.html b/doc/html/boost_typetraits/reference/has_virtual_destructor.html index 0509149..b7e3354 100644 --- a/doc/html/boost_typetraits/reference/has_virtual_destructor.html +++ b/doc/html/boost_typetraits/reference/has_virtual_destructor.html @@ -3,7 +3,7 @@ has_virtual_destructor - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,25 +24,26 @@
-
template <class T>
-struct has_virtual_destructor : public true_type-or-false_type {};
+
+template <class T>
+struct has_virtual_destructor : public true_type-or-false_type {};
 

Inherits: If T is a (possibly cv-qualified) - type with a virtual destructor then inherits from true_type, - otherwise inherits from false_type. + type with a virtual destructor then inherits from true_type, + otherwise inherits from false_type.

Compiler Compatibility: This trait is provided for completeness, since it's part of the Technical Report on C++ Library Extensions. However, there is currently no way to portably implement this - trait. The default version provided always inherits from false_type, + trait. The default version provided always inherits from false_type, and has to be explicitly specialized for types with virtual destructors unless - the compiler used has compiler intrinsics + the compiler used has compiler intrinsics that enable the trait to do the right thing: currently (May 2005) only Visual - C++ 8 has the necessary intrinsics. + C++ 8 has the necessary intrinsics.

C++ Standard Reference: 12.4. diff --git a/doc/html/boost_typetraits/reference/integral_constant.html b/doc/html/boost_typetraits/reference/integral_constant.html index 1a5cd28..3e86848 100644 --- a/doc/html/boost_typetraits/reference/integral_constant.html +++ b/doc/html/boost_typetraits/reference/integral_constant.html @@ -3,7 +3,7 @@ integral_constant - + @@ -12,7 +12,7 @@

Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,9 +24,10 @@
-
template <class T, T val>
+
+template <class T, T val>
 struct integral_constant
 {
    typedef integral_constant<T, val>  type;
diff --git a/doc/html/boost_typetraits/reference/integral_promotion.html b/doc/html/boost_typetraits/reference/integral_promotion.html
index a02f240..396d1ca 100644
--- a/doc/html/boost_typetraits/reference/integral_promotion.html
+++ b/doc/html/boost_typetraits/reference/integral_promotion.html
@@ -3,7 +3,7 @@
 
 integral_promotion
 
-
+
 
 
 
@@ -12,7 +12,7 @@
 
 
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,9 +24,10 @@
-
template <class T>
+
+template <class T>
 struct integral_promotion
 {
    typedef see-below type;
@@ -49,7 +50,7 @@
         or  #include <boost/type_traits.hpp>
       

-

Table 1.14. Examples

+

Table 1.14. Examples

Boost C++ LibrariesHomeHome Libraries People FAQ
diff --git a/doc/html/boost_typetraits/reference/is_abstract.html b/doc/html/boost_typetraits/reference/is_abstract.html index bb9494a..af94bf0 100644 --- a/doc/html/boost_typetraits/reference/is_abstract.html +++ b/doc/html/boost_typetraits/reference/is_abstract.html @@ -3,7 +3,7 @@ is_abstract - + @@ -12,7 +12,7 @@
- + @@ -24,15 +24,16 @@
-
template <class T>
-struct is_abstract : public true_type-or-false_type {};
+
+template <class T>
+struct is_abstract : public true_type-or-false_type {};
 

Inherits: If T is a (possibly cv-qualified) - abstract type then inherits from true_type, - otherwise inherits from false_type. + abstract type then inherits from true_type, + otherwise inherits from false_type.

C++ Standard Reference: 10.3. @@ -45,7 +46,7 @@

Compiler Compatibility: The compiler must support DR337 (as of April 2005: GCC 3.4, VC++ 7.1 (and later), Intel C++ - 7 (and later), and Comeau 4.3.2). Otherwise behaves the same as is_polymorphic; + 7 (and later), and Comeau 4.3.2). Otherwise behaves the same as is_polymorphic; this is the "safe fallback position" for which polymorphic types are always regarded as potentially abstract. The macro BOOST_NO_IS_ABSTRACT is used to signify that the implementation is buggy, users should check for @@ -69,7 +70,7 @@

is_abstract<abc> - inherits from true_type. + inherits from true_type.

@@ -78,7 +79,7 @@

- is_abstract<abc>::type is the type true_type. + is_abstract<abc>::type is the type true_type.

diff --git a/doc/html/boost_typetraits/reference/is_arithmetic.html b/doc/html/boost_typetraits/reference/is_arithmetic.html index 8e2b695..739c896 100644 --- a/doc/html/boost_typetraits/reference/is_arithmetic.html +++ b/doc/html/boost_typetraits/reference/is_arithmetic.html @@ -3,7 +3,7 @@ is_arithmetic - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,17 +24,18 @@
-
template <class T>
-struct is_arithmetic : public true_type-or-false_type {};
+
+template <class T>
+struct is_arithmetic : public true_type-or-false_type {};
 

Inherits: If T is a (possibly cv-qualified) - arithmetic type then inherits from true_type, - otherwise inherits from false_type. - Arithmetic types include integral and floating point types (see also is_integral and - is_floating_point). + arithmetic type then inherits from true_type, + otherwise inherits from false_type. + Arithmetic types include integral and floating point types (see also is_integral and + is_floating_point).

C++ Standard Reference: 3.9.1p8. @@ -52,7 +53,7 @@

is_arithmetic<int> - inherits from true_type. + inherits from true_type.

@@ -61,7 +62,7 @@

- is_arithmetic<char>::type is the type true_type. + is_arithmetic<char>::type is the type true_type.

diff --git a/doc/html/boost_typetraits/reference/is_array.html b/doc/html/boost_typetraits/reference/is_array.html index 8a1be84..714374a 100644 --- a/doc/html/boost_typetraits/reference/is_array.html +++ b/doc/html/boost_typetraits/reference/is_array.html @@ -3,7 +3,7 @@ is_array - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,15 +24,16 @@
-
template <class T>
-struct is_array : public true_type-or-false_type {};
+
+template <class T>
+struct is_array : public true_type-or-false_type {};
 

Inherits: If T is a (possibly cv-qualified) - array type then inherits from true_type, - otherwise inherits from false_type. + array type then inherits from true_type, + otherwise inherits from false_type.

C++ Standard Reference: 3.9.2 and 8.3.4. @@ -54,7 +55,7 @@

- is_array<int[2]> inherits from true_type. + is_array<int[2]> inherits from true_type.

@@ -64,7 +65,7 @@

is_array<char[2][3]>::type - is the type true_type. + is the type true_type.

diff --git a/doc/html/boost_typetraits/reference/is_base_of.html b/doc/html/boost_typetraits/reference/is_base_of.html index fe814bf..3cd032c 100644 --- a/doc/html/boost_typetraits/reference/is_base_of.html +++ b/doc/html/boost_typetraits/reference/is_base_of.html @@ -3,7 +3,7 @@ is_base_of - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,21 +24,22 @@
-
template <class Base, class Derived>
-struct is_base_of : public true_type-or-false_type {};
+
+template <class Base, class Derived>
+struct is_base_of : public true_type-or-false_type {};
 

Inherits: If Base is base class of type - Derived or if both types are the same then inherits from true_type, - otherwise inherits from false_type. + Derived or if both types are the same then inherits from true_type, + otherwise inherits from false_type.

This template will detect non-public base classes, and ambiguous base classes.

- Note that is_base_of<X,X> will always inherit from true_type. + Note that is_base_of<X,X> will always inherit from true_type. This is the case even if X is not a class type. This is a change in behaviour from Boost-1.33 in order to track the Technical Report on C++ Library Extensions. @@ -83,7 +84,7 @@

is_base_of<Base, Derived> - inherits from true_type. + inherits from true_type.

@@ -92,7 +93,7 @@

- is_base_of<Base, Derived>::type is the type true_type. + is_base_of<Base, Derived>::type is the type true_type.

diff --git a/doc/html/boost_typetraits/reference/is_class.html b/doc/html/boost_typetraits/reference/is_class.html index caddc27..1ff1a73 100644 --- a/doc/html/boost_typetraits/reference/is_class.html +++ b/doc/html/boost_typetraits/reference/is_class.html @@ -3,7 +3,7 @@ is_class - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,15 +24,16 @@
-
template <class T>
-struct is_class : public true_type-or-false_type {};
+
+template <class T>
+struct is_class : public true_type-or-false_type {};
 

Inherits: If T is a (possibly cv-qualified) - class type then inherits from true_type, - otherwise inherits from false_type. + class type then inherits from true_type, + otherwise inherits from false_type.

C++ Standard Reference: 3.9.2 and 9.2. @@ -45,9 +46,9 @@

Compiler Compatibility: Without (some as yet unspecified) help from the compiler, we cannot distinguish between union - and class types, as a result this type will erroneously inherit from true_type for - union types. See also is_union. - Currently (May 2005) only Visual C++ 8 has the necessary compiler intrinsics + and class types, as a result this type will erroneously inherit from true_type for + union types. See also is_union. + Currently (May 2005) only Visual C++ 8 has the necessary compiler intrinsics to correctly identify union types, and therefore make is_class function correctly.

@@ -67,7 +68,7 @@

is_class<MyClass> - inherits from true_type. + inherits from true_type.

@@ -77,7 +78,7 @@

is_class<MyClass const>::type - is the type true_type. + is the type true_type.

diff --git a/doc/html/boost_typetraits/reference/is_complex.html b/doc/html/boost_typetraits/reference/is_complex.html index 97338b4..ed12a67 100644 --- a/doc/html/boost_typetraits/reference/is_complex.html +++ b/doc/html/boost_typetraits/reference/is_complex.html @@ -3,7 +3,7 @@ is_complex - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,10 +24,11 @@
-
template <class T>
-struct is_complex : public true_type-or-false_type {};
+
+template <class T>
+struct is_complex : public true_type-or-false_type {};
 

Inherits: If T diff --git a/doc/html/boost_typetraits/reference/is_compound.html b/doc/html/boost_typetraits/reference/is_compound.html index 4c6569a..f3ea85e 100644 --- a/doc/html/boost_typetraits/reference/is_compound.html +++ b/doc/html/boost_typetraits/reference/is_compound.html @@ -3,7 +3,7 @@ is_compound - + @@ -12,7 +12,7 @@

Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,16 +24,17 @@
-
template <class T>
-struct is_compound : public true_type-or-false_type {};
+
+template <class T>
+struct is_compound : public true_type-or-false_type {};
 

Inherits: If T is a (possibly cv-qualified) - compound type then inherits from true_type, - otherwise inherits from false_type. - Any type that is not a fundamental type is a compound type (see also is_fundamental). + compound type then inherits from true_type, + otherwise inherits from false_type. + Any type that is not a fundamental type is a compound type (see also is_fundamental).

C++ Standard Reference: 3.9.2. @@ -51,7 +52,7 @@

is_compound<MyClass> - inherits from true_type. + inherits from true_type.

@@ -60,7 +61,7 @@

- is_compound<MyEnum>::type is the type true_type. + is_compound<MyEnum>::type is the type true_type.

diff --git a/doc/html/boost_typetraits/reference/is_const.html b/doc/html/boost_typetraits/reference/is_const.html index 79975cd..955046e 100644 --- a/doc/html/boost_typetraits/reference/is_const.html +++ b/doc/html/boost_typetraits/reference/is_const.html @@ -3,7 +3,7 @@ is_const - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,15 +24,16 @@
-
template <class T>
-struct is_const : public true_type-or-false_type {};
+
+template <class T>
+struct is_const : public true_type-or-false_type {};
 

Inherits: If T is a (top level) const-qualified - type then inherits from true_type, - otherwise inherits from false_type. + type then inherits from true_type, + otherwise inherits from false_type.

C++ Standard Reference: 3.9.3. @@ -49,7 +50,7 @@

- is_const<int const> inherits from true_type. + is_const<int const> inherits from true_type.

@@ -58,7 +59,7 @@

- is_const<int const volatile>::type is the type true_type. + is_const<int const volatile>::type is the type true_type.

diff --git a/doc/html/boost_typetraits/reference/is_convertible.html b/doc/html/boost_typetraits/reference/is_convertible.html index aae4b1a..8ec8162 100644 --- a/doc/html/boost_typetraits/reference/is_convertible.html +++ b/doc/html/boost_typetraits/reference/is_convertible.html @@ -3,7 +3,7 @@ is_convertible - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,16 +24,17 @@
-
template <class From, class To>
-struct is_convertible : public true_type-or-false_type {};
+
+template <class From, class To>
+struct is_convertible : public true_type-or-false_type {};
 

Inherits: If an imaginary lvalue of type From is convertible to type - To then inherits from true_type, - otherwise inherits from false_type. + To then inherits from true_type, + otherwise inherits from false_type.

Type From must not be an incomplete type. @@ -58,7 +59,8 @@ This template will also produce compiler errors if the conversion is ambiguous, for example:

-
struct A {};
+
+struct A {};
 struct B : A {};
 struct C : A {};
 struct D : B, C {};
@@ -72,7 +74,7 @@
         Compiler Compatibility: This template is
         currently broken with Borland C++ Builder 5 (and earlier), for constructor-based
         conversions, and for the Metrowerks 7 (and earlier) compiler in all cases.
-        If the compiler does not support is_abstract,
+        If the compiler does not support is_abstract,
         then the template parameter To
         must not be an abstract type.
       

@@ -89,7 +91,7 @@

is_convertible<int, double> - inherits from true_type. + inherits from true_type.

@@ -99,7 +101,7 @@

is_convertible<const int, double>::type - is the type true_type. + is the type true_type.

diff --git a/doc/html/boost_typetraits/reference/is_empty.html b/doc/html/boost_typetraits/reference/is_empty.html index 5016b46..8578511 100644 --- a/doc/html/boost_typetraits/reference/is_empty.html +++ b/doc/html/boost_typetraits/reference/is_empty.html @@ -3,7 +3,7 @@ is_empty - + @@ -12,7 +12,7 @@
Boost C++ LibrariesHomeHome Libraries People FAQ
- + @@ -24,15 +24,16 @@
-
template <class T>
-struct is_empty : public true_type-or-false_type {};
+
+template <class T>
+struct is_empty : public true_type-or-false_type {};
 

Inherits: If T is an empty class type then - inherits from true_type, - otherwise inherits from false_type. + inherits from true_type, + otherwise inherits from false_type.

C++ Standard Reference: 10p5. @@ -51,7 +52,7 @@ the compiler implementing zero sized empty base classes, or

  • - the compiler providing intrinsics + the compiler providing intrinsics to detect empty classes.
  • @@ -83,7 +84,7 @@

    is_empty<empty_class> - inherits from true_type. + inherits from true_type.

    @@ -93,7 +94,7 @@

    is_empty<empty_class const>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_enum.html b/doc/html/boost_typetraits/reference/is_enum.html index c7198f1..858f94e 100644 --- a/doc/html/boost_typetraits/reference/is_enum.html +++ b/doc/html/boost_typetraits/reference/is_enum.html @@ -3,7 +3,7 @@ is_enum - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,15 +24,16 @@
    -
    template <class T>
    -struct is_enum : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_enum : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - enum type then inherits from true_type, - otherwise inherits from false_type. + enum type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 7.2. @@ -44,7 +45,7 @@

    Compiler Compatibility: Requires a correctly - functioning is_convertible + functioning is_convertible template; this means that is_enum is currently broken under Borland C++ Builder 5, and for the Metrowerks compiler prior to version 8, other compilers should handle this template just fine. @@ -67,7 +68,7 @@

    is_enum<my_enum> - inherits from true_type. + inherits from true_type.

    @@ -77,7 +78,7 @@

    is_enum<my_enum const>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_floating_point.html b/doc/html/boost_typetraits/reference/is_floating_point.html index a3a8b89..48069e7 100644 --- a/doc/html/boost_typetraits/reference/is_floating_point.html +++ b/doc/html/boost_typetraits/reference/is_floating_point.html @@ -3,7 +3,7 @@ is_floating_point - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,15 +24,16 @@
    -
    template <class T>
    -struct is_floating_point : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_floating_point : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - floating point type then inherits from true_type, - otherwise inherits from false_type. + floating point type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.1p8. @@ -50,7 +51,7 @@

    is_floating_point<float> - inherits from true_type. + inherits from true_type.

    @@ -59,7 +60,7 @@

    - is_floating_point<double>::type is the type true_type. + is_floating_point<double>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_function.html b/doc/html/boost_typetraits/reference/is_function.html index 95c036c..0c2415a 100644 --- a/doc/html/boost_typetraits/reference/is_function.html +++ b/doc/html/boost_typetraits/reference/is_function.html @@ -3,7 +3,7 @@ is_function - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,19 +24,21 @@
    -
    template <class T>
    -struct is_function : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_function : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - function type then inherits from true_type, - otherwise inherits from false_type. + function type then inherits from true_type, + otherwise inherits from false_type. Note that this template does not detect pointers to functions, - or references to functions, these are detected by is_pointer and is_reference respectively: + or references to functions, these are detected by is_pointer and is_reference respectively:

    -
    typedef int f1();      // f1 is of function type.
    +
    +typedef int f1();      // f1 is of function type.
     typedef int (f2*)();   // f2 is a pointer to a function.
     typedef int (f3&)();   // f3 is a reference to a function.
     
    @@ -56,7 +58,7 @@

    is_function<int (void)> - inherits from true_type. + inherits from true_type.

    @@ -65,7 +67,7 @@

    - is_function<long (double, int)>::type is the type true_type. + is_function<long (double, int)>::type is the type true_type.

    @@ -161,11 +163,11 @@ If you want to detect whether some type is a pointer-to-function then use:

    - is_function<remove_pointer<T>::type>::value - && is_pointer<T>::value + is_function<remove_pointer<T>::type>::value + && is_pointer<T>::value

    - or for pointers to member functions you can just use is_member_function_pointer + or for pointers to member functions you can just use is_member_function_pointer directly.

    diff --git a/doc/html/boost_typetraits/reference/is_fundamental.html b/doc/html/boost_typetraits/reference/is_fundamental.html index ca29d1b..8798f8f 100644 --- a/doc/html/boost_typetraits/reference/is_fundamental.html +++ b/doc/html/boost_typetraits/reference/is_fundamental.html @@ -3,7 +3,7 @@ is_fundamental - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,19 +24,20 @@
    -
    template <class T>
    -struct is_fundamental : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_fundamental : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - fundamental type then inherits from true_type, - otherwise inherits from false_type. + fundamental type then inherits from true_type, + otherwise inherits from false_type. Fundamental types include integral, floating point and void types (see also - is_integral, - is_floating_point - and is_void) + is_integral, + is_floating_point + and is_void)

    C++ Standard Reference: 3.9.1. @@ -54,7 +55,7 @@

    is_fundamental<int)> - inherits from true_type. + inherits from true_type.

    @@ -64,7 +65,7 @@

    is_fundamental<double const>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_integral.html b/doc/html/boost_typetraits/reference/is_integral.html index ec8986f..f7b3970 100644 --- a/doc/html/boost_typetraits/reference/is_integral.html +++ b/doc/html/boost_typetraits/reference/is_integral.html @@ -3,7 +3,7 @@ is_integral - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,15 +24,16 @@
    -
    template <class T>
    -struct is_integral : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_integral : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - integral type then inherits from true_type, - otherwise inherits from false_type. + integral type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.1p7. @@ -50,7 +51,7 @@

    is_integral<int> - inherits from true_type. + inherits from true_type.

    @@ -60,7 +61,7 @@

    is_integral<const char>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_member_function_pointer.html b/doc/html/boost_typetraits/reference/is_member_function_pointer.html index 2d3ae1e..287d907 100644 --- a/doc/html/boost_typetraits/reference/is_member_function_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_function_pointer.html @@ -3,7 +3,7 @@ is_member_function_pointer - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,16 +24,17 @@
    -
    template <class T>
    -struct is_member_function_pointer : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_member_function_pointer : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - pointer to a member function then inherits from true_type, - otherwise inherits from false_type. + pointer to a member function then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 8.3.3. @@ -50,7 +51,7 @@

    - is_member_function_pointer<int (MyClass::*)(void)> inherits from true_type. + is_member_function_pointer<int (MyClass::*)(void)> inherits from true_type.

    @@ -60,7 +61,7 @@

    is_member_function_pointer<int (MyClass::*)(char)>::type - is the type true_type. + is the type true_type.

    @@ -82,8 +83,8 @@ is_member_function_pointer<int (MyClass::*)>::value is an integral constant expression that evaluates to false: the argument in this case is a pointer to a data member and not a member - function, see is_member_object_pointer - and is_member_pointer + function, see is_member_object_pointer + and is_member_pointer

    diff --git a/doc/html/boost_typetraits/reference/is_member_object_pointer.html b/doc/html/boost_typetraits/reference/is_member_object_pointer.html index 8a41d11..c95ff36 100644 --- a/doc/html/boost_typetraits/reference/is_member_object_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_object_pointer.html @@ -3,7 +3,7 @@ is_member_object_pointer - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,16 +24,17 @@
    -
    template <class T>
    -struct is_member_object_pointer : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_member_object_pointer : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - pointer to a member object (a data member) then inherits from true_type, - otherwise inherits from false_type. + pointer to a member object (a data member) then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 8.3.3. @@ -50,7 +51,7 @@

    - is_member_object_pointer<int (MyClass::*)> inherits from true_type. + is_member_object_pointer<int (MyClass::*)> inherits from true_type.

    @@ -60,7 +61,7 @@

    is_member_object_pointer<double (MyClass::*)>::type - is the type true_type. + is the type true_type.

    @@ -82,8 +83,8 @@ is_member_object_pointer<int (MyClass::*)(void)>::value is an integral constant expression that evaluates to false: the argument in this case is a pointer to a member function and not a - member object, see is_member_function_pointer - and is_member_pointer + member object, see is_member_function_pointer + and is_member_pointer

    diff --git a/doc/html/boost_typetraits/reference/is_member_pointer.html b/doc/html/boost_typetraits/reference/is_member_pointer.html index 91ce7dc..fb3a329 100644 --- a/doc/html/boost_typetraits/reference/is_member_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_pointer.html @@ -3,7 +3,7 @@ is_member_pointer - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,16 +24,17 @@
    -
    template <class T>
    -struct is_member_pointer : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_member_pointer : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) pointer to a member (either a function or a data member) then inherits from - true_type, - otherwise inherits from false_type. + true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 8.3.3. @@ -51,7 +52,7 @@

    is_member_pointer<int (MyClass::*)> - inherits from true_type. + inherits from true_type.

    @@ -60,7 +61,7 @@

    - is_member_pointer<int (MyClass::*)(char)>::type is the type true_type. + is_member_pointer<int (MyClass::*)(char)>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_object.html b/doc/html/boost_typetraits/reference/is_object.html index 1adf00b..1d047c4 100644 --- a/doc/html/boost_typetraits/reference/is_object.html +++ b/doc/html/boost_typetraits/reference/is_object.html @@ -3,7 +3,7 @@ is_object - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,15 +24,16 @@
    -
    template <class T>
    -struct is_object : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_object : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - object type then inherits from true_type, - otherwise inherits from false_type. + object type then inherits from true_type, + otherwise inherits from false_type. All types are object types except references, void, and function types.

    @@ -51,7 +52,7 @@

    is_object<int> - inherits from true_type. + inherits from true_type.

    @@ -60,7 +61,7 @@

    - is_object<int*>::type is the type true_type. + is_object<int*>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_pod.html b/doc/html/boost_typetraits/reference/is_pod.html index 1ed071a..7bb57d6 100644 --- a/doc/html/boost_typetraits/reference/is_pod.html +++ b/doc/html/boost_typetraits/reference/is_pod.html @@ -3,7 +3,7 @@ is_pod - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,15 +24,16 @@
    -
    template <class T>
    -struct is_pod : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_pod : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - POD type then inherits from true_type, - otherwise inherits from false_type. + POD type then inherits from true_type, + otherwise inherits from false_type.

    POD stands for "Plain old data". Arithmetic types, and enumeration @@ -71,7 +72,7 @@

    is_pod<int> - inherits from true_type. + inherits from true_type.

    @@ -80,7 +81,7 @@

    - is_pod<char*>::type is the type true_type. + is_pod<char*>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_pointer.html b/doc/html/boost_typetraits/reference/is_pointer.html index 8958a5c..bfc5b0d 100644 --- a/doc/html/boost_typetraits/reference/is_pointer.html +++ b/doc/html/boost_typetraits/reference/is_pointer.html @@ -3,7 +3,7 @@ is_pointer - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,16 +24,17 @@
    -
    template <class T>
    -struct is_pointer : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_pointer : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) pointer type (includes function pointers, but excludes pointers to members) - then inherits from true_type, - otherwise inherits from false_type. + then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2p2 and 8.3.1. @@ -51,7 +52,7 @@

    is_pointer<int*> - inherits from true_type. + inherits from true_type.

    @@ -60,7 +61,7 @@

    - is_pointer<char* const>::type is the type true_type. + is_pointer<char* const>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_polymorphic.html b/doc/html/boost_typetraits/reference/is_polymorphic.html index a5b4fbc..377e12f 100644 --- a/doc/html/boost_typetraits/reference/is_polymorphic.html +++ b/doc/html/boost_typetraits/reference/is_polymorphic.html @@ -3,7 +3,7 @@ is_polymorphic - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,15 +24,16 @@
    -
    template <class T>
    -struct is_polymorphic : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_polymorphic : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - polymorphic type then inherits from true_type, - otherwise inherits from false_type. + polymorphic type then inherits from true_type, + otherwise inherits from false_type. Type T must be a complete type.

    @@ -66,7 +67,7 @@

    is_polymorphic<poly> - inherits from true_type. + inherits from true_type.

    @@ -76,7 +77,7 @@

    is_polymorphic<poly const>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_reference.html b/doc/html/boost_typetraits/reference/is_reference.html index 32fe6fa..08d2f35 100644 --- a/doc/html/boost_typetraits/reference/is_reference.html +++ b/doc/html/boost_typetraits/reference/is_reference.html @@ -3,7 +3,7 @@ is_reference - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,15 +24,16 @@
    -
    template <class T>
    -struct is_reference : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_reference : public true_type-or-false_type {};
     

    Inherits: If T is a reference pointer type - then inherits from true_type, - otherwise inherits from false_type. + then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 8.3.2. @@ -56,7 +57,7 @@

    is_reference<int&> - inherits from true_type. + inherits from true_type.

    @@ -66,7 +67,7 @@

    is_reference<int const&>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_same.html b/doc/html/boost_typetraits/reference/is_same.html index 59452c6..e532d42 100644 --- a/doc/html/boost_typetraits/reference/is_same.html +++ b/doc/html/boost_typetraits/reference/is_same.html @@ -3,7 +3,7 @@ is_same - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,15 +24,16 @@
    -
    template <class T, class U>
    -struct is_same : public true_type-or-false_type {};
    +
    +template <class T, class U>
    +struct is_same : public true_type-or-false_type {};
     

    Inherits: If T and U are the same types - then inherits from true_type, - otherwise inherits from false_type. + then inherits from true_type, + otherwise inherits from false_type.

    Header: #include @@ -52,7 +53,7 @@

    is_same<int, int> - inherits from true_type. + inherits from true_type.

    @@ -61,7 +62,7 @@

    - is_same<int, int>::type is the type true_type. + is_same<int, int>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_scalar.html b/doc/html/boost_typetraits/reference/is_scalar.html index c895870..46cc185 100644 --- a/doc/html/boost_typetraits/reference/is_scalar.html +++ b/doc/html/boost_typetraits/reference/is_scalar.html @@ -3,7 +3,7 @@ is_scalar - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,15 +24,16 @@
    -
    template <class T>
    -struct is_scalar : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_scalar : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - scalar type then inherits from true_type, - otherwise inherits from false_type. + scalar type then inherits from true_type, + otherwise inherits from false_type. Scalar types include integral, floating point, enumeration, pointer, and pointer-to-member types.

    @@ -57,7 +58,7 @@

    is_scalar<int*> - inherits from true_type. + inherits from true_type.

    @@ -66,7 +67,7 @@

    - is_scalar<int>::type is the type true_type. + is_scalar<int>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_signed.html b/doc/html/boost_typetraits/reference/is_signed.html index d248dad..be4c5df 100644 --- a/doc/html/boost_typetraits/reference/is_signed.html +++ b/doc/html/boost_typetraits/reference/is_signed.html @@ -3,7 +3,7 @@ is_signed - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,16 +24,17 @@
    -
    template <class T>
    -struct is_signed : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_signed : public true_type-or-false_type {};
     

    Inherits: If T is an signed integer type or an enumerated type with an underlying signed integer type, then inherits - from true_type, - otherwise inherits from false_type. + from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.1, 7.2. @@ -51,7 +52,7 @@

    is_signed<int> - inherits from true_type. + inherits from true_type.

    @@ -60,7 +61,7 @@

    - is_signed<int const volatile>::type is the type true_type. + is_signed<int const volatile>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_stateless.html b/doc/html/boost_typetraits/reference/is_stateless.html index f4472d4..cb8dadd 100644 --- a/doc/html/boost_typetraits/reference/is_stateless.html +++ b/doc/html/boost_typetraits/reference/is_stateless.html @@ -3,7 +3,7 @@ is_stateless - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,15 +24,16 @@
    -
    template <class T>
    -struct is_stateless : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_stateless : public true_type-or-false_type {};
     

    Inherits: Ff T is a stateless type then - inherits from true_type, - otherwise from false_type. + inherits from true_type, + otherwise from false_type.

    Type T must be a complete type. @@ -40,10 +41,11 @@

    A stateless type is a type that has no storage and whose constructors and destructors are trivial. That means that is_stateless - only inherits from true_type + only inherits from true_type if the following expression is true:

    -
    ::boost::has_trivial_constructor<T>::value
    +
    +::boost::has_trivial_constructor<T>::value
     && ::boost::has_trivial_copy<T>::value
     && ::boost::has_trivial_destructor<T>::value
     && ::boost::is_class<T>::value
    @@ -66,7 +68,7 @@
             Without some (as yet unspecified) help from the compiler, is_stateless will
             never report that a class or struct is stateless; this is always safe, if
             possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have
    -        the necessary compiler intrinsics
    +        the necessary compiler intrinsics
             to make this template work automatically.
           

    diff --git a/doc/html/boost_typetraits/reference/is_union.html b/doc/html/boost_typetraits/reference/is_union.html index ea59e84..2efaaac 100644 --- a/doc/html/boost_typetraits/reference/is_union.html +++ b/doc/html/boost_typetraits/reference/is_union.html @@ -3,7 +3,7 @@ is_union - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,15 +24,16 @@
    -
    template <class T>
    -struct is_union : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_union : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - union type then inherits from true_type, - otherwise inherits from false_type. + union type then inherits from true_type, + otherwise inherits from false_type. Currently requires some kind of compiler support, otherwise unions are identified as classes.

    @@ -43,11 +44,11 @@ Compiler Compatibility: Without (some as yet unspecified) help from the compiler, we cannot distinguish between union and class types using only standard C++, as a result this type will never - inherit from true_type, + inherit from true_type, unless the user explicitly specializes the template for their user-defined union types, or unless the compiler supplies some unspecified intrinsic that implements this functionality. Currently (May 2005) only Visual C++ 8 has - the necessary compiler intrinsics + the necessary compiler intrinsics to make this trait "just work" without user intervention.

    @@ -63,7 +64,7 @@

    is_union<void> - inherits from true_type. + inherits from true_type.

    @@ -73,7 +74,7 @@

    is_union<const void>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_unsigned.html b/doc/html/boost_typetraits/reference/is_unsigned.html index 59004b0..580243d 100644 --- a/doc/html/boost_typetraits/reference/is_unsigned.html +++ b/doc/html/boost_typetraits/reference/is_unsigned.html @@ -3,7 +3,7 @@ is_unsigned - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,16 +24,17 @@
    -
    template <class T>
    -struct is_unsigned : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_unsigned : public true_type-or-false_type {};
     

    Inherits: If T is an unsigned integer type or an enumerated type with an underlying unsigned integer type, then inherits - from true_type, - otherwise inherits from false_type. + from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.1, 7.2. @@ -50,7 +51,7 @@

    - is_unsigned<unsigned int> inherits from true_type. + is_unsigned<unsigned int> inherits from true_type.

    @@ -61,7 +62,7 @@

    is_unsigned<unsigned int const volatile>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_void.html b/doc/html/boost_typetraits/reference/is_void.html index 516e4f7..722f0f3 100644 --- a/doc/html/boost_typetraits/reference/is_void.html +++ b/doc/html/boost_typetraits/reference/is_void.html @@ -3,7 +3,7 @@ is_void - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,15 +24,16 @@
    -
    template <class T>
    -struct is_void : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_void : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - void type then inherits from true_type, - otherwise inherits from false_type. + void type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.1p9. @@ -50,7 +51,7 @@

    is_void<void> - inherits from true_type. + inherits from true_type.

    @@ -60,7 +61,7 @@

    is_void<const void>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_volatile.html b/doc/html/boost_typetraits/reference/is_volatile.html index d66ddbc..c75c8c0 100644 --- a/doc/html/boost_typetraits/reference/is_volatile.html +++ b/doc/html/boost_typetraits/reference/is_volatile.html @@ -3,7 +3,7 @@ is_volatile - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,15 +24,16 @@
    -
    template <class T>
    -struct is_volatile : public true_type-or-false_type {};
    +
    +template <class T>
    +struct is_volatile : public true_type-or-false_type {};
     

    Inherits: If T is a (top level) volatile-qualified - type then inherits from true_type, - otherwise inherits from false_type. + type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.3. @@ -49,7 +50,7 @@

    - is_volatile<volatile int> inherits from true_type. + is_volatile<volatile int> inherits from true_type.

    @@ -59,7 +60,7 @@

    is_volatile<const volatile - int>::type is the type true_type. + int>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/make_signed.html b/doc/html/boost_typetraits/reference/make_signed.html index 1a7aecb..94f2f40 100644 --- a/doc/html/boost_typetraits/reference/make_signed.html +++ b/doc/html/boost_typetraits/reference/make_signed.html @@ -3,7 +3,7 @@ make_signed - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,9 +24,10 @@
    -
    template <class T>
    +
    +template <class T>
     struct make_signed
     {
        typedef see-below type;
    @@ -54,7 +55,7 @@
             or  #include <boost/type_traits.hpp>
           

    -

    Table 1.15. Examples

    +

    Table 1.15. Examples

    Boost C++ LibrariesHomeHome Libraries People FAQ
    diff --git a/doc/html/boost_typetraits/reference/make_unsigned.html b/doc/html/boost_typetraits/reference/make_unsigned.html index e1ce164..d09b5ad 100644 --- a/doc/html/boost_typetraits/reference/make_unsigned.html +++ b/doc/html/boost_typetraits/reference/make_unsigned.html @@ -3,7 +3,7 @@ make_unsigned - + @@ -12,7 +12,7 @@
    - + @@ -24,9 +24,10 @@
    -
    template <class T>
    +
    +template <class T>
     struct make_unsigned
     {
        typedef see-below type;
    @@ -54,7 +55,7 @@
             or  #include <boost/type_traits.hpp>
           

    -

    Table 1.16. Examples

    +

    Table 1.16. Examples

    Boost C++ LibrariesHomeHome Libraries People FAQ
    diff --git a/doc/html/boost_typetraits/reference/promote.html b/doc/html/boost_typetraits/reference/promote.html index 088369c..336d945 100644 --- a/doc/html/boost_typetraits/reference/promote.html +++ b/doc/html/boost_typetraits/reference/promote.html @@ -3,7 +3,7 @@ promote - + @@ -12,7 +12,7 @@
    - + @@ -24,9 +24,10 @@
    -
    template <class T>
    +
    +template <class T>
     struct promote
     {
        typedef see-below type;
    @@ -38,8 +39,8 @@
             then applies integral and floating point promotions to T
             and keeps cv-qualifiers of T,
             otherwise leaves T unchanged.
    -        See also integral_promotion
    -        and floating_point_promotion.
    +        See also integral_promotion
    +        and floating_point_promotion.
           

    C++ Standard Reference: 4.5 except 4.5/3 @@ -51,7 +52,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.17. Examples

    +

    Table 1.17. Examples

    Boost C++ LibrariesHomeHome Libraries People FAQ
    diff --git a/doc/html/boost_typetraits/reference/rank.html b/doc/html/boost_typetraits/reference/rank.html index 11535db..35b8c76 100644 --- a/doc/html/boost_typetraits/reference/rank.html +++ b/doc/html/boost_typetraits/reference/rank.html @@ -3,7 +3,7 @@ rank - + @@ -12,7 +12,7 @@
    - + @@ -24,14 +24,15 @@
    -
    template <class T>
    -struct rank : public integral_constant<std::size_t, RANK(T)> {};
    +
    +template <class T>
    +struct rank : public integral_constant<std::size_t, RANK(T)> {};
     

    Inherits: Class template rank inherits from - integral_constant<std::size_t, RANK(T)>, + integral_constant<std::size_t, RANK(T)>, where RANK(T) is the number of array dimensions in type T.

    @@ -52,7 +53,7 @@

    rank<int[]> - inherits from integral_constant<std::size_t, 1>. + inherits from integral_constant<std::size_t, 1>.

    @@ -61,7 +62,7 @@

    - rank<double[2][3][4]>::type is the type integral_constant<std::size_t, 3>. + rank<double[2][3][4]>::type is the type integral_constant<std::size_t, 3>.

    diff --git a/doc/html/boost_typetraits/reference/remove_all_extents.html b/doc/html/boost_typetraits/reference/remove_all_extents.html index a77101e..1bfedda 100644 --- a/doc/html/boost_typetraits/reference/remove_all_extents.html +++ b/doc/html/boost_typetraits/reference/remove_all_extents.html @@ -3,7 +3,7 @@ remove_all_extents - + @@ -12,7 +12,7 @@
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,9 +24,10 @@
    -
    template <class T>
    +
    +template <class T>
     struct remove_all_extents
     {
        typedef see-below type;
    @@ -45,7 +46,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -54,7 +55,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.18. Examples

    +

    Table 1.18. Examples

    Boost C++ LibrariesHomeHome Libraries People FAQ
    diff --git a/doc/html/boost_typetraits/reference/remove_const.html b/doc/html/boost_typetraits/reference/remove_const.html index c42c2ca..32a7810 100644 --- a/doc/html/boost_typetraits/reference/remove_const.html +++ b/doc/html/boost_typetraits/reference/remove_const.html @@ -3,7 +3,7 @@ remove_const - + @@ -12,7 +12,7 @@
    - + @@ -24,9 +24,10 @@
    -
    template <class T>
    +
    +template <class T>
     struct remove_const
     {
        typedef see-below type;
    @@ -44,7 +45,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -53,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.19. Examples

    +

    Table 1.19. Examples

    Boost C++ LibrariesHomeHome Libraries People FAQ
    diff --git a/doc/html/boost_typetraits/reference/remove_cv.html b/doc/html/boost_typetraits/reference/remove_cv.html index e7fc15e..02cfc60 100644 --- a/doc/html/boost_typetraits/reference/remove_cv.html +++ b/doc/html/boost_typetraits/reference/remove_cv.html @@ -3,7 +3,7 @@ remove_cv - + @@ -12,7 +12,7 @@
    - + @@ -24,9 +24,10 @@
    -
    template <class T>
    +
    +template <class T>
     struct remove_cv
     {
        typedef see-below type;
    @@ -44,7 +45,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -53,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.20. Examples

    +

    Table 1.20. Examples

    Boost C++ LibrariesHomeHome Libraries People FAQ
    diff --git a/doc/html/boost_typetraits/reference/remove_extent.html b/doc/html/boost_typetraits/reference/remove_extent.html index 5a277db..63136c2 100644 --- a/doc/html/boost_typetraits/reference/remove_extent.html +++ b/doc/html/boost_typetraits/reference/remove_extent.html @@ -3,7 +3,7 @@ remove_extent - + @@ -12,7 +12,7 @@
    - + @@ -24,9 +24,10 @@
    -
    template <class T>
    +
    +template <class T>
     struct remove_extent
     {
        typedef see-below type;
    @@ -45,7 +46,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -54,7 +55,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.21. Examples

    +

    Table 1.21. Examples

    Boost C++ LibrariesHomeHome Libraries People FAQ
    diff --git a/doc/html/boost_typetraits/reference/remove_pointer.html b/doc/html/boost_typetraits/reference/remove_pointer.html index 3fd04e5..6086af8 100644 --- a/doc/html/boost_typetraits/reference/remove_pointer.html +++ b/doc/html/boost_typetraits/reference/remove_pointer.html @@ -3,7 +3,7 @@ remove_pointer - + @@ -12,7 +12,7 @@
    - + @@ -24,9 +24,10 @@
    -
    template <class T>
    +
    +template <class T>
     struct remove_pointer
     {
        typedef see-below type;
    @@ -44,7 +45,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -53,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.22. Examples

    +

    Table 1.22. Examples

    Boost C++ LibrariesHomeHome Libraries People FAQ
    diff --git a/doc/html/boost_typetraits/reference/remove_reference.html b/doc/html/boost_typetraits/reference/remove_reference.html index c67ee77..0e4feba 100644 --- a/doc/html/boost_typetraits/reference/remove_reference.html +++ b/doc/html/boost_typetraits/reference/remove_reference.html @@ -3,7 +3,7 @@ remove_reference - + @@ -12,7 +12,7 @@
    - + @@ -24,9 +24,10 @@
    -
    template <class T>
    +
    +template <class T>
     struct remove_reference
     {
        typedef see-below type;
    @@ -44,7 +45,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -53,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.23. Examples

    +

    Table 1.23. Examples

    Boost C++ LibrariesHomeHome Libraries People FAQ
    diff --git a/doc/html/boost_typetraits/reference/remove_volatile.html b/doc/html/boost_typetraits/reference/remove_volatile.html index 8c3bbdc..19ac843 100644 --- a/doc/html/boost_typetraits/reference/remove_volatile.html +++ b/doc/html/boost_typetraits/reference/remove_volatile.html @@ -3,7 +3,7 @@ remove_volatile - + @@ -12,7 +12,7 @@
    - + @@ -24,9 +24,10 @@
    -
    template <class T>
    +
    +template <class T>
     struct remove_volatile
     {
        typedef see-below type;
    @@ -44,7 +45,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -53,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.24. Examples

    +

    Table 1.24. Examples

    Boost C++ LibrariesHomeHome Libraries People FAQ
    diff --git a/doc/html/boost_typetraits/reference/type_with_alignment.html b/doc/html/boost_typetraits/reference/type_with_alignment.html index 3c8b133..3e0068c 100644 --- a/doc/html/boost_typetraits/reference/type_with_alignment.html +++ b/doc/html/boost_typetraits/reference/type_with_alignment.html @@ -3,7 +3,7 @@ type_with_alignment - + @@ -12,7 +12,7 @@
    - + @@ -24,9 +24,10 @@
    -
    template <std::size_t Align>
    +
    +template <std::size_t Align>
     struct type_with_alignment
     {
        typedef see-below type;
    diff --git a/doc/html/boost_typetraits/user_defined.html b/doc/html/boost_typetraits/user_defined.html
    index 31ce7b1..6a03356 100644
    --- a/doc/html/boost_typetraits/user_defined.html
    +++ b/doc/html/boost_typetraits/user_defined.html
    @@ -3,7 +3,7 @@
     
     User Defined Specializations
     
    -
    +
     
     
     
    @@ -12,7 +12,7 @@
     
     
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -24,17 +24,18 @@

    Occationally the end user may need to provide their own specialization for one of the type traits - typically where intrinsic compiler support is required to implement a specific trait fully. These specializations should derive from - boost::true_type - or boost::false_type + boost::true_type + or boost::false_type as appropriate:

    -
    #include <boost/type_traits/is_pod.hpp>
    +
    +#include <boost/type_traits/is_pod.hpp>
     #include <boost/type_traits/is_class.hpp>
     #include <boost/type_traits/is_union.hpp>
     
    @@ -48,16 +49,16 @@
     namespace boost
     {
        template<>
    -   struct is_pod<my_pod> : public true_type{};
    +   struct is_pod<my_pod> : public true_type{};
           
        template<>
    -   struct is_pod<my_union> : public true_type{};
    +   struct is_pod<my_union> : public true_type{};
        
        template<>
    -   struct is_union<my_union> : public true_type{};
    +   struct is_union<my_union> : public true_type{};
        
        template<>
    -   struct is_class<my_union> : public false_type{};
    +   struct is_class<my_union> : public false_type{};
     }
     
    diff --git a/doc/html/index.html b/doc/html/index.html index 39b19c2..35dbeaa 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -3,14 +3,14 @@ Chapter 1. Boost.TypeTraits - +
    Boost C++ LibrariesHomeHome Libraries People FAQ
    - + @@ -30,7 +30,7 @@ Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert Ramey and Jeremy Siek

    -

    +

    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)

    From 21b6ef16dba0fb2cb2173a9b4dadba984819fb50 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 30 Mar 2008 16:07:27 +0000 Subject: [PATCH 09/92] Fix bug report #1626: added missing #include. [SVN r43948] --- test/has_virtual_destructor_test.cpp | 1 + 1 file changed, 1 insertion(+) mode change 100755 => 100644 test/has_virtual_destructor_test.cpp diff --git a/test/has_virtual_destructor_test.cpp b/test/has_virtual_destructor_test.cpp old mode 100755 new mode 100644 index fae6e74..ceb86ea --- a/test/has_virtual_destructor_test.cpp +++ b/test/has_virtual_destructor_test.cpp @@ -14,6 +14,7 @@ #include #include +#include class polymorphic_no_virtual_destructor { From 9f60cc0b4255d73c49a6b0b3a207dfec6f8a9d0c Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 30 Mar 2008 17:25:24 +0000 Subject: [PATCH 10/92] Added support and tests for MSVC SSE intrinsic types with alignments > long long. [SVN r43952] --- include/boost/type_traits/alignment_of.hpp | 8 +++- .../boost/type_traits/type_with_alignment.hpp | 23 ++++++++++ test/type_with_alignment_test.cpp | 45 +++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) diff --git a/include/boost/type_traits/alignment_of.hpp b/include/boost/type_traits/alignment_of.hpp index e8e4834..45cf38f 100644 --- a/include/boost/type_traits/alignment_of.hpp +++ b/include/boost/type_traits/alignment_of.hpp @@ -30,6 +30,10 @@ template struct alignment_of; // get the alignment of some arbitrary type: namespace detail { +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4324) // structure was padded due to __declspec(align()) +#endif template struct alignment_of_hack { @@ -37,7 +41,9 @@ struct alignment_of_hack T t; alignment_of_hack(); }; - +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif template struct alignment_logic diff --git a/include/boost/type_traits/type_with_alignment.hpp b/include/boost/type_traits/type_with_alignment.hpp index 49816d2..26a671a 100644 --- a/include/boost/type_traits/type_with_alignment.hpp +++ b/include/boost/type_traits/type_with_alignment.hpp @@ -232,6 +232,29 @@ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a16,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a32,true) } #endif +#if defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER)) +namespace align { +struct __declspec(align(8)) a8 { char m[8]; }; +struct __declspec(align(16)) a16 { char m[16]; }; +struct __declspec(align(32)) a32 { char m[32]; }; +struct __declspec(align(64)) a64 { char m[64]; }; +struct __declspec(align(128)) a128 { char m[128]; }; +} + +template<> class type_with_alignment<8> { public: typedef align::a8 type; }; +template<> class type_with_alignment<16> { public: typedef align::a16 type; }; +template<> class type_with_alignment<32> { public: typedef align::a32 type; }; +template<> class type_with_alignment<64> { public: typedef align::a64 type; }; +template<> class type_with_alignment<128> { public: typedef align::a128 type; }; + +namespace detail { +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a8,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a16,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a32,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a64,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a128,true) +} +#endif #else diff --git a/test/type_with_alignment_test.cpp b/test/type_with_alignment_test.cpp index 3e1f610..77f399c 100644 --- a/test/type_with_alignment_test.cpp +++ b/test/type_with_alignment_test.cpp @@ -14,6 +14,17 @@ # include #endif +#if defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER)) +#if _MSC_VER >= 1400 +#include +#endif +struct __declspec(align(8)) a8 { char m[8]; }; +struct __declspec(align(16)) a16 { char m[16]; }; +struct __declspec(align(32)) a32 { char m[32]; }; +struct __declspec(align(64)) a64 { char m[64]; }; +struct __declspec(align(128)) a128 { char m[128]; }; +#endif + TT_TEST_BEGIN(type_with_alignment) BOOST_MESSAGE(typeid(::tt::type_with_alignment< @@ -69,6 +80,40 @@ BOOST_CHECK(::tt::alignment_of< >::type >::value == ::boost::alignment_of<__int64>::value); #endif +#if defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER)) +#if _MSC_VER >= 1400 +BOOST_CHECK(::tt::alignment_of< + ::tt::type_with_alignment< + ::tt::alignment_of<__m128>::value + >::type + >::value == ::boost::alignment_of<__m128>::value); +BOOST_CHECK(::tt::alignment_of< + ::tt::type_with_alignment< + ::tt::alignment_of<__m64>::value + >::type + >::value == ::boost::alignment_of<__m64>::value); +#endif +BOOST_CHECK(::tt::alignment_of< + ::tt::type_with_alignment< + ::tt::alignment_of::value + >::type + >::value == ::boost::alignment_of::value); +BOOST_CHECK(::tt::alignment_of< + ::tt::type_with_alignment< + ::tt::alignment_of::value + >::type + >::value == ::boost::alignment_of::value); +BOOST_CHECK(::tt::alignment_of< + ::tt::type_with_alignment< + ::tt::alignment_of::value + >::type + >::value == ::boost::alignment_of::value); +BOOST_CHECK(::tt::alignment_of< + ::tt::type_with_alignment< + ::tt::alignment_of::value + >::type + >::value == ::boost::alignment_of::value); +#endif BOOST_CHECK(::tt::alignment_of< ::tt::type_with_alignment< ::tt::alignment_of::value From 912045e6acb5f65bef68d1476ebefdeeedb7d650 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 1 Apr 2008 16:48:58 +0000 Subject: [PATCH 11/92] Updated and strengthened type_with_alignment tests and fixed msvc issue that prevented a type_with_alignment (or any type containing it such as Boost.Optional) from being passed by value. See http://article.gmane.org/gmane.comp.lib.boost.devel/173011 for motivating test case. [SVN r43984] --- .../boost/type_traits/type_with_alignment.hpp | 101 ++++++- test/type_with_alignment_test.cpp | 263 ++++-------------- 2 files changed, 146 insertions(+), 218 deletions(-) diff --git a/include/boost/type_traits/type_with_alignment.hpp b/include/boost/type_traits/type_with_alignment.hpp index 26a671a..03b753e 100644 --- a/include/boost/type_traits/type_with_alignment.hpp +++ b/include/boost/type_traits/type_with_alignment.hpp @@ -189,8 +189,10 @@ struct is_pod< ::boost::detail::lower_alignment > // This alignment method originally due to Brian Parker, implemented by David // Abrahams, and then ported here by Doug Gregor. +namespace detail{ + template -class type_with_alignment +class type_with_alignment_imp { typedef ::boost::detail::lower_alignment t1; typedef typename mpl::if_c< @@ -208,6 +210,13 @@ class type_with_alignment typedef align_t type; }; +} + +template +class type_with_alignment : public detail::type_with_alignment_imp +{ +}; + #if defined(__GNUC__) namespace align { struct __attribute__((__aligned__(2))) a2 {}; @@ -233,19 +242,89 @@ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a32,true) } #endif #if defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER)) +// +// MSVC supports types which have alignments greater than the normal +// maximum: these are used for example in the types __m64 and __m128 +// to provide types with alignment requirements which match the SSE +// registers. Therefore we extend type_with_alignment<> to support +// such types, however, we have to be careful to use a builtin type +// whenever possible otherwise we break previously working code: +// see http://article.gmane.org/gmane.comp.lib.boost.devel/173011 +// for an example and test case. Thus types like a8 below will +// be used *only* if the existing implementation can't provide a type +// with suitable alignment. This does mean however, that type_with_alignment<> +// may return a type which cannot be passed through a function call +// by value (and neither can any type containing such a type like +// Boost.Optional). However, this only happens when we have no choice +// in the matter because no other "ordinary" type is available. +// namespace align { -struct __declspec(align(8)) a8 { char m[8]; }; -struct __declspec(align(16)) a16 { char m[16]; }; -struct __declspec(align(32)) a32 { char m[32]; }; -struct __declspec(align(64)) a64 { char m[64]; }; -struct __declspec(align(128)) a128 { char m[128]; }; +struct __declspec(align(8)) a8 { + char m[8]; + typedef a8 type; +}; +struct __declspec(align(16)) a16 { + char m[16]; + typedef a16 type; +}; +struct __declspec(align(32)) a32 { + char m[32]; + typedef a32 type; +}; +struct __declspec(align(64)) a64 +{ + char m[64]; + typedef a64 type; +}; +struct __declspec(align(128)) a128 { + char m[128]; + typedef a128 type; +}; } -template<> class type_with_alignment<8> { public: typedef align::a8 type; }; -template<> class type_with_alignment<16> { public: typedef align::a16 type; }; -template<> class type_with_alignment<32> { public: typedef align::a32 type; }; -template<> class type_with_alignment<64> { public: typedef align::a64 type; }; -template<> class type_with_alignment<128> { public: typedef align::a128 type; }; +template<> class type_with_alignment<8> +{ + typedef mpl::if_c< + ::boost::alignment_of::value < 8, + align::a8, + detail::type_with_alignment_imp<8> >::type t1; +public: + typedef t1::type type; +}; +template<> class type_with_alignment<16> +{ + typedef mpl::if_c< + ::boost::alignment_of::value < 16, + align::a16, + detail::type_with_alignment_imp<16> >::type t1; +public: + typedef t1::type type; +}; +template<> class type_with_alignment<32> +{ + typedef mpl::if_c< + ::boost::alignment_of::value < 32, + align::a32, + detail::type_with_alignment_imp<32> >::type t1; +public: + typedef t1::type type; +}; +template<> class type_with_alignment<64> { + typedef mpl::if_c< + ::boost::alignment_of::value < 64, + align::a64, + detail::type_with_alignment_imp<64> >::type t1; +public: + typedef t1::type type; +}; +template<> class type_with_alignment<128> { + typedef mpl::if_c< + ::boost::alignment_of::value < 128, + align::a128, + detail::type_with_alignment_imp<128> >::type t1; +public: + typedef t1::type type; +}; namespace detail { BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a8,true) diff --git a/test/type_with_alignment_test.cpp b/test/type_with_alignment_test.cpp index 77f399c..534803c 100644 --- a/test/type_with_alignment_test.cpp +++ b/test/type_with_alignment_test.cpp @@ -25,227 +25,76 @@ struct __declspec(align(64)) a64 { char m[64]; }; struct __declspec(align(128)) a128 { char m[128]; }; #endif +void check_call2(...){} + +template +void check_call(const T& v) +{ + check_call2(v); +} + +#define TYPE_WITH_ALIGNMENT_TEST(T)\ +{\ +BOOST_CHECK(::tt::alignment_of<\ + ::tt::type_with_alignment<\ + ::tt::alignment_of< T >::value\ + >::type\ + >::value == ::boost::alignment_of< T >::value);\ +BOOST_CHECK(::tt::is_pod<\ + ::tt::type_with_alignment<\ + ::tt::alignment_of< T >::value>::type\ + >::value);\ +} +#define TYPE_WITH_ALIGNMENT_TEST_EX(T)\ + TYPE_WITH_ALIGNMENT_TEST(T)\ +{\ + ::tt::type_with_alignment<\ + ::tt::alignment_of< T >::value\ + >::type val;\ + check_call(val);\ +} + + TT_TEST_BEGIN(type_with_alignment) BOOST_MESSAGE(typeid(::tt::type_with_alignment< ::tt::alignment_of::value >::type).name()); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); +TYPE_WITH_ALIGNMENT_TEST_EX(char) +TYPE_WITH_ALIGNMENT_TEST_EX(short) +TYPE_WITH_ALIGNMENT_TEST_EX(int) +TYPE_WITH_ALIGNMENT_TEST_EX(long) +TYPE_WITH_ALIGNMENT_TEST_EX(float) +TYPE_WITH_ALIGNMENT_TEST_EX(double) +TYPE_WITH_ALIGNMENT_TEST_EX(long double) + #ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of< ::boost::long_long_type>::value - >::type - >::value == ::boost::alignment_of< ::boost::long_long_type>::value); +TYPE_WITH_ALIGNMENT_TEST_EX(::boost::long_long_type) #endif #ifdef BOOST_HAS_MS_INT64 -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of<__int64>::value - >::type - >::value == ::boost::alignment_of<__int64>::value); +TYPE_WITH_ALIGNMENT_TEST_EX(__int64) #endif +TYPE_WITH_ALIGNMENT_TEST_EX(int[4]) +TYPE_WITH_ALIGNMENT_TEST_EX(int(*)(int)) +TYPE_WITH_ALIGNMENT_TEST_EX(int*) +TYPE_WITH_ALIGNMENT_TEST_EX(VB) +TYPE_WITH_ALIGNMENT_TEST_EX(VD) +TYPE_WITH_ALIGNMENT_TEST_EX(enum_UDT) +TYPE_WITH_ALIGNMENT_TEST_EX(mf2) +TYPE_WITH_ALIGNMENT_TEST_EX(POD_UDT) +TYPE_WITH_ALIGNMENT_TEST_EX(empty_UDT) +TYPE_WITH_ALIGNMENT_TEST_EX(union_UDT) + #if defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER)) #if _MSC_VER >= 1400 -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of<__m128>::value - >::type - >::value == ::boost::alignment_of<__m128>::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of<__m64>::value - >::type - >::value == ::boost::alignment_of<__m64>::value); +TYPE_WITH_ALIGNMENT_TEST(__m128) +TYPE_WITH_ALIGNMENT_TEST(__m64) #endif -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); +TYPE_WITH_ALIGNMENT_TEST(a8) +TYPE_WITH_ALIGNMENT_TEST(a16) +TYPE_WITH_ALIGNMENT_TEST(a32) #endif -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); -BOOST_CHECK(::tt::alignment_of< - ::tt::type_with_alignment< - ::tt::alignment_of::value - >::type - >::value == ::boost::alignment_of::value); - -// check that the type produced are POD's: -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of::value>::type - >::value); -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of::value>::type - >::value); -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of::value>::type - >::value); -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of::value>::type - >::value); -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of::value>::type - >::value); -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of::value>::type - >::value); -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of::value>::type - >::value); -#ifdef BOOST_HAS_LONG_LONG -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of< ::boost::long_long_type>::value>::type - >::value); -#endif -#ifdef BOOST_HAS_MS_INT64 -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of<__int64>::value>::type - >::value); -#endif -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of::value>::type - >::value); -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of::value>::type - >::value); -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of::value>::type - >::value); -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of::value>::type - >::value); -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of::value>::type - >::value); -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of::value>::type - >::value); -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of::value>::type - >::value); -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of::value>::type - >::value); -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of::value>::type - >::value); -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of::value>::type - >::value); TT_TEST_END From 713516cd7d89af1d50b4e95920302911a36d20cb Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 3 Apr 2008 16:41:43 +0000 Subject: [PATCH 12/92] Update the type_traits intrinsics support to include the gcc-4.3 intrinsics. Also added some braces to our testing macros to quieten gcc warnings. [SVN r44013] --- include/boost/type_traits/intrinsics.hpp | 34 +++++++++++++++++++ include/boost/type_traits/is_abstract.hpp | 11 +++++- .../boost/type_traits/is_base_and_derived.hpp | 12 ++++++- include/boost/type_traits/is_class.hpp | 11 ++++++ include/boost/type_traits/is_enum.hpp | 11 +++++- include/boost/type_traits/is_polymorphic.hpp | 12 +++++++ test/check_integral_constant.hpp | 8 ++++- 7 files changed, 95 insertions(+), 4 deletions(-) mode change 100755 => 100644 include/boost/type_traits/is_abstract.hpp diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 3b48b47..a8cde36 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -31,6 +31,16 @@ // BOOST_HAS_NOTHROW_COPY(T) should evaluate to true if T(t) can not throw // BOOST_HAS_NOTHROW_ASSIGN(T) should evaluate to true if t = u can not throw // BOOST_HAS_VIRTUAL_DESTRUCTOR(T) should evaluate to true T has a virtual destructor +// +// The following can also be defined: when detected our implementation is greatly simplified. +// Note that unlike the macros above these do not have default definitions, so we can use +// #ifdef MACRONAME to detect when these are available. +// +// BOOST_IS_ABSTRACT(T) true if T is an abstract type +// BOOST_IS_BASE_OF(T,U) true if T is a base class of U +// BOOST_IS_CLASS(T) true if T is a class type +// BOOST_IS_ENUM(T) true is T is an enum +// BOOST_IS_POLYMORPHIC(T) true if T is a polymorphic type #ifdef BOOST_HAS_SGI_TYPE_TRAITS // Hook into SGI's __type_traits class, this will pick up user supplied @@ -101,6 +111,30 @@ # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) +# include +# include +# include + +# define BOOST_IS_UNION(T) __is_union(T) +# define BOOST_IS_POD(T) __is_pod(T) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) __has_trivial_assign(T) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) +# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile::value && !is_reference::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# define BOOST_IS_CLASS(T) __is_class(T) +# define BOOST_IS_ENUM(T) __is_enum(T) +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +#endif + #ifndef BOOST_IS_UNION # define BOOST_IS_UNION(T) false #endif diff --git a/include/boost/type_traits/is_abstract.hpp b/include/boost/type_traits/is_abstract.hpp old mode 100755 new mode 100644 index c565f08..29d10c3 --- a/include/boost/type_traits/is_abstract.hpp +++ b/include/boost/type_traits/is_abstract.hpp @@ -48,6 +48,8 @@ // to degrade gracefully, rather than trash the compiler (John Maddock). // +#include +#ifndef BOOST_IS_ABSTRACT #include #include #include @@ -55,6 +57,7 @@ #ifdef BOOST_NO_IS_ABSTRACT #include #endif +#endif // should be the last #include #include @@ -62,7 +65,13 @@ namespace boost { namespace detail{ -#ifndef BOOST_NO_IS_ABSTRACT +#ifdef BOOST_IS_ABSTRACT +template +struct is_abstract_imp +{ + BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_ABSTRACT(T)); +}; +#elif !defined(BOOST_NO_IS_ABSTRACT) template struct is_abstract_imp2 { diff --git a/include/boost/type_traits/is_base_and_derived.hpp b/include/boost/type_traits/is_base_and_derived.hpp index 6f3add2..0e195b3 100644 --- a/include/boost/type_traits/is_base_and_derived.hpp +++ b/include/boost/type_traits/is_base_and_derived.hpp @@ -9,6 +9,8 @@ #ifndef BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED #define BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED +#include +#ifndef BOOST_IS_BASE_OF #include #include #include @@ -16,6 +18,7 @@ #include #include #include +#endif // should be the last #include #include @@ -24,6 +27,7 @@ namespace boost { namespace detail { +#ifndef BOOST_IS_BASE_OF #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581)) \ && !BOOST_WORKAROUND(__SUNPRO_CC , <= 0x540) \ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 243) \ @@ -214,7 +218,13 @@ struct is_base_and_derived_impl BOOST_STATIC_CONSTANT(bool, value = bound_type::value); }; - +#else +template +struct is_base_and_derived_impl +{ + BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_BASE_OF(B,D)); +}; +#endif } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF2( diff --git a/include/boost/type_traits/is_class.hpp b/include/boost/type_traits/is_class.hpp index 05d96de..63a0c6a 100644 --- a/include/boost/type_traits/is_class.hpp +++ b/include/boost/type_traits/is_class.hpp @@ -11,6 +11,8 @@ #define BOOST_TT_IS_CLASS_HPP_INCLUDED #include +#include +#ifndef BOOST_IS_CLASS # include # include # include @@ -28,6 +30,7 @@ #ifdef __EDG_VERSION__ # include #endif +#endif // BOOST_IS_CLASS // should be the last #include #include @@ -36,6 +39,7 @@ namespace boost { namespace detail { +#ifndef BOOST_IS_CLASS #ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION // This is actually the conforming implementation which works with @@ -111,6 +115,13 @@ struct is_class_impl }; # endif // BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION +# else // BOOST_IS_CLASS +template +struct is_class_impl +{ + BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_CLASS(T)); +}; +# endif // BOOST_IS_CLASS } // namespace detail diff --git a/include/boost/type_traits/is_enum.hpp b/include/boost/type_traits/is_enum.hpp index c913975..86fa66d 100644 --- a/include/boost/type_traits/is_enum.hpp +++ b/include/boost/type_traits/is_enum.hpp @@ -11,6 +11,8 @@ #ifndef BOOST_TT_IS_ENUM_HPP_INCLUDED #define BOOST_TT_IS_ENUM_HPP_INCLUDED +#include +#ifndef BOOST_IS_ENUM #include #include #include @@ -24,13 +26,14 @@ # include # include #endif - +#endif // should be the last #include #include namespace boost { +#ifndef BOOST_IS_ENUM #if !(defined(__BORLANDC__) && (__BORLANDC__ <= 0x551)) namespace detail { @@ -173,6 +176,12 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_enum,T,false) #endif +#else // BOOST_IS_ENUM + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_enum,T,BOOST_IS_ENUM(T)) + +#endif + } // namespace boost #include diff --git a/include/boost/type_traits/is_polymorphic.hpp b/include/boost/type_traits/is_polymorphic.hpp index c312622..8fcc69e 100644 --- a/include/boost/type_traits/is_polymorphic.hpp +++ b/include/boost/type_traits/is_polymorphic.hpp @@ -8,13 +8,19 @@ #ifndef BOOST_TT_IS_POLYMORPHIC_HPP #define BOOST_TT_IS_POLYMORPHIC_HPP +#include +#ifndef BOOST_IS_POLYMORPHIC #include #include +#endif // should be the last #include #include #include namespace boost{ + +#ifndef BOOST_IS_POLYMORPHIC + namespace detail{ template @@ -95,6 +101,12 @@ struct is_polymorphic_imp BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_polymorphic,T,::boost::detail::is_polymorphic_imp::value) +#else // BOOST_IS_POLYMORPHIC + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_polymorphic,T,BOOST_IS_POLYMORPHIC(T)) + +#endif + } // namespace boost #include diff --git a/test/check_integral_constant.hpp b/test/check_integral_constant.hpp index 8cfd06a..754a170 100644 --- a/test/check_integral_constant.hpp +++ b/test/check_integral_constant.hpp @@ -59,10 +59,16 @@ namespace boost{ BOOST_CHECK_MESSAGE(true, "Validating Integral Constant Expression: \"" << BOOST_STRINGIZE(expression) << "\"");\ }\ if(!::boost::detail::tt_compare((int)expression, expected_value))\ + {\ if(!::boost::detail::tt_compare((int)expression, alternate_value))\ + {\ BOOST_CHECK_MESSAGE(false, "The expression: \"" << BOOST_STRINGIZE(expression) << "\" had an invalid value (found " << ::boost::detail::integral_constant<(int)(expression)>::value() << ", expected " << expected_value << ")" );\ + }\ else\ - BOOST_WARN_MESSAGE(false, "The expression: \"" << BOOST_STRINGIZE(expression) << "\" did not have the value we wish it to have (found " << ::boost::detail::integral_constant<(int)(expression)>::value() << ", expected " << expected_value << ")" ) + {\ + BOOST_WARN_MESSAGE(false, "The expression: \"" << BOOST_STRINGIZE(expression) << "\" did not have the value we wish it to have (found " << ::boost::detail::integral_constant<(int)(expression)>::value() << ", expected " << expected_value << ")" );\ + }\ + } }//detail From 4298d3623722010ccf82e18b32816f3941be528e Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 3 Apr 2008 18:12:04 +0000 Subject: [PATCH 13/92] Updated type_traits intrinsic support for VC8/9. Updated type_traits intrinsics docs. [SVN r44017] --- doc/has_virtual_destructor.qbk | 2 +- doc/html/boost_typetraits/background.html | 120 ++++++++---------- doc/html/boost_typetraits/category.html | 4 +- .../boost_typetraits/category/alignment.html | 15 +-- .../boost_typetraits/category/function.html | 13 +- .../boost_typetraits/category/transform.html | 53 ++++---- .../category/value_traits.html | 12 +- .../category/value_traits/primary.html | 56 ++++---- .../category/value_traits/properties.html | 55 ++++---- .../category/value_traits/relate.html | 13 +- doc/html/boost_typetraits/credits.html | 6 +- doc/html/boost_typetraits/examples.html | 4 +- doc/html/boost_typetraits/examples/copy.html | 15 +-- .../boost_typetraits/examples/destruct.html | 13 +- doc/html/boost_typetraits/examples/fill.html | 17 ++- doc/html/boost_typetraits/examples/iter.html | 19 ++- .../boost_typetraits/examples/to_double.html | 7 +- doc/html/boost_typetraits/intrinsics.html | 40 +++--- doc/html/boost_typetraits/intro.html | 8 +- doc/html/boost_typetraits/mpl.html | 10 +- doc/html/boost_typetraits/reference.html | 4 +- .../boost_typetraits/reference/add_const.html | 11 +- .../boost_typetraits/reference/add_cv.html | 11 +- .../reference/add_pointer.html | 11 +- .../reference/add_reference.html | 11 +- .../reference/add_volatile.html | 11 +- .../reference/aligned_storage.html | 7 +- .../reference/alignment_of.html | 13 +- .../boost_typetraits/reference/decay.html | 9 +- .../boost_typetraits/reference/extent.html | 17 ++- .../reference/floating_point_promotion.html | 9 +- .../reference/function_traits.html | 13 +- .../reference/has_no_throw_def_cons.html | 6 +- .../reference/has_nothrow_assign.html | 13 +- .../reference/has_nothrow_constructor.html | 17 ++- .../reference/has_nothrow_copy.html | 17 ++- .../reference/has_nothrow_cp_cons.html | 6 +- .../reference/has_trivial_assign.html | 19 ++- .../reference/has_trivial_constructor.html | 21 ++- .../reference/has_trivial_copy.html | 21 ++- .../reference/has_trivial_cp_cons.html | 6 +- .../reference/has_trivial_def_cons.html | 6 +- .../reference/has_trivial_destructor.html | 19 ++- .../reference/has_virtual_destructor.html | 19 ++- .../reference/integral_constant.html | 7 +- .../reference/integral_promotion.html | 9 +- .../reference/is_abstract.html | 19 ++- .../reference/is_arithmetic.html | 21 ++- .../boost_typetraits/reference/is_array.html | 17 ++- .../reference/is_base_of.html | 19 ++- .../boost_typetraits/reference/is_class.html | 23 ++-- .../reference/is_complex.html | 9 +- .../reference/is_compound.html | 19 ++- .../boost_typetraits/reference/is_const.html | 17 ++- .../reference/is_convertible.html | 22 ++-- .../boost_typetraits/reference/is_empty.html | 19 ++- .../boost_typetraits/reference/is_enum.html | 19 ++- .../reference/is_floating_point.html | 17 ++- .../reference/is_function.html | 28 ++-- .../reference/is_fundamental.html | 23 ++-- .../reference/is_integral.html | 17 ++- .../reference/is_member_function_pointer.html | 21 ++- .../reference/is_member_object_pointer.html | 21 ++- .../reference/is_member_pointer.html | 17 ++- .../boost_typetraits/reference/is_object.html | 17 ++- .../boost_typetraits/reference/is_pod.html | 17 ++- .../reference/is_pointer.html | 17 ++- .../reference/is_polymorphic.html | 17 ++- .../reference/is_reference.html | 17 ++- .../boost_typetraits/reference/is_same.html | 17 ++- .../boost_typetraits/reference/is_scalar.html | 17 ++- .../boost_typetraits/reference/is_signed.html | 17 ++- .../reference/is_stateless.html | 20 ++- .../boost_typetraits/reference/is_union.html | 21 ++- .../reference/is_unsigned.html | 17 ++- .../boost_typetraits/reference/is_void.html | 17 ++- .../reference/is_volatile.html | 17 ++- .../reference/make_signed.html | 9 +- .../reference/make_unsigned.html | 9 +- .../boost_typetraits/reference/promote.html | 13 +- doc/html/boost_typetraits/reference/rank.html | 15 +-- .../reference/remove_all_extents.html | 11 +- .../reference/remove_const.html | 11 +- .../boost_typetraits/reference/remove_cv.html | 11 +- .../reference/remove_extent.html | 11 +- .../reference/remove_pointer.html | 11 +- .../reference/remove_reference.html | 11 +- .../reference/remove_volatile.html | 11 +- .../reference/type_with_alignment.html | 7 +- doc/html/boost_typetraits/user_defined.html | 19 ++- doc/html/index.html | 6 +- doc/intrinsics.qbk | 3 +- include/boost/type_traits/intrinsics.hpp | 15 +++ include/boost/type_traits/is_convertible.hpp | 12 ++ 94 files changed, 747 insertions(+), 809 deletions(-) diff --git a/doc/has_virtual_destructor.qbk b/doc/has_virtual_destructor.qbk index a204922..018a5a5 100644 --- a/doc/has_virtual_destructor.qbk +++ b/doc/has_virtual_destructor.qbk @@ -18,7 +18,7 @@ way to portably implement this trait. The default version provided always inherits from __false_type, and has to be explicitly specialized for types with virtual destructors unless the compiler used has compiler __intrinsics that enable the trait to do the right thing: currently (May 2005) only Visual C++ -8 has the necessary __intrinsics. +8 and GCC-4.3 have the necessary __intrinsics. __std_ref 12.4. diff --git a/doc/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index 4beb97f..b17d516 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -3,7 +3,7 @@ Background and Tutorial - + @@ -24,7 +24,7 @@

    The following is an updated version of the article "C++ Type traits" @@ -56,19 +56,19 @@ method available to them.

    - - Type Traits + + Type Traits

    Class char_traits is a classic example of a collection of type specific properties wrapped up in a single - class - what Nathan Myers termed a baggage class[1]. In the Boost type-traits library, - we[2] have written a set of very + class - what Nathan Myers termed a baggage class[1]. In the Boost type-traits library, + we[2] have written a set of very specific traits classes, each of which encapsulate a single trait from the C++ type system; for example, is a type a pointer or a reference type? Or does a type have a trivial constructor, or a const-qualifier? The type-traits classes - share a unified design: each class inherits from a the type true_type - if the type has the specified property and inherits from false_type + share a unified design: each class inherits from a the type true_type + if the type has the specified property and inherits from false_type otherwise. As we will show, these classes can be used in generic programming to determine the properties of a given type and introduce optimizations that are appropriate for that case. @@ -84,8 +84,8 @@ given.

    - - Implementation + + Implementation

    There are far too many separate classes contained in the type-traits library @@ -94,18 +94,17 @@ anyway, so here we will just give you a flavor for how some of the classes are implemented. Beginning with possibly the simplest class in the library, is_void<T> inherits - from true_type + from true_type only if T is void.

    -
    -template <typename T> 
    -struct is_void : public false_type{};
    +
    template <typename T> 
    +struct is_void : public false_type{};
     
     template <> 
    -struct is_void<void> : public true_type{};
    +struct is_void<void> : public true_type{};
     

    - Here we define a primary version of the template class is_void, + Here we define a primary version of the template class is_void, and provide a full-specialization when T is void. While full specialization of a template class is an important technique, sometimes we need a solution @@ -116,12 +115,11 @@ a pointer, and a partial specialization to handle all the cases where T is a pointer:

    -
    -template <typename T> 
    -struct is_pointer : public false_type{};
    +
    template <typename T> 
    +struct is_pointer : public false_type{};
     
     template <typename T> 
    -struct is_pointer<T*> : public true_type{};
    +struct is_pointer<T*> : public true_type{};
     

    The syntax for partial specialization is somewhat arcane and could easily occupy @@ -134,15 +132,13 @@ but as a rule of thumb if you can legally write two function overloads of the form:

    -
    -void foo(T);
    +
    void foo(T);
     void foo(U);
     

    Then you can also write a partial specialization of the form:

    -
    -template <typename T>
    +
    template <typename T>
     class c{ /*details*/ };
     
     template <typename T>
    @@ -158,19 +154,18 @@
           that is the same type as T but with any top-level array bounds removed; this
           is an example of a traits class that performs a transformation on a type:
         

    -
    -template <typename T> 
    -struct remove_extent
    +
    template <typename T> 
    +struct remove_extent
     { typedef T type; };
     
     template <typename T, std::size_t N> 
    -struct remove_extent<T[N]>
    +struct remove_extent<T[N]>
     { typedef T type; };
     

    - The aim of remove_extent + The aim of remove_extent is this: imagine a generic algorithm that is passed an array type as a template - parameter, remove_extent + parameter, remove_extent provides a means of determining the underlying type of the array. For example remove_extent<int[4][5]>::type would evaluate to the type int[5]. This example also shows that the number of template parameters in a partial specialization does not have to match the @@ -179,15 +174,14 @@ in the default template.

    - - Optimized copy + + Optimized copy

    As an example of how the type traits classes can be used, consider the standard library algorithm copy:

    -
    -template<typename Iter1, typename Iter2>
    +
    template<typename Iter1, typename Iter2>
     Iter2 copy(Iter1 first, Iter1 last, Iter2 out);
     

    @@ -214,7 +208,7 @@

    - By trivial assignment operator we mean that the type is either a scalar type[3] or: + By trivial assignment operator we mean that the type is either a scalar type[3] or:

    • @@ -230,20 +224,20 @@

    If all these conditions are met then a type can be copied using memcpy rather than using a compiler generated - assignment operator. The type-traits library provides a class has_trivial_assign, + assignment operator. The type-traits library provides a class has_trivial_assign, such that has_trivial_assign<T>::value is true only if T has a trivial assignment operator. This class "just works" for scalar types, but has to be explicitly specialised for class/struct types that also happen to have a trivial - assignment operator. In other words if has_trivial_assign + assignment operator. In other words if has_trivial_assign gives the wrong answer, it will give the "safe" wrong answer - that trivial assignment is not allowable.

    The code for an optimized version of copy that uses memcpy - where appropriate is given in the + where appropriate is given in the examples. The code begins by defining a template function do_copy that performs a "slow but safe" - copy. The last parameter passed to this function may be either a true_type - or a false_type. + copy. The last parameter passed to this function may be either a true_type + or a false_type. Following that there is an overload of docopy that uses `memcpy`: this time the iterators are required to actually be pointers to the same type, and the final parameter must be a `_true_type. Finally, the version @@ -253,15 +247,15 @@ otherwise it will call the "slow but safe version".

    - - Was it worth it? + + Was it worth it?

    It has often been repeated in these columns that "premature optimization - is the root of all evil" [4]. + is the root of all evil" [4]. So the question must be asked: was our optimization premature? To put this in perspective the timings for our version of copy compared a conventional - generic copy[5] are shown in table + generic copy[5] are shown in table 1.

    @@ -286,7 +280,7 @@

    -

    Table 1.1. Time taken to copy 1000 elements using `copy<const +

    Table 1.1. Time taken to copy 1000 elements using `copy<const T*, T*>` (times in micro-seconds)

    Boost C++ LibrariesHomeHome Libraries People FAQ
    @@ -385,8 +379,8 @@

    - - Pair of References + + Pair of References

    The optimized copy example shows how type traits may be used to perform optimization @@ -394,15 +388,14 @@ code to compile that otherwise would not do so unless excessive partial specialization is used. This is possible by delegating partial specialization to the type traits classes. Our example for this form of usage is a pair that can hold - references [6]. + references [6].

    First, let us examine the definition of std::pair, omitting the comparison operators, default constructor, and template copy constructor for simplicity:

    -
    -template <typename T1, typename T2> 
    +
    template <typename T1, typename T2> 
     struct pair 
     {
     typedef T1 first_type;
    @@ -418,12 +411,12 @@
     

    Now, this "pair" cannot hold references as it currently stands, because the constructor would require taking a reference to a reference, which is currently - illegal [7]. Let us consider what + illegal [7]. Let us consider what the constructor's parameters would have to be in order to allow "pair" to hold non-reference types, references, and constant references:

    -

    Table 1.2. Required Constructor Argument Types

    +

    Table 1.2. Required Constructor Argument Types

    @@ -484,11 +477,11 @@

    A little familiarity with the type traits classes allows us to construct a single mapping that allows us to determine the type of parameter from the type - of the contained class. The type traits classes provide a transformation add_reference, which + of the contained class. The type traits classes provide a transformation add_reference, which adds a reference to its type, unless it is already a reference.

    -

    Table 1.3. Using add_reference to synthesize the correct constructor +

    Table 1.3. Using add_reference to synthesize the correct constructor type

    @@ -574,8 +567,7 @@ that can contain non-reference types, reference types, and constant reference types:

    -
    -template <typename T1, typename T2> 
    +
    template <typename T1, typename T2> 
     struct pair 
     {
     typedef T1 first_type;
    @@ -584,8 +576,8 @@
     T1 first;
     T2 second;
     
    -pair(boost::add_reference<const T1>::type nfirst,
    -      boost::add_reference<const T2>::type nsecond)
    +pair(boost::add_reference<const T1>::type nfirst,
    +      boost::add_reference<const T2>::type nsecond)
     :first(nfirst), second(nsecond) { }
     };
     
    @@ -606,8 +598,8 @@ easier to maintain and easier to understand.

    - - Conclusion + + Conclusion

    We hope that in this article we have been able to give you some idea of what @@ -619,16 +611,16 @@ can be optimal as well as generic.

    - - Acknowledgements + + Acknowledgements

    The authors would like to thank Beman Dawes and Howard Hinnant for their helpful comments when preparing this article.

    - - References + + References
    1. diff --git a/doc/html/boost_typetraits/category.html b/doc/html/boost_typetraits/category.html index fb652db..fd7037f 100644 --- a/doc/html/boost_typetraits/category.html +++ b/doc/html/boost_typetraits/category.html @@ -3,7 +3,7 @@ Type Traits by Category - + @@ -24,7 +24,7 @@

    Some low level memory management routines need to synthesize a POD type with - specific alignment properties. The template type_with_alignment - finds the smallest type with a specified alignment, while template aligned_storage + specific alignment properties. The template type_with_alignment + finds the smallest type with a specified alignment, while template aligned_storage creates a type with a specific size and alignment.

    Synopsis

    -
    -template <std::size_t Align>
    -struct type_with_alignment;
    +
    template <std::size_t Align>
    +struct type_with_alignment;
     
     template <std::size_t Size, std::size_t Align>
    -struct aligned_storage;
    +struct aligned_storage;
     
    diff --git a/doc/html/boost_typetraits/category/function.html b/doc/html/boost_typetraits/category/function.html index 52e18cd..cf89345 100644 --- a/doc/html/boost_typetraits/category/function.html +++ b/doc/html/boost_typetraits/category/function.html @@ -3,7 +3,7 @@ Decomposing Function Types - + @@ -24,21 +24,20 @@

    - The class template function_traits - extracts information from function types (see also is_function). + The class template function_traits + extracts information from function types (see also is_function). This traits class allows you to tell how many arguments a function takes, what those argument types are, and what the return type is.

    Synopsis

    -
    -template <std::size_t Align>
    -struct function_traits;
    +
    template <std::size_t Align>
    +struct function_traits;
     
    diff --git a/doc/html/boost_typetraits/category/transform.html b/doc/html/boost_typetraits/category/transform.html index df430ca..136a7fa 100644 --- a/doc/html/boost_typetraits/category/transform.html +++ b/doc/html/boost_typetraits/category/transform.html @@ -3,7 +3,7 @@ Type Traits that Transform One Type to Another - + @@ -24,7 +24,7 @@

    @@ -36,64 +36,63 @@

    Synopsis:

    -
    -template <class T>
    -struct add_const;
    +
    template <class T>
    +struct add_const;
     
     template <class T>
    -struct add_cv;
    +struct add_cv;
     
     template <class T>
    -struct add_pointer;
    +struct add_pointer;
     
     template <class T>
    -struct add_reference;
    +struct add_reference;
     
     template <class T>
    -struct add_volatile;
    +struct add_volatile;
     
     template <class T>
    -struct decay;
    +struct decay;
     
     template <class T>
    -struct floating_point_promotion;
    +struct floating_point_promotion;
     
     template <class T>
    -struct integral_promotion;
    +struct integral_promotion;
     
     template <class T>
    -struct make_signed;
    +struct make_signed;
     
     template <class T>
    -struct make_unsigned;
    +struct make_unsigned;
     
     template <class T>
    -struct promote;
    +struct promote;
     
     template <class T>
    -struct remove_all_extents;
    +struct remove_all_extents;
     
     template <class T>
    -struct remove_const;
    +struct remove_const;
     
     template <class T>
    -struct remove_cv;
    +struct remove_cv;
     
     template <class T>
    -struct remove_extent;
    +struct remove_extent;
     
     template <class T>
    -struct remove_pointer;
    +struct remove_pointer;
     
     template <class T>
    -struct remove_reference;
    +struct remove_reference;
     
     template <class T>
    -struct remove_volatile;
    +struct remove_volatile;
     
    - - Broken + + Broken Compiler Workarounds:

    @@ -117,8 +116,7 @@

    The first part guarantees the successful compilation of something like this:

    -
    -BOOST_STATIC_ASSERT((is_same<char, remove_reference<char&>::type>::value));
    +
    BOOST_STATIC_ASSERT((is_same<char, remove_reference<char&>::type>::value));
     BOOST_STATIC_ASSERT((is_same<char const, remove_reference<char const&>::type>::value));
     BOOST_STATIC_ASSERT((is_same<char volatile, remove_reference<char volatile&>::type>::value));
     BOOST_STATIC_ASSERT((is_same<char const volatile, remove_reference<char const volatile&>::type>::value));
    @@ -133,8 +131,7 @@
             int or other built-in type,
             but for their own types as well:
           

    -
    -namespace myspace{
    +
    namespace myspace{
        struct MyClass {};
     }
     // declare this at global scope:
    diff --git a/doc/html/boost_typetraits/category/value_traits.html b/doc/html/boost_typetraits/category/value_traits.html
    index c2795f5..d31a0b6 100644
    --- a/doc/html/boost_typetraits/category/value_traits.html
    +++ b/doc/html/boost_typetraits/category/value_traits.html
    @@ -3,7 +3,7 @@
     
     Type Traits that Describe the Properties of a Type
     
    -
    +
     
     
     
    @@ -24,7 +24,7 @@
     
    @@ -37,13 +37,13 @@

    These traits are all value traits, which is to say the - traits classes all inherit from integral_constant, + traits classes all inherit from integral_constant, and are used to access some numerical property of a type. Often this is a simple true or false Boolean value, but in a few cases may be some other integer value (for example when dealing with type alignments, or array bounds: - see alignment_of, - rank - and extent). + see alignment_of, + rank + and extent).

    diff --git a/doc/html/boost_typetraits/category/value_traits/primary.html b/doc/html/boost_typetraits/category/value_traits/primary.html index 5799c9b..f317f13 100644 --- a/doc/html/boost_typetraits/category/value_traits/primary.html +++ b/doc/html/boost_typetraits/category/value_traits/primary.html @@ -3,7 +3,7 @@ Categorizing a Type - + @@ -24,7 +24,7 @@

    @@ -33,13 +33,13 @@ are compositions of one or more primary traits.

    - For any given type, exactly one primary type trait will inherit from true_type, - and all the others will inherit from false_type, + For any given type, exactly one primary type trait will inherit from true_type, + and all the others will inherit from false_type, in other words these traits are mutually exclusive.

    - This means that is_integral<T>::value - and is_floating_point<T>::value + This means that is_integral<T>::value + and is_floating_point<T>::value will only ever be true for built-in types; if you want to check for a user-defined class type that behaves "as if" it is an integral or floating point type, then use the std::numeric_limits @@ -48,69 +48,67 @@

    Synopsis:

    -
    -template <class T>
    -struct is_array<T>;
    +
    template <class T>
    +struct is_array<T>;
       
     template <class T>
    -struct is_class<T>;
    +struct is_class<T>;
     
     template <class T>
    -struct is_complex<T>;
    +struct is_complex<T>;
       
     template <class T>
    -struct is_enum<T>;
    +struct is_enum<T>;
       
     template <class T>
    -struct is_floating_point<T>;
    +struct is_floating_point<T>;
       
     template <class T>
    -struct is_function<T>;
    +struct is_function<T>;
     
     template <class T>
    -struct is_integral<T>;
    +struct is_integral<T>;
       
     template <class T>
    -struct is_member_function_pointer<T>;
    +struct is_member_function_pointer<T>;
       
     template <class T>
    -struct is_member_object_pointer<T>;
    +struct is_member_object_pointer<T>;
       
     template <class T>
    -struct is_pointer<T>;
    +struct is_pointer<T>;
       
     template <class T>
    -struct is_reference<T>;
    +struct is_reference<T>;
       
     template <class T>
    -struct is_union<T>;
    +struct is_union<T>;
       
     template <class T>
    -struct is_void<T>;
    +struct is_void<T>;
     

    The following traits are made up of the union of one or more type categorizations. A type may belong to more than one of these categories, in addition to one of the primary categories.

    -
    -template <class T>
    -struct is_arithmetic;
    +
    template <class T>
    +struct is_arithmetic;
     
     template <class T>
    -struct is_compound;
    +struct is_compound;
     
     template <class T>
    -struct is_fundamental;
    +struct is_fundamental;
     
     template <class T>
    -struct is_member_pointer;
    +struct is_member_pointer;
     
     template <class T>
    -struct is_object;
    +struct is_object;
     
     template <class T>
    -struct is_scalar;
    +struct is_scalar;
     
    diff --git a/doc/html/boost_typetraits/category/value_traits/properties.html b/doc/html/boost_typetraits/category/value_traits/properties.html index b1a3a5d..0a21473 100644 --- a/doc/html/boost_typetraits/category/value_traits/properties.html +++ b/doc/html/boost_typetraits/category/value_traits/properties.html @@ -3,7 +3,7 @@ General Type Properties - + @@ -24,7 +24,7 @@

    @@ -33,78 +33,77 @@

    Synopsis:

    -
    -template <class T>
    -struct alignment_of;
    +
    template <class T>
    +struct alignment_of;
     
     template <class T>
    -struct has_nothrow_assign;
    +struct has_nothrow_assign;
     
     template <class T>
    -struct has_nothrow_constructor;
    +struct has_nothrow_constructor;
     
     template <class T>
    -struct has_nothrow_default_constructor;
    +struct has_nothrow_default_constructor;
     
     template <class T>
    -struct has_nothrow_copy;
    +struct has_nothrow_copy;
     
     template <class T>
    -struct has_nothrow_copy_constructor;
    +struct has_nothrow_copy_constructor;
     
     template <class T>
    -struct has_trivial_assign;
    +struct has_trivial_assign;
     
     template <class T>
    -struct has_trivial_constructor;
    +struct has_trivial_constructor;
     
     template <class T>
    -struct has_trivial_default_constructor;
    +struct has_trivial_default_constructor;
     
     template <class T>
    -struct has_trivial_copy;
    +struct has_trivial_copy;
     
     template <class T>
    -struct has_trivial_copy_constructor;
    +struct has_trivial_copy_constructor;
     
     template <class T>
    -struct has_trivial_destructor;
    +struct has_trivial_destructor;
     
     template <class T>
    -struct has_virtual_destructor;
    +struct has_virtual_destructor;
     
     template <class T>
    -struct is_abstract;
    +struct is_abstract;
     
     template <class T>
    -struct is_const;
    +struct is_const;
     
     template <class T>
    -struct is_empty;
    +struct is_empty;
     
     template <class T>
    -struct is_stateless;
    +struct is_stateless;
     
     template <class T>
    -struct is_pod;
    +struct is_pod;
     
     template <class T>
    -struct is_polymorphic;
    +struct is_polymorphic;
     
     template <class T>
    -struct is_signed;
    +struct is_signed;
     
     template <class T>
    -struct is_unsigned;
    +struct is_unsigned;
     
     template <class T>
    -struct is_volatile;
    +struct is_volatile;
     
     template <class T, std::size_t N = 0>
    -struct extent;
    +struct extent;
     
     template <class T>
    -struct rank;
    +struct rank;
     
    diff --git a/doc/html/boost_typetraits/category/value_traits/relate.html b/doc/html/boost_typetraits/category/value_traits/relate.html index 09db8ea..6a791a4 100644 --- a/doc/html/boost_typetraits/category/value_traits/relate.html +++ b/doc/html/boost_typetraits/category/value_traits/relate.html @@ -3,7 +3,7 @@ Relationships Between Two Types - + @@ -24,7 +24,7 @@

    @@ -34,15 +34,14 @@

    Synopsis:

    -
    -template <class Base, class Derived>
    -struct is_base_of;
    +
    template <class Base, class Derived>
    +struct is_base_of;
     
     template <class From, class To>
    -struct is_convertible;
    +struct is_convertible;
     
     template <class T, class U>
    -struct is_same;
    +struct is_same;
     
    diff --git a/doc/html/boost_typetraits/credits.html b/doc/html/boost_typetraits/credits.html index 5ba3552..69bd783 100644 --- a/doc/html/boost_typetraits/credits.html +++ b/doc/html/boost_typetraits/credits.html @@ -3,7 +3,7 @@ Credits - + @@ -23,7 +23,7 @@

    This documentation was pulled together by John Maddock, using Boost.Quickbook @@ -49,7 +49,7 @@ Aleksey Gurtovoy added MPL integration to the library.

    - The is_convertible + The is_convertible template is based on code originally devised by Andrei Alexandrescu, see "Generic<Programming>: Mappings between Types and Values".

    diff --git a/doc/html/boost_typetraits/examples.html b/doc/html/boost_typetraits/examples.html index 3003c46..d0a09ff 100644 --- a/doc/html/boost_typetraits/examples.html +++ b/doc/html/boost_typetraits/examples.html @@ -3,7 +3,7 @@ Examples - + @@ -24,7 +24,7 @@

    Demonstrates a version of std::copy - that uses has_trivial_assign + that uses has_trivial_assign to determine whether to use memcpy to optimise the copy operation (see copy_example.cpp):

    -
    -//
    +
    //
     // opt::copy
     // same semantics as std::copy
     // calls memcpy where appropriate.
    @@ -43,7 +42,7 @@
     namespace detail{
     
     template<typename I1, typename I2, bool b>
    -I2 copy_imp(I1 first, I1 last, I2 out, const boost::integral_constant<bool, b>&)
    +I2 copy_imp(I1 first, I1 last, I2 out, const boost::integral_constant<bool, b>&)
     {
        while(first != last)
        {
    @@ -55,7 +54,7 @@
     }
     
     template<typename T>
    -T* copy_imp(const T* first, const T* last, T* out, const boost::true_type&)
    +T* copy_imp(const T* first, const T* last, T* out, const boost::true_type&)
     {
        memcpy(out, first, (last-first)*sizeof(T));
        return out+(last-first);
    @@ -73,7 +72,7 @@
        // requirement we detect with overload resolution):
        //
        typedef typename std::iterator_traits<I1>::value_type value_type;
    -   return detail::copy_imp(first, last, out, boost::has_trivial_assign<value_type>());
    +   return detail::copy_imp(first, last, out, boost::has_trivial_assign<value_type>());
     }
     
    diff --git a/doc/html/boost_typetraits/examples/destruct.html b/doc/html/boost_typetraits/examples/destruct.html index 1f26bb7..cb91b48 100644 --- a/doc/html/boost_typetraits/examples/destruct.html +++ b/doc/html/boost_typetraits/examples/destruct.html @@ -3,7 +3,7 @@ An Example that Omits Destructor Calls For Types with Trivial Destructors - + @@ -24,15 +24,14 @@

    Demonstrates a simple algorithm that uses __has_trivial_destruct to determine whether to destructors need to be called (see trivial_destructor_example.cpp):

    -
    -//
    +
    //
     // algorithm destroy_array:
     // The reverse of std::unitialized_copy, takes a block of
     // initialized memory and calls destructors on all objects therein.
    @@ -41,7 +40,7 @@
     namespace detail{
     
     template <class T>
    -void do_destroy_array(T* first, T* last, const boost::false_type&)
    +void do_destroy_array(T* first, T* last, const boost::false_type&)
     {
        while(first != last)
        {
    @@ -51,7 +50,7 @@
     }
     
     template <class T>
    -inline void do_destroy_array(T* first, T* last, const boost::true_type&)
    +inline void do_destroy_array(T* first, T* last, const boost::true_type&)
     {
     }
     
    @@ -60,7 +59,7 @@
     template <class T>
     inline void destroy_array(T* p1, T* p2)
     {
    -   detail::do_destroy_array(p1, p2, ::boost::has_trivial_destructor<T>());
    +   detail::do_destroy_array(p1, p2, ::boost::has_trivial_destructor<T>());
     }
     
    diff --git a/doc/html/boost_typetraits/examples/fill.html b/doc/html/boost_typetraits/examples/fill.html index 4ad227f..d8b98e7 100644 --- a/doc/html/boost_typetraits/examples/fill.html +++ b/doc/html/boost_typetraits/examples/fill.html @@ -3,7 +3,7 @@ An Optimised Version of std::fill - + @@ -24,24 +24,23 @@

    Demonstrates a version of std::fill - that uses has_trivial_assign + that uses has_trivial_assign to determine whether to use memset to optimise the fill operation (see fill_example.cpp):

    -
    -//
    +
    //
     // fill
     // same as std::fill, but uses memset where appropriate
     //
     namespace detail{
     
     template <typename I, typename T, bool b>
    -void do_fill(I first, I last, const T& val, const boost::integral_constant<bool, b>&)
    +void do_fill(I first, I last, const T& val, const boost::integral_constant<bool, b>&)
     {
        while(first != last)
        {
    @@ -51,7 +50,7 @@
     }
     
     template <typename T>
    -void do_fill(T* first, T* last, const T& val, const boost::true_type&)
    +void do_fill(T* first, T* last, const T& val, const boost::true_type&)
     {
        std::memset(first, val, last-first);
     }
    @@ -65,8 +64,8 @@
        // We can do an optimised fill if T has a trivial assignment 
        // operator and if it's size is one:
        //
    -   typedef boost::integral_constant<bool, 
    -      ::boost::has_trivial_assign<T>::value && (sizeof(T) == 1)> truth_type;
    +   typedef boost::integral_constant<bool, 
    +      ::boost::has_trivial_assign<T>::value && (sizeof(T) == 1)> truth_type;
        detail::do_fill(first, last, val, truth_type());
     }
     
    diff --git a/doc/html/boost_typetraits/examples/iter.html b/doc/html/boost_typetraits/examples/iter.html index ec04c97..3283949 100644 --- a/doc/html/boost_typetraits/examples/iter.html +++ b/doc/html/boost_typetraits/examples/iter.html @@ -3,7 +3,7 @@ An improved Version of std::iter_swap - + @@ -24,7 +24,7 @@

    @@ -36,8 +36,7 @@ the swap to ensure that the algorithm works correctly for both proxying iterators, and even iterators of different types (see iter_swap_example.cpp):

    -
    -//
    +
    //
     // iter_swap:
     // tests whether iterator is a proxying iterator or not, and
     // uses optimal form accordingly:
    @@ -45,7 +44,7 @@
     namespace detail{
     
     template <typename I>
    -static void do_swap(I one, I two, const boost::false_type&)
    +static void do_swap(I one, I two, const boost::false_type&)
     {
        typedef typename std::iterator_traits<I>::value_type v_t;
        v_t v = *one;
    @@ -53,7 +52,7 @@
        *two = v;
     }
     template <typename I>
    -static void do_swap(I one, I two, const boost::true_type&)
    +static void do_swap(I one, I two, const boost::true_type&)
     {
        using std::swap;
        swap(*one, *two);
    @@ -71,10 +70,10 @@
        typedef typename std::iterator_traits<I1>::reference r1_t;
        typedef typename std::iterator_traits<I2>::reference r2_t;
     
    -   typedef boost::integral_constant<bool,
    -      ::boost::is_reference<r1_t>::value
    -      && ::boost::is_reference<r2_t>::value
    -      && ::boost::is_same<r1_t, r2_t>::value> truth_type;
    +   typedef boost::integral_constant<bool,
    +      ::boost::is_reference<r1_t>::value
    +      && ::boost::is_reference<r2_t>::value
    +      && ::boost::is_same<r1_t, r2_t>::value> truth_type;
     
        detail::do_swap(one, two, truth_type());
     }
    diff --git a/doc/html/boost_typetraits/examples/to_double.html b/doc/html/boost_typetraits/examples/to_double.html
    index 976d4a9..a9fb6d4 100644
    --- a/doc/html/boost_typetraits/examples/to_double.html
    +++ b/doc/html/boost_typetraits/examples/to_double.html
    @@ -3,7 +3,7 @@
     
     Convert Numeric Types and Enums to double
     
    -
    +
     
     
     
    @@ -24,15 +24,14 @@
     

    Demonstrates a conversion of Numeric Types and enum types to double:

    -
    -template<class T>
    +
    template<class T>
     inline double to_double(T const& value)
     {
         typedef typename boost::promote<T>::type promoted;
    diff --git a/doc/html/boost_typetraits/intrinsics.html b/doc/html/boost_typetraits/intrinsics.html
    index 2ac02bc..93cd2a3 100644
    --- a/doc/html/boost_typetraits/intrinsics.html
    +++ b/doc/html/boost_typetraits/intrinsics.html
    @@ -3,7 +3,7 @@
     
     Support for Compiler Intrinsics
     
    -
    +
     
     
     
    @@ -24,30 +24,30 @@
     

    There are some traits that can not be implemented within the current C++ language: to make these traits "just work" with user defined types, some kind - of additional help from the compiler is required. Currently (May 2005) MWCW - 9 and Visual C++ 8 provide the necessary intrinsics, and other compilers will - no doubt follow in due course. + of additional help from the compiler is required. Currently (April 2008) Visual + C++ 8 and 9, GNU GCC 4.3 and MWCW 9 provide the necessary intrinsics, and other + compilers will no doubt follow in due course.

    The Following traits classes always need compiler support to do the right thing for all types (but all have safe fallback positions if this support is unavailable):

    The following traits classes can't be portably implemented in the C++ language, @@ -55,15 +55,15 @@ all the compilers we know about:

    The following traits classes are dependent on one or more of the above:

    The hooks for compiler-intrinsic support are defined in boost/type_traits/intrinsics.hpp, @@ -71,7 +71,7 @@ of the following macros:

    -

    Table 1.4. Macros for Compiler Intrinsics

    +

    Table 1.4. Macros for Compiler Intrinsics

    diff --git a/doc/html/boost_typetraits/intro.html b/doc/html/boost_typetraits/intro.html index 01a84d8..aa8f8f9 100644 --- a/doc/html/boost_typetraits/intro.html +++ b/doc/html/boost_typetraits/intro.html @@ -3,7 +3,7 @@ Introduction - + @@ -24,7 +24,7 @@

    The Boost type-traits library contains a set of very specific traits classes, @@ -34,8 +34,8 @@

    The type-traits classes share a unified design: each class inherits from a - the type true_type - if the type has the specified property and inherits from false_type + the type true_type + if the type has the specified property and inherits from false_type otherwise.

    diff --git a/doc/html/boost_typetraits/mpl.html b/doc/html/boost_typetraits/mpl.html index 8338fdd..b4f8efb 100644 --- a/doc/html/boost_typetraits/mpl.html +++ b/doc/html/boost_typetraits/mpl.html @@ -3,7 +3,7 @@ MPL Interoperability - + @@ -24,7 +24,7 @@

    All the value based traits in this library conform to MPL's requirements for @@ -33,11 +33,11 @@ for broken compilers.

    - Purely as an implementation detail, this means that true_type + Purely as an implementation detail, this means that true_type inherits from boost::mpl::true_, - false_type + false_type inherits from boost::mpl::false_, - and integral_constant<T, + and integral_constant<T, v> inherits from boost::mpl::integral_c<T,v> (provided T is not bool) diff --git a/doc/html/boost_typetraits/reference.html b/doc/html/boost_typetraits/reference.html index 26d6dfe..46f0f9e 100644 --- a/doc/html/boost_typetraits/reference.html +++ b/doc/html/boost_typetraits/reference.html @@ -3,7 +3,7 @@ Alphabetical Reference - + @@ -24,7 +24,7 @@

    add_const
    diff --git a/doc/html/boost_typetraits/reference/add_const.html b/doc/html/boost_typetraits/reference/add_const.html index 033e2c0..fb7bf4e 100644 --- a/doc/html/boost_typetraits/reference/add_const.html +++ b/doc/html/boost_typetraits/reference/add_const.html @@ -3,7 +3,7 @@ add_const - + @@ -24,10 +24,9 @@
    -
    -template <class T>
    +
    template <class T>
     struct add_const
     {
        typedef see-below type;
    @@ -45,7 +44,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -54,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.5. Examples

    +

    Table 1.5. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_cv.html b/doc/html/boost_typetraits/reference/add_cv.html index f1c5667..dd8a994 100644 --- a/doc/html/boost_typetraits/reference/add_cv.html +++ b/doc/html/boost_typetraits/reference/add_cv.html @@ -3,7 +3,7 @@ add_cv - + @@ -24,10 +24,9 @@
    -
    -template <class T>
    +
    template <class T>
     struct add_cv
     {
        typedef see-below type;
    @@ -46,7 +45,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -55,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.6. Examples

    +

    Table 1.6. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_pointer.html b/doc/html/boost_typetraits/reference/add_pointer.html index d17fb2b..f018df8 100644 --- a/doc/html/boost_typetraits/reference/add_pointer.html +++ b/doc/html/boost_typetraits/reference/add_pointer.html @@ -3,7 +3,7 @@ add_pointer - + @@ -24,10 +24,9 @@
    -
    -template <class T>
    +
    template <class T>
     struct add_pointer
     {
        typedef see-below type;
    @@ -48,7 +47,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -57,7 +56,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.7. Examples

    +

    Table 1.7. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_reference.html b/doc/html/boost_typetraits/reference/add_reference.html index 63f7027..2ee1c13 100644 --- a/doc/html/boost_typetraits/reference/add_reference.html +++ b/doc/html/boost_typetraits/reference/add_reference.html @@ -3,7 +3,7 @@ add_reference - + @@ -24,10 +24,9 @@
    -
    -template <class T>
    +
    template <class T>
     struct add_reference
     {
        typedef see-below type;
    @@ -45,7 +44,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -54,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.8. Examples

    +

    Table 1.8. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_volatile.html b/doc/html/boost_typetraits/reference/add_volatile.html index 63f57b7..e31cb1a 100644 --- a/doc/html/boost_typetraits/reference/add_volatile.html +++ b/doc/html/boost_typetraits/reference/add_volatile.html @@ -3,7 +3,7 @@ add_volatile - + @@ -24,10 +24,9 @@
    -
    -template <class T>
    +
    template <class T>
     struct add_volatile
     {
        typedef see-below type;
    @@ -45,7 +44,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -54,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.9. Examples

    +

    Table 1.9. Examples

    diff --git a/doc/html/boost_typetraits/reference/aligned_storage.html b/doc/html/boost_typetraits/reference/aligned_storage.html index 4ad8c7c..d19d847 100644 --- a/doc/html/boost_typetraits/reference/aligned_storage.html +++ b/doc/html/boost_typetraits/reference/aligned_storage.html @@ -3,7 +3,7 @@ aligned_storage - + @@ -24,10 +24,9 @@
    -
    -template <std::size_t Size, std::size_t Align>
    +
    template <std::size_t Size, std::size_t Align>
     struct aligned_storage
     {
        typedef see-below type;
    diff --git a/doc/html/boost_typetraits/reference/alignment_of.html b/doc/html/boost_typetraits/reference/alignment_of.html
    index c79cca8..5ddd52e 100644
    --- a/doc/html/boost_typetraits/reference/alignment_of.html
    +++ b/doc/html/boost_typetraits/reference/alignment_of.html
    @@ -3,7 +3,7 @@
     
     alignment_of
     
    -
    +
     
     
     
    @@ -24,11 +24,10 @@
     
    -
    -template <class T>
    -struct alignment_of : public integral_constant<std::size_t, ALIGNOF(T)> {};
    +
    template <class T>
    +struct alignment_of : public integral_constant<std::size_t, ALIGNOF(T)> {};
     

    Inherits: Class template alignmentof inherits from `_integral_constant<std::size_t, @@ -53,7 +52,7 @@

    alignment_of<int> - inherits from integral_constant<std::size_t, ALIGNOF(int)>. + inherits from integral_constant<std::size_t, ALIGNOF(int)>.

    @@ -62,7 +61,7 @@

    - alignment_of<char>::type is the type integral_constant<std::size_t, ALIGNOF(char)>. + alignment_of<char>::type is the type integral_constant<std::size_t, ALIGNOF(char)>.

    diff --git a/doc/html/boost_typetraits/reference/decay.html b/doc/html/boost_typetraits/reference/decay.html index 149f124..73853be 100644 --- a/doc/html/boost_typetraits/reference/decay.html +++ b/doc/html/boost_typetraits/reference/decay.html @@ -3,7 +3,7 @@ decay - + @@ -24,10 +24,9 @@
    -
    -template <class T>
    +
    template <class T>
     struct decay
     {
        typedef see-below type;
    @@ -49,7 +48,7 @@
             or  #include <boost/type_traits.hpp>
           

    -

    Table 1.10. Examples

    +

    Table 1.10. Examples

    diff --git a/doc/html/boost_typetraits/reference/extent.html b/doc/html/boost_typetraits/reference/extent.html index 310fb41..e1d5229 100644 --- a/doc/html/boost_typetraits/reference/extent.html +++ b/doc/html/boost_typetraits/reference/extent.html @@ -3,7 +3,7 @@ extent - + @@ -24,22 +24,21 @@
    -
    -template <class T, std::size_t N = 0>
    -struct extent : public integral_constant<std::size_t, EXTENT(T,N)> {};
    +
    template <class T, std::size_t N = 0>
    +struct extent : public integral_constant<std::size_t, EXTENT(T,N)> {};
     

    Inherits: Class template extent inherits - from integral_constant<std::size_t, EXTENT(T,N)>, + from integral_constant<std::size_t, EXTENT(T,N)>, where EXTENT(T,N) is the number of elements in the N'th array dimention of type T.

    If T is not an array type, or if N > - rank<T>::value, or if the N'th array bound is incomplete, + rank<T>::value, or if the N'th array bound is incomplete, then EXTENT(T,N) is zero.

    @@ -54,7 +53,7 @@

    - extent<int[1]> inherits from integral_constant<std::size_t, 1>. + extent<int[1]> inherits from integral_constant<std::size_t, 1>.

    @@ -64,7 +63,7 @@

    extent<double[2][3][4], - 1>::type is the type integral_constant<std::size_t, 3>. + 1>::type is the type integral_constant<std::size_t, 3>.

    diff --git a/doc/html/boost_typetraits/reference/floating_point_promotion.html b/doc/html/boost_typetraits/reference/floating_point_promotion.html index 6637972..3cd3f2a 100644 --- a/doc/html/boost_typetraits/reference/floating_point_promotion.html +++ b/doc/html/boost_typetraits/reference/floating_point_promotion.html @@ -3,7 +3,7 @@ floating_point_promotion - + @@ -24,11 +24,10 @@
    -
    -template <class T>
    +
    template <class T>
     struct floating_point_promotion
     {
        typedef see-below type;
    @@ -50,7 +49,7 @@
             or  #include <boost/type_traits.hpp>
           

    -

    Table 1.11. Examples

    +

    Table 1.11. Examples

    diff --git a/doc/html/boost_typetraits/reference/function_traits.html b/doc/html/boost_typetraits/reference/function_traits.html index a343b6d..7b0a8be 100644 --- a/doc/html/boost_typetraits/reference/function_traits.html +++ b/doc/html/boost_typetraits/reference/function_traits.html @@ -3,7 +3,7 @@ function_traits - + @@ -24,10 +24,9 @@
    -
    -template <class T>
    +
    template <class T>
     struct function_traits
     {
        static const std::size_t    arity = see-below;
    @@ -56,11 +55,11 @@
     

    function_traits is intended to introspect only C++ functions of the form R (), R( A1 ), R ( A1, ... etc. ) and not function pointers or class member - functions. To convert a function pointer type to a suitable type use remove_pointer. + functions. To convert a function pointer type to a suitable type use remove_pointer.

    -

    Table 1.12. Function Traits Members

    +

    Table 1.12. Function Traits Members

    @@ -123,7 +122,7 @@

    -

    Table 1.13. Examples

    +

    Table 1.13. Examples

    diff --git a/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html b/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html index 669d9d1..d9e8de1 100644 --- a/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html +++ b/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html @@ -3,7 +3,7 @@ has_nothrow_default_constructor - + @@ -24,10 +24,10 @@
    diff --git a/doc/html/boost_typetraits/reference/has_nothrow_assign.html b/doc/html/boost_typetraits/reference/has_nothrow_assign.html index 56de2ff..1211cd3 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_assign.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_assign.html @@ -3,7 +3,7 @@ has_nothrow_assign - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct has_nothrow_assign : public true_type-or-false_type {};
    +
    template <class T>
    +struct has_nothrow_assign : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - type with a non-throwing assignment-operator then inherits from true_type, - otherwise inherits from false_type. + type with a non-throwing assignment-operator then inherits from true_type, + otherwise inherits from false_type. Type T must be a complete type.

    diff --git a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html index 26f3c17..a5b50e8 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html @@ -3,7 +3,7 @@ has_nothrow_constructor - + @@ -24,20 +24,19 @@
    -
    -template <class T>
    -struct has_nothrow_constructor : public true_type-or-false_type {};
    +
    template <class T>
    +struct has_nothrow_constructor : public true_type-or-false_type {};
     
     template <class T>
    -struct has_nothrow_default_constructor : public true_type-or-false_type {};
    +struct has_nothrow_default_constructor : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - type with a non-throwing default-constructor then inherits from true_type, - otherwise inherits from false_type. + type with a non-throwing default-constructor then inherits from true_type, + otherwise inherits from false_type. Type T must be a complete type.

    @@ -53,7 +52,7 @@ Without some (as yet unspecified) help from the compiler, has_nothrow_constructor will never report that a class or struct has a non-throwing default-constructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual - C++ 8 has the necessary compiler intrinsics + C++ 8 has the necessary compiler intrinsics to ensure that this trait "just works".

    diff --git a/doc/html/boost_typetraits/reference/has_nothrow_copy.html b/doc/html/boost_typetraits/reference/has_nothrow_copy.html index 56a9b5f..b5e4bbd 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_copy.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_copy.html @@ -3,7 +3,7 @@ has_nothrow_copy - + @@ -24,19 +24,18 @@

    -
    -template <class T>
    -struct has_nothrow_copy : public true_type-or-false_type {};
    +
    template <class T>
    +struct has_nothrow_copy : public true_type-or-false_type {};
     
     template <class T>
    -struct has_nothrow_copy_constructor : public true_type-or-false_type {};
    +struct has_nothrow_copy_constructor : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - type with a non-throwing copy-constructor then inherits from true_type, - otherwise inherits from false_type. + type with a non-throwing copy-constructor then inherits from true_type, + otherwise inherits from false_type. Type T must be a complete type.

    @@ -52,7 +51,7 @@ Without some (as yet unspecified) help from the compiler, has_nothrow_copy will never report that a class or struct has a non-throwing copy-constructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual - C++ 8 has the necessary compiler intrinsics + C++ 8 has the necessary compiler intrinsics to ensure that this trait "just works".

    diff --git a/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html b/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html index 0625fed..24a431d 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html @@ -3,7 +3,7 @@ has_nothrow_copy_constructor - + @@ -24,10 +24,10 @@

    diff --git a/doc/html/boost_typetraits/reference/has_trivial_assign.html b/doc/html/boost_typetraits/reference/has_trivial_assign.html index 49c9475..1718206 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_assign.html +++ b/doc/html/boost_typetraits/reference/has_trivial_assign.html @@ -3,7 +3,7 @@ has_trivial_assign - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct has_trivial_assign : public true_type-or-false_type {};
    +
    template <class T>
    +struct has_trivial_assign : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - type with a trivial assignment-operator then inherits from true_type, - otherwise inherits from false_type. + type with a trivial assignment-operator then inherits from true_type, + otherwise inherits from false_type.

    If a type has a trivial assignment-operator then the operator has the same @@ -49,7 +48,7 @@ Without some (as yet unspecified) help from the compiler, has_trivial_assign will never report that a user-defined class or struct has a trivial constructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW - 9 and Visual C++ 8 have the necessary compiler intrinsics + 9 and Visual C++ 8 have the necessary compiler intrinsics to detect user-defined classes with trivial constructors.

    @@ -68,7 +67,7 @@

    has_trivial_assign<int> - inherits from true_type. + inherits from true_type.

    @@ -77,7 +76,7 @@

    - has_trivial_assign<char*>::type is the type true_type. + has_trivial_assign<char*>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/has_trivial_constructor.html b/doc/html/boost_typetraits/reference/has_trivial_constructor.html index 70ee93a..e21fc4a 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_constructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_constructor.html @@ -3,7 +3,7 @@ has_trivial_constructor - + @@ -24,20 +24,19 @@
    -
    -template <class T>
    -struct has_trivial_constructor : public true_type-or-false_type {};
    +
    template <class T>
    +struct has_trivial_constructor : public true_type-or-false_type {};
     
     template <class T>
    -struct has_trivial_default_constructor : public true_type-or-false_type {};
    +struct has_trivial_default_constructor : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - type with a trivial default-constructor then inherits from true_type, - otherwise inherits from false_type. + type with a trivial default-constructor then inherits from true_type, + otherwise inherits from false_type.

    These two traits are synonyms for each other. @@ -58,7 +57,7 @@ Without some (as yet unspecified) help from the compiler, has_trivial_constructor will never report that a user-defined class or struct has a trivial constructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW - 9 and Visual C++ 8 have the necessary compiler intrinsics + 9 and Visual C++ 8 have the necessary compiler intrinsics to detect user-defined classes with trivial constructors.

    @@ -76,7 +75,7 @@

    - has_trivial_constructor<int> inherits from true_type. + has_trivial_constructor<int> inherits from true_type.

    @@ -86,7 +85,7 @@

    has_trivial_constructor<char*>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/has_trivial_copy.html b/doc/html/boost_typetraits/reference/has_trivial_copy.html index 7247af4..0c55e4a 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_copy.html +++ b/doc/html/boost_typetraits/reference/has_trivial_copy.html @@ -3,7 +3,7 @@ has_trivial_copy - + @@ -24,19 +24,18 @@
    -
    -template <class T>
    -struct has_trivial_copy : public true_type-or-false_type {};
    +
    template <class T>
    +struct has_trivial_copy : public true_type-or-false_type {};
     
     template <class T>
    -struct has_trivial_copy_constructor : public true_type-or-false_type {};
    +struct has_trivial_copy_constructor : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - type with a trivial copy-constructor then inherits from true_type, - otherwise inherits from false_type. + type with a trivial copy-constructor then inherits from true_type, + otherwise inherits from false_type.

    These two traits are synonyms for each other. @@ -55,7 +54,7 @@ Without some (as yet unspecified) help from the compiler, has_trivial_copy will never report that a user-defined class or struct has a trivial constructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW - 9 and Visual C++ 8 have the necessary compiler intrinsics + 9 and Visual C++ 8 have the necessary compiler intrinsics to detect user-defined classes with trivial constructors.

    @@ -74,7 +73,7 @@

    has_trivial_copy<int> - inherits from true_type. + inherits from true_type.

    @@ -83,7 +82,7 @@

    - has_trivial_copy<char*>::type is the type true_type. + has_trivial_copy<char*>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html b/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html index f8e0387..1f16bf4 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html @@ -3,7 +3,7 @@ has_trivial_copy_constructor - + @@ -24,10 +24,10 @@
    diff --git a/doc/html/boost_typetraits/reference/has_trivial_def_cons.html b/doc/html/boost_typetraits/reference/has_trivial_def_cons.html index d7d7efc..e3e740c 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_def_cons.html +++ b/doc/html/boost_typetraits/reference/has_trivial_def_cons.html @@ -3,7 +3,7 @@ has_trivial_default_constructor - + @@ -24,10 +24,10 @@
    diff --git a/doc/html/boost_typetraits/reference/has_trivial_destructor.html b/doc/html/boost_typetraits/reference/has_trivial_destructor.html index 95994cb..a6f9ea8 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_destructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_destructor.html @@ -3,7 +3,7 @@ has_trivial_destructor - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct has_trivial_destructor : public true_type-or-false_type {};
    +
    template <class T>
    +struct has_trivial_destructor : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - type with a trivial destructor then inherits from true_type, - otherwise inherits from false_type. + type with a trivial destructor then inherits from true_type, + otherwise inherits from false_type.

    If a type has a trivial destructor then the destructor has no effect: calls @@ -51,7 +50,7 @@ Without some (as yet unspecified) help from the compiler, has_trivial_destructor will never report that a user-defined class or struct has a trivial destructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW - 9 and Visual C++ 8 have the necessary compiler intrinsics + 9 and Visual C++ 8 have the necessary compiler intrinsics to detect user-defined classes with trivial constructors.

    @@ -69,7 +68,7 @@

    - has_trivial_destructor<int> inherits from true_type. + has_trivial_destructor<int> inherits from true_type.

    @@ -79,7 +78,7 @@

    has_trivial_destructor<char*>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/has_virtual_destructor.html b/doc/html/boost_typetraits/reference/has_virtual_destructor.html index b7e3354..ddfd4f6 100644 --- a/doc/html/boost_typetraits/reference/has_virtual_destructor.html +++ b/doc/html/boost_typetraits/reference/has_virtual_destructor.html @@ -3,7 +3,7 @@ has_virtual_destructor - + @@ -24,26 +24,25 @@
    -
    -template <class T>
    -struct has_virtual_destructor : public true_type-or-false_type {};
    +
    template <class T>
    +struct has_virtual_destructor : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - type with a virtual destructor then inherits from true_type, - otherwise inherits from false_type. + type with a virtual destructor then inherits from true_type, + otherwise inherits from false_type.

    Compiler Compatibility: This trait is provided for completeness, since it's part of the Technical Report on C++ Library Extensions. However, there is currently no way to portably implement this - trait. The default version provided always inherits from false_type, + trait. The default version provided always inherits from false_type, and has to be explicitly specialized for types with virtual destructors unless - the compiler used has compiler intrinsics + the compiler used has compiler intrinsics that enable the trait to do the right thing: currently (May 2005) only Visual - C++ 8 has the necessary intrinsics. + C++ 8 and GCC-4.3 have the necessary intrinsics.

    C++ Standard Reference: 12.4. diff --git a/doc/html/boost_typetraits/reference/integral_constant.html b/doc/html/boost_typetraits/reference/integral_constant.html index 3e86848..31764d2 100644 --- a/doc/html/boost_typetraits/reference/integral_constant.html +++ b/doc/html/boost_typetraits/reference/integral_constant.html @@ -3,7 +3,7 @@ integral_constant - + @@ -24,10 +24,9 @@

    -
    -template <class T, T val>
    +
    template <class T, T val>
     struct integral_constant
     {
        typedef integral_constant<T, val>  type;
    diff --git a/doc/html/boost_typetraits/reference/integral_promotion.html b/doc/html/boost_typetraits/reference/integral_promotion.html
    index 396d1ca..75d798d 100644
    --- a/doc/html/boost_typetraits/reference/integral_promotion.html
    +++ b/doc/html/boost_typetraits/reference/integral_promotion.html
    @@ -3,7 +3,7 @@
     
     integral_promotion
     
    -
    +
     
     
     
    @@ -24,10 +24,9 @@
     
    -
    -template <class T>
    +
    template <class T>
     struct integral_promotion
     {
        typedef see-below type;
    @@ -50,7 +49,7 @@
             or  #include <boost/type_traits.hpp>
           

    -

    Table 1.14. Examples

    +

    Table 1.14. Examples

    diff --git a/doc/html/boost_typetraits/reference/is_abstract.html b/doc/html/boost_typetraits/reference/is_abstract.html index af94bf0..1196f5f 100644 --- a/doc/html/boost_typetraits/reference/is_abstract.html +++ b/doc/html/boost_typetraits/reference/is_abstract.html @@ -3,7 +3,7 @@ is_abstract - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_abstract : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_abstract : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - abstract type then inherits from true_type, - otherwise inherits from false_type. + abstract type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 10.3. @@ -46,7 +45,7 @@

    Compiler Compatibility: The compiler must support DR337 (as of April 2005: GCC 3.4, VC++ 7.1 (and later), Intel C++ - 7 (and later), and Comeau 4.3.2). Otherwise behaves the same as is_polymorphic; + 7 (and later), and Comeau 4.3.2). Otherwise behaves the same as is_polymorphic; this is the "safe fallback position" for which polymorphic types are always regarded as potentially abstract. The macro BOOST_NO_IS_ABSTRACT is used to signify that the implementation is buggy, users should check for @@ -70,7 +69,7 @@

    is_abstract<abc> - inherits from true_type. + inherits from true_type.

    @@ -79,7 +78,7 @@

    - is_abstract<abc>::type is the type true_type. + is_abstract<abc>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_arithmetic.html b/doc/html/boost_typetraits/reference/is_arithmetic.html index 739c896..d0fe6f5 100644 --- a/doc/html/boost_typetraits/reference/is_arithmetic.html +++ b/doc/html/boost_typetraits/reference/is_arithmetic.html @@ -3,7 +3,7 @@ is_arithmetic - + @@ -24,18 +24,17 @@
    -
    -template <class T>
    -struct is_arithmetic : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_arithmetic : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - arithmetic type then inherits from true_type, - otherwise inherits from false_type. - Arithmetic types include integral and floating point types (see also is_integral and - is_floating_point). + arithmetic type then inherits from true_type, + otherwise inherits from false_type. + Arithmetic types include integral and floating point types (see also is_integral and + is_floating_point).

    C++ Standard Reference: 3.9.1p8. @@ -53,7 +52,7 @@

    is_arithmetic<int> - inherits from true_type. + inherits from true_type.

    @@ -62,7 +61,7 @@

    - is_arithmetic<char>::type is the type true_type. + is_arithmetic<char>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_array.html b/doc/html/boost_typetraits/reference/is_array.html index 714374a..23b87a8 100644 --- a/doc/html/boost_typetraits/reference/is_array.html +++ b/doc/html/boost_typetraits/reference/is_array.html @@ -3,7 +3,7 @@ is_array - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_array : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_array : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - array type then inherits from true_type, - otherwise inherits from false_type. + array type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 8.3.4. @@ -55,7 +54,7 @@

    - is_array<int[2]> inherits from true_type. + is_array<int[2]> inherits from true_type.

    @@ -65,7 +64,7 @@

    is_array<char[2][3]>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_base_of.html b/doc/html/boost_typetraits/reference/is_base_of.html index 3cd032c..d5c1db4 100644 --- a/doc/html/boost_typetraits/reference/is_base_of.html +++ b/doc/html/boost_typetraits/reference/is_base_of.html @@ -3,7 +3,7 @@ is_base_of - + @@ -24,22 +24,21 @@
    -
    -template <class Base, class Derived>
    -struct is_base_of : public true_type-or-false_type {};
    +
    template <class Base, class Derived>
    +struct is_base_of : public true_type-or-false_type {};
     

    Inherits: If Base is base class of type - Derived or if both types are the same then inherits from true_type, - otherwise inherits from false_type. + Derived or if both types are the same then inherits from true_type, + otherwise inherits from false_type.

    This template will detect non-public base classes, and ambiguous base classes.

    - Note that is_base_of<X,X> will always inherit from true_type. + Note that is_base_of<X,X> will always inherit from true_type. This is the case even if X is not a class type. This is a change in behaviour from Boost-1.33 in order to track the Technical Report on C++ Library Extensions. @@ -84,7 +83,7 @@

    is_base_of<Base, Derived> - inherits from true_type. + inherits from true_type.

    @@ -93,7 +92,7 @@

    - is_base_of<Base, Derived>::type is the type true_type. + is_base_of<Base, Derived>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_class.html b/doc/html/boost_typetraits/reference/is_class.html index 1ff1a73..dd78a3b 100644 --- a/doc/html/boost_typetraits/reference/is_class.html +++ b/doc/html/boost_typetraits/reference/is_class.html @@ -3,7 +3,7 @@ is_class - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_class : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_class : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - class type then inherits from true_type, - otherwise inherits from false_type. + class type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 9.2. @@ -46,9 +45,9 @@

    Compiler Compatibility: Without (some as yet unspecified) help from the compiler, we cannot distinguish between union - and class types, as a result this type will erroneously inherit from true_type for - union types. See also is_union. - Currently (May 2005) only Visual C++ 8 has the necessary compiler intrinsics + and class types, as a result this type will erroneously inherit from true_type for + union types. See also is_union. + Currently (May 2005) only Visual C++ 8 has the necessary compiler intrinsics to correctly identify union types, and therefore make is_class function correctly.

    @@ -68,7 +67,7 @@

    is_class<MyClass> - inherits from true_type. + inherits from true_type.

    @@ -78,7 +77,7 @@

    is_class<MyClass const>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_complex.html b/doc/html/boost_typetraits/reference/is_complex.html index ed12a67..2f1ace1 100644 --- a/doc/html/boost_typetraits/reference/is_complex.html +++ b/doc/html/boost_typetraits/reference/is_complex.html @@ -3,7 +3,7 @@ is_complex - + @@ -24,11 +24,10 @@
    -
    -template <class T>
    -struct is_complex : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_complex : public true_type-or-false_type {};
     

    Inherits: If T diff --git a/doc/html/boost_typetraits/reference/is_compound.html b/doc/html/boost_typetraits/reference/is_compound.html index f3ea85e..5e4faaf 100644 --- a/doc/html/boost_typetraits/reference/is_compound.html +++ b/doc/html/boost_typetraits/reference/is_compound.html @@ -3,7 +3,7 @@ is_compound - + @@ -24,17 +24,16 @@

    -
    -template <class T>
    -struct is_compound : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_compound : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - compound type then inherits from true_type, - otherwise inherits from false_type. - Any type that is not a fundamental type is a compound type (see also is_fundamental). + compound type then inherits from true_type, + otherwise inherits from false_type. + Any type that is not a fundamental type is a compound type (see also is_fundamental).

    C++ Standard Reference: 3.9.2. @@ -52,7 +51,7 @@

    is_compound<MyClass> - inherits from true_type. + inherits from true_type.

    @@ -61,7 +60,7 @@

    - is_compound<MyEnum>::type is the type true_type. + is_compound<MyEnum>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_const.html b/doc/html/boost_typetraits/reference/is_const.html index 955046e..d543c23 100644 --- a/doc/html/boost_typetraits/reference/is_const.html +++ b/doc/html/boost_typetraits/reference/is_const.html @@ -3,7 +3,7 @@ is_const - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_const : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_const : public true_type-or-false_type {};
     

    Inherits: If T is a (top level) const-qualified - type then inherits from true_type, - otherwise inherits from false_type. + type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.3. @@ -50,7 +49,7 @@

    - is_const<int const> inherits from true_type. + is_const<int const> inherits from true_type.

    @@ -59,7 +58,7 @@

    - is_const<int const volatile>::type is the type true_type. + is_const<int const volatile>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_convertible.html b/doc/html/boost_typetraits/reference/is_convertible.html index 8ec8162..0a89de1 100644 --- a/doc/html/boost_typetraits/reference/is_convertible.html +++ b/doc/html/boost_typetraits/reference/is_convertible.html @@ -3,7 +3,7 @@ is_convertible - + @@ -24,17 +24,16 @@
    -
    -template <class From, class To>
    -struct is_convertible : public true_type-or-false_type {};
    +
    template <class From, class To>
    +struct is_convertible : public true_type-or-false_type {};
     

    Inherits: If an imaginary lvalue of type From is convertible to type - To then inherits from true_type, - otherwise inherits from false_type. + To then inherits from true_type, + otherwise inherits from false_type.

    Type From must not be an incomplete type. @@ -59,8 +58,7 @@ This template will also produce compiler errors if the conversion is ambiguous, for example:

    -
    -struct A {};
    +
    struct A {};
     struct B : A {};
     struct C : A {};
     struct D : B, C {};
    @@ -74,7 +72,7 @@
             Compiler Compatibility: This template is
             currently broken with Borland C++ Builder 5 (and earlier), for constructor-based
             conversions, and for the Metrowerks 7 (and earlier) compiler in all cases.
    -        If the compiler does not support is_abstract,
    +        If the compiler does not support is_abstract,
             then the template parameter To
             must not be an abstract type.
           

    @@ -91,7 +89,7 @@

    is_convertible<int, double> - inherits from true_type. + inherits from true_type.

    @@ -101,7 +99,7 @@

    is_convertible<const int, double>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_empty.html b/doc/html/boost_typetraits/reference/is_empty.html index 8578511..d528b1c 100644 --- a/doc/html/boost_typetraits/reference/is_empty.html +++ b/doc/html/boost_typetraits/reference/is_empty.html @@ -3,7 +3,7 @@ is_empty - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_empty : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_empty : public true_type-or-false_type {};
     

    Inherits: If T is an empty class type then - inherits from true_type, - otherwise inherits from false_type. + inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 10p5. @@ -52,7 +51,7 @@ the compiler implementing zero sized empty base classes, or

  • - the compiler providing intrinsics + the compiler providing intrinsics to detect empty classes.
  • @@ -84,7 +83,7 @@

    is_empty<empty_class> - inherits from true_type. + inherits from true_type.

    @@ -94,7 +93,7 @@

    is_empty<empty_class const>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_enum.html b/doc/html/boost_typetraits/reference/is_enum.html index 858f94e..a4919b1 100644 --- a/doc/html/boost_typetraits/reference/is_enum.html +++ b/doc/html/boost_typetraits/reference/is_enum.html @@ -3,7 +3,7 @@ is_enum - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_enum : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_enum : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - enum type then inherits from true_type, - otherwise inherits from false_type. + enum type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 7.2. @@ -45,7 +44,7 @@

    Compiler Compatibility: Requires a correctly - functioning is_convertible + functioning is_convertible template; this means that is_enum is currently broken under Borland C++ Builder 5, and for the Metrowerks compiler prior to version 8, other compilers should handle this template just fine. @@ -68,7 +67,7 @@

    is_enum<my_enum> - inherits from true_type. + inherits from true_type.

    @@ -78,7 +77,7 @@

    is_enum<my_enum const>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_floating_point.html b/doc/html/boost_typetraits/reference/is_floating_point.html index 48069e7..fa5a303 100644 --- a/doc/html/boost_typetraits/reference/is_floating_point.html +++ b/doc/html/boost_typetraits/reference/is_floating_point.html @@ -3,7 +3,7 @@ is_floating_point - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_floating_point : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_floating_point : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - floating point type then inherits from true_type, - otherwise inherits from false_type. + floating point type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.1p8. @@ -51,7 +50,7 @@

    is_floating_point<float> - inherits from true_type. + inherits from true_type.

    @@ -60,7 +59,7 @@

    - is_floating_point<double>::type is the type true_type. + is_floating_point<double>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_function.html b/doc/html/boost_typetraits/reference/is_function.html index 0c2415a..c8f9f74 100644 --- a/doc/html/boost_typetraits/reference/is_function.html +++ b/doc/html/boost_typetraits/reference/is_function.html @@ -3,7 +3,7 @@ is_function - + @@ -24,21 +24,19 @@
    -
    -template <class T>
    -struct is_function : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_function : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - function type then inherits from true_type, - otherwise inherits from false_type. + function type then inherits from true_type, + otherwise inherits from false_type. Note that this template does not detect pointers to functions, - or references to functions, these are detected by is_pointer and is_reference respectively: + or references to functions, these are detected by is_pointer and is_reference respectively:

    -
    -typedef int f1();      // f1 is of function type.
    +
    typedef int f1();      // f1 is of function type.
     typedef int (f2*)();   // f2 is a pointer to a function.
     typedef int (f3&)();   // f3 is a reference to a function.
     
    @@ -58,7 +56,7 @@

    is_function<int (void)> - inherits from true_type. + inherits from true_type.

    @@ -67,7 +65,7 @@

    - is_function<long (double, int)>::type is the type true_type. + is_function<long (double, int)>::type is the type true_type.

    @@ -163,11 +161,11 @@ If you want to detect whether some type is a pointer-to-function then use:

    - is_function<remove_pointer<T>::type>::value - && is_pointer<T>::value + is_function<remove_pointer<T>::type>::value + && is_pointer<T>::value

    - or for pointers to member functions you can just use is_member_function_pointer + or for pointers to member functions you can just use is_member_function_pointer directly.

    diff --git a/doc/html/boost_typetraits/reference/is_fundamental.html b/doc/html/boost_typetraits/reference/is_fundamental.html index 8798f8f..3107b1c 100644 --- a/doc/html/boost_typetraits/reference/is_fundamental.html +++ b/doc/html/boost_typetraits/reference/is_fundamental.html @@ -3,7 +3,7 @@ is_fundamental - + @@ -24,20 +24,19 @@
    -
    -template <class T>
    -struct is_fundamental : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_fundamental : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - fundamental type then inherits from true_type, - otherwise inherits from false_type. + fundamental type then inherits from true_type, + otherwise inherits from false_type. Fundamental types include integral, floating point and void types (see also - is_integral, - is_floating_point - and is_void) + is_integral, + is_floating_point + and is_void)

    C++ Standard Reference: 3.9.1. @@ -55,7 +54,7 @@

    is_fundamental<int)> - inherits from true_type. + inherits from true_type.

    @@ -65,7 +64,7 @@

    is_fundamental<double const>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_integral.html b/doc/html/boost_typetraits/reference/is_integral.html index f7b3970..8a5f237 100644 --- a/doc/html/boost_typetraits/reference/is_integral.html +++ b/doc/html/boost_typetraits/reference/is_integral.html @@ -3,7 +3,7 @@ is_integral - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_integral : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_integral : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - integral type then inherits from true_type, - otherwise inherits from false_type. + integral type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.1p7. @@ -51,7 +50,7 @@

    is_integral<int> - inherits from true_type. + inherits from true_type.

    @@ -61,7 +60,7 @@

    is_integral<const char>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_member_function_pointer.html b/doc/html/boost_typetraits/reference/is_member_function_pointer.html index 287d907..27b52ff 100644 --- a/doc/html/boost_typetraits/reference/is_member_function_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_function_pointer.html @@ -3,7 +3,7 @@ is_member_function_pointer - + @@ -24,17 +24,16 @@
    -
    -template <class T>
    -struct is_member_function_pointer : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_member_function_pointer : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - pointer to a member function then inherits from true_type, - otherwise inherits from false_type. + pointer to a member function then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 8.3.3. @@ -51,7 +50,7 @@

    - is_member_function_pointer<int (MyClass::*)(void)> inherits from true_type. + is_member_function_pointer<int (MyClass::*)(void)> inherits from true_type.

    @@ -61,7 +60,7 @@

    is_member_function_pointer<int (MyClass::*)(char)>::type - is the type true_type. + is the type true_type.

    @@ -83,8 +82,8 @@ is_member_function_pointer<int (MyClass::*)>::value is an integral constant expression that evaluates to false: the argument in this case is a pointer to a data member and not a member - function, see is_member_object_pointer - and is_member_pointer + function, see is_member_object_pointer + and is_member_pointer

    diff --git a/doc/html/boost_typetraits/reference/is_member_object_pointer.html b/doc/html/boost_typetraits/reference/is_member_object_pointer.html index c95ff36..7fbb1e6 100644 --- a/doc/html/boost_typetraits/reference/is_member_object_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_object_pointer.html @@ -3,7 +3,7 @@ is_member_object_pointer - + @@ -24,17 +24,16 @@
    -
    -template <class T>
    -struct is_member_object_pointer : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_member_object_pointer : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - pointer to a member object (a data member) then inherits from true_type, - otherwise inherits from false_type. + pointer to a member object (a data member) then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 8.3.3. @@ -51,7 +50,7 @@

    - is_member_object_pointer<int (MyClass::*)> inherits from true_type. + is_member_object_pointer<int (MyClass::*)> inherits from true_type.

    @@ -61,7 +60,7 @@

    is_member_object_pointer<double (MyClass::*)>::type - is the type true_type. + is the type true_type.

    @@ -83,8 +82,8 @@ is_member_object_pointer<int (MyClass::*)(void)>::value is an integral constant expression that evaluates to false: the argument in this case is a pointer to a member function and not a - member object, see is_member_function_pointer - and is_member_pointer + member object, see is_member_function_pointer + and is_member_pointer

    diff --git a/doc/html/boost_typetraits/reference/is_member_pointer.html b/doc/html/boost_typetraits/reference/is_member_pointer.html index fb3a329..2b05ea4 100644 --- a/doc/html/boost_typetraits/reference/is_member_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_pointer.html @@ -3,7 +3,7 @@ is_member_pointer - + @@ -24,17 +24,16 @@
    -
    -template <class T>
    -struct is_member_pointer : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_member_pointer : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) pointer to a member (either a function or a data member) then inherits from - true_type, - otherwise inherits from false_type. + true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 8.3.3. @@ -52,7 +51,7 @@

    is_member_pointer<int (MyClass::*)> - inherits from true_type. + inherits from true_type.

    @@ -61,7 +60,7 @@

    - is_member_pointer<int (MyClass::*)(char)>::type is the type true_type. + is_member_pointer<int (MyClass::*)(char)>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_object.html b/doc/html/boost_typetraits/reference/is_object.html index 1d047c4..93cb157 100644 --- a/doc/html/boost_typetraits/reference/is_object.html +++ b/doc/html/boost_typetraits/reference/is_object.html @@ -3,7 +3,7 @@ is_object - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_object : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_object : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - object type then inherits from true_type, - otherwise inherits from false_type. + object type then inherits from true_type, + otherwise inherits from false_type. All types are object types except references, void, and function types.

    @@ -52,7 +51,7 @@

    is_object<int> - inherits from true_type. + inherits from true_type.

    @@ -61,7 +60,7 @@

    - is_object<int*>::type is the type true_type. + is_object<int*>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_pod.html b/doc/html/boost_typetraits/reference/is_pod.html index 7bb57d6..d849d18 100644 --- a/doc/html/boost_typetraits/reference/is_pod.html +++ b/doc/html/boost_typetraits/reference/is_pod.html @@ -3,7 +3,7 @@ is_pod - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_pod : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_pod : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - POD type then inherits from true_type, - otherwise inherits from false_type. + POD type then inherits from true_type, + otherwise inherits from false_type.

    POD stands for "Plain old data". Arithmetic types, and enumeration @@ -72,7 +71,7 @@

    is_pod<int> - inherits from true_type. + inherits from true_type.

    @@ -81,7 +80,7 @@

    - is_pod<char*>::type is the type true_type. + is_pod<char*>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_pointer.html b/doc/html/boost_typetraits/reference/is_pointer.html index bfc5b0d..20c9967 100644 --- a/doc/html/boost_typetraits/reference/is_pointer.html +++ b/doc/html/boost_typetraits/reference/is_pointer.html @@ -3,7 +3,7 @@ is_pointer - + @@ -24,17 +24,16 @@
    -
    -template <class T>
    -struct is_pointer : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_pointer : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) pointer type (includes function pointers, but excludes pointers to members) - then inherits from true_type, - otherwise inherits from false_type. + then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2p2 and 8.3.1. @@ -52,7 +51,7 @@

    is_pointer<int*> - inherits from true_type. + inherits from true_type.

    @@ -61,7 +60,7 @@

    - is_pointer<char* const>::type is the type true_type. + is_pointer<char* const>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_polymorphic.html b/doc/html/boost_typetraits/reference/is_polymorphic.html index 377e12f..851df16 100644 --- a/doc/html/boost_typetraits/reference/is_polymorphic.html +++ b/doc/html/boost_typetraits/reference/is_polymorphic.html @@ -3,7 +3,7 @@ is_polymorphic - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_polymorphic : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_polymorphic : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - polymorphic type then inherits from true_type, - otherwise inherits from false_type. + polymorphic type then inherits from true_type, + otherwise inherits from false_type. Type T must be a complete type.

    @@ -67,7 +66,7 @@

    is_polymorphic<poly> - inherits from true_type. + inherits from true_type.

    @@ -77,7 +76,7 @@

    is_polymorphic<poly const>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_reference.html b/doc/html/boost_typetraits/reference/is_reference.html index 08d2f35..269c200 100644 --- a/doc/html/boost_typetraits/reference/is_reference.html +++ b/doc/html/boost_typetraits/reference/is_reference.html @@ -3,7 +3,7 @@ is_reference - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_reference : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_reference : public true_type-or-false_type {};
     

    Inherits: If T is a reference pointer type - then inherits from true_type, - otherwise inherits from false_type. + then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 8.3.2. @@ -57,7 +56,7 @@

    is_reference<int&> - inherits from true_type. + inherits from true_type.

    @@ -67,7 +66,7 @@

    is_reference<int const&>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_same.html b/doc/html/boost_typetraits/reference/is_same.html index e532d42..5287f7d 100644 --- a/doc/html/boost_typetraits/reference/is_same.html +++ b/doc/html/boost_typetraits/reference/is_same.html @@ -3,7 +3,7 @@ is_same - + @@ -24,16 +24,15 @@
    -
    -template <class T, class U>
    -struct is_same : public true_type-or-false_type {};
    +
    template <class T, class U>
    +struct is_same : public true_type-or-false_type {};
     

    Inherits: If T and U are the same types - then inherits from true_type, - otherwise inherits from false_type. + then inherits from true_type, + otherwise inherits from false_type.

    Header: #include @@ -53,7 +52,7 @@

    is_same<int, int> - inherits from true_type. + inherits from true_type.

    @@ -62,7 +61,7 @@

    - is_same<int, int>::type is the type true_type. + is_same<int, int>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_scalar.html b/doc/html/boost_typetraits/reference/is_scalar.html index 46cc185..73f94bf 100644 --- a/doc/html/boost_typetraits/reference/is_scalar.html +++ b/doc/html/boost_typetraits/reference/is_scalar.html @@ -3,7 +3,7 @@ is_scalar - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_scalar : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_scalar : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - scalar type then inherits from true_type, - otherwise inherits from false_type. + scalar type then inherits from true_type, + otherwise inherits from false_type. Scalar types include integral, floating point, enumeration, pointer, and pointer-to-member types.

    @@ -58,7 +57,7 @@

    is_scalar<int*> - inherits from true_type. + inherits from true_type.

    @@ -67,7 +66,7 @@

    - is_scalar<int>::type is the type true_type. + is_scalar<int>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_signed.html b/doc/html/boost_typetraits/reference/is_signed.html index be4c5df..1d7eca7 100644 --- a/doc/html/boost_typetraits/reference/is_signed.html +++ b/doc/html/boost_typetraits/reference/is_signed.html @@ -3,7 +3,7 @@ is_signed - + @@ -24,17 +24,16 @@
    -
    -template <class T>
    -struct is_signed : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_signed : public true_type-or-false_type {};
     

    Inherits: If T is an signed integer type or an enumerated type with an underlying signed integer type, then inherits - from true_type, - otherwise inherits from false_type. + from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.1, 7.2. @@ -52,7 +51,7 @@

    is_signed<int> - inherits from true_type. + inherits from true_type.

    @@ -61,7 +60,7 @@

    - is_signed<int const volatile>::type is the type true_type. + is_signed<int const volatile>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_stateless.html b/doc/html/boost_typetraits/reference/is_stateless.html index cb8dadd..e2977f8 100644 --- a/doc/html/boost_typetraits/reference/is_stateless.html +++ b/doc/html/boost_typetraits/reference/is_stateless.html @@ -3,7 +3,7 @@ is_stateless - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_stateless : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_stateless : public true_type-or-false_type {};
     

    Inherits: Ff T is a stateless type then - inherits from true_type, - otherwise from false_type. + inherits from true_type, + otherwise from false_type.

    Type T must be a complete type. @@ -41,11 +40,10 @@

    A stateless type is a type that has no storage and whose constructors and destructors are trivial. That means that is_stateless - only inherits from true_type + only inherits from true_type if the following expression is true:

    -
    -::boost::has_trivial_constructor<T>::value
    +
    ::boost::has_trivial_constructor<T>::value
     && ::boost::has_trivial_copy<T>::value
     && ::boost::has_trivial_destructor<T>::value
     && ::boost::is_class<T>::value
    @@ -68,7 +66,7 @@
             Without some (as yet unspecified) help from the compiler, is_stateless will
             never report that a class or struct is stateless; this is always safe, if
             possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have
    -        the necessary compiler intrinsics
    +        the necessary compiler intrinsics
             to make this template work automatically.
           

    diff --git a/doc/html/boost_typetraits/reference/is_union.html b/doc/html/boost_typetraits/reference/is_union.html index 2efaaac..8e138d5 100644 --- a/doc/html/boost_typetraits/reference/is_union.html +++ b/doc/html/boost_typetraits/reference/is_union.html @@ -3,7 +3,7 @@ is_union - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_union : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_union : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - union type then inherits from true_type, - otherwise inherits from false_type. + union type then inherits from true_type, + otherwise inherits from false_type. Currently requires some kind of compiler support, otherwise unions are identified as classes.

    @@ -44,11 +43,11 @@ Compiler Compatibility: Without (some as yet unspecified) help from the compiler, we cannot distinguish between union and class types using only standard C++, as a result this type will never - inherit from true_type, + inherit from true_type, unless the user explicitly specializes the template for their user-defined union types, or unless the compiler supplies some unspecified intrinsic that implements this functionality. Currently (May 2005) only Visual C++ 8 has - the necessary compiler intrinsics + the necessary compiler intrinsics to make this trait "just work" without user intervention.

    @@ -64,7 +63,7 @@

    is_union<void> - inherits from true_type. + inherits from true_type.

    @@ -74,7 +73,7 @@

    is_union<const void>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_unsigned.html b/doc/html/boost_typetraits/reference/is_unsigned.html index 580243d..90fd7e8 100644 --- a/doc/html/boost_typetraits/reference/is_unsigned.html +++ b/doc/html/boost_typetraits/reference/is_unsigned.html @@ -3,7 +3,7 @@ is_unsigned - + @@ -24,17 +24,16 @@
    -
    -template <class T>
    -struct is_unsigned : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_unsigned : public true_type-or-false_type {};
     

    Inherits: If T is an unsigned integer type or an enumerated type with an underlying unsigned integer type, then inherits - from true_type, - otherwise inherits from false_type. + from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.1, 7.2. @@ -51,7 +50,7 @@

    - is_unsigned<unsigned int> inherits from true_type. + is_unsigned<unsigned int> inherits from true_type.

    @@ -62,7 +61,7 @@

    is_unsigned<unsigned int const volatile>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_void.html b/doc/html/boost_typetraits/reference/is_void.html index 722f0f3..dd8be37 100644 --- a/doc/html/boost_typetraits/reference/is_void.html +++ b/doc/html/boost_typetraits/reference/is_void.html @@ -3,7 +3,7 @@ is_void - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_void : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_void : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - void type then inherits from true_type, - otherwise inherits from false_type. + void type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.1p9. @@ -51,7 +50,7 @@

    is_void<void> - inherits from true_type. + inherits from true_type.

    @@ -61,7 +60,7 @@

    is_void<const void>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_volatile.html b/doc/html/boost_typetraits/reference/is_volatile.html index c75c8c0..3c9e428 100644 --- a/doc/html/boost_typetraits/reference/is_volatile.html +++ b/doc/html/boost_typetraits/reference/is_volatile.html @@ -3,7 +3,7 @@ is_volatile - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_volatile : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_volatile : public true_type-or-false_type {};
     

    Inherits: If T is a (top level) volatile-qualified - type then inherits from true_type, - otherwise inherits from false_type. + type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.3. @@ -50,7 +49,7 @@

    - is_volatile<volatile int> inherits from true_type. + is_volatile<volatile int> inherits from true_type.

    @@ -60,7 +59,7 @@

    is_volatile<const volatile - int>::type is the type true_type. + int>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/make_signed.html b/doc/html/boost_typetraits/reference/make_signed.html index 94f2f40..b4ed1a4 100644 --- a/doc/html/boost_typetraits/reference/make_signed.html +++ b/doc/html/boost_typetraits/reference/make_signed.html @@ -3,7 +3,7 @@ make_signed - + @@ -24,10 +24,9 @@
    -
    -template <class T>
    +
    template <class T>
     struct make_signed
     {
        typedef see-below type;
    @@ -55,7 +54,7 @@
             or  #include <boost/type_traits.hpp>
           

    -

    Table 1.15. Examples

    +

    Table 1.15. Examples

    diff --git a/doc/html/boost_typetraits/reference/make_unsigned.html b/doc/html/boost_typetraits/reference/make_unsigned.html index d09b5ad..61f868f 100644 --- a/doc/html/boost_typetraits/reference/make_unsigned.html +++ b/doc/html/boost_typetraits/reference/make_unsigned.html @@ -3,7 +3,7 @@ make_unsigned - + @@ -24,10 +24,9 @@
    -
    -template <class T>
    +
    template <class T>
     struct make_unsigned
     {
        typedef see-below type;
    @@ -55,7 +54,7 @@
             or  #include <boost/type_traits.hpp>
           

    -

    Table 1.16. Examples

    +

    Table 1.16. Examples

    diff --git a/doc/html/boost_typetraits/reference/promote.html b/doc/html/boost_typetraits/reference/promote.html index 336d945..03d1949 100644 --- a/doc/html/boost_typetraits/reference/promote.html +++ b/doc/html/boost_typetraits/reference/promote.html @@ -3,7 +3,7 @@ promote - + @@ -24,10 +24,9 @@
    -
    -template <class T>
    +
    template <class T>
     struct promote
     {
        typedef see-below type;
    @@ -39,8 +38,8 @@
             then applies integral and floating point promotions to T
             and keeps cv-qualifiers of T,
             otherwise leaves T unchanged.
    -        See also integral_promotion
    -        and floating_point_promotion.
    +        See also integral_promotion
    +        and floating_point_promotion.
           

    C++ Standard Reference: 4.5 except 4.5/3 @@ -52,7 +51,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.17. Examples

    +

    Table 1.17. Examples

    diff --git a/doc/html/boost_typetraits/reference/rank.html b/doc/html/boost_typetraits/reference/rank.html index 35b8c76..834e0fa 100644 --- a/doc/html/boost_typetraits/reference/rank.html +++ b/doc/html/boost_typetraits/reference/rank.html @@ -3,7 +3,7 @@ rank - + @@ -24,15 +24,14 @@
    -
    -template <class T>
    -struct rank : public integral_constant<std::size_t, RANK(T)> {};
    +
    template <class T>
    +struct rank : public integral_constant<std::size_t, RANK(T)> {};
     

    Inherits: Class template rank inherits from - integral_constant<std::size_t, RANK(T)>, + integral_constant<std::size_t, RANK(T)>, where RANK(T) is the number of array dimensions in type T.

    @@ -53,7 +52,7 @@

    rank<int[]> - inherits from integral_constant<std::size_t, 1>. + inherits from integral_constant<std::size_t, 1>.

    @@ -62,7 +61,7 @@

    - rank<double[2][3][4]>::type is the type integral_constant<std::size_t, 3>. + rank<double[2][3][4]>::type is the type integral_constant<std::size_t, 3>.

    diff --git a/doc/html/boost_typetraits/reference/remove_all_extents.html b/doc/html/boost_typetraits/reference/remove_all_extents.html index 1bfedda..9b991a5 100644 --- a/doc/html/boost_typetraits/reference/remove_all_extents.html +++ b/doc/html/boost_typetraits/reference/remove_all_extents.html @@ -3,7 +3,7 @@ remove_all_extents - + @@ -24,10 +24,9 @@
    -
    -template <class T>
    +
    template <class T>
     struct remove_all_extents
     {
        typedef see-below type;
    @@ -46,7 +45,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -55,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.18. Examples

    +

    Table 1.18. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_const.html b/doc/html/boost_typetraits/reference/remove_const.html index 32a7810..bcc8351 100644 --- a/doc/html/boost_typetraits/reference/remove_const.html +++ b/doc/html/boost_typetraits/reference/remove_const.html @@ -3,7 +3,7 @@ remove_const - + @@ -24,10 +24,9 @@
    -
    -template <class T>
    +
    template <class T>
     struct remove_const
     {
        typedef see-below type;
    @@ -45,7 +44,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -54,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.19. Examples

    +

    Table 1.19. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_cv.html b/doc/html/boost_typetraits/reference/remove_cv.html index 02cfc60..ca269a2 100644 --- a/doc/html/boost_typetraits/reference/remove_cv.html +++ b/doc/html/boost_typetraits/reference/remove_cv.html @@ -3,7 +3,7 @@ remove_cv - + @@ -24,10 +24,9 @@
    -
    -template <class T>
    +
    template <class T>
     struct remove_cv
     {
        typedef see-below type;
    @@ -45,7 +44,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -54,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.20. Examples

    +

    Table 1.20. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_extent.html b/doc/html/boost_typetraits/reference/remove_extent.html index 63136c2..88e9817 100644 --- a/doc/html/boost_typetraits/reference/remove_extent.html +++ b/doc/html/boost_typetraits/reference/remove_extent.html @@ -3,7 +3,7 @@ remove_extent - + @@ -24,10 +24,9 @@
    -
    -template <class T>
    +
    template <class T>
     struct remove_extent
     {
        typedef see-below type;
    @@ -46,7 +45,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -55,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.21. Examples

    +

    Table 1.21. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_pointer.html b/doc/html/boost_typetraits/reference/remove_pointer.html index 6086af8..ed48364 100644 --- a/doc/html/boost_typetraits/reference/remove_pointer.html +++ b/doc/html/boost_typetraits/reference/remove_pointer.html @@ -3,7 +3,7 @@ remove_pointer - + @@ -24,10 +24,9 @@
    -
    -template <class T>
    +
    template <class T>
     struct remove_pointer
     {
        typedef see-below type;
    @@ -45,7 +44,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -54,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.22. Examples

    +

    Table 1.22. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_reference.html b/doc/html/boost_typetraits/reference/remove_reference.html index 0e4feba..7983aff 100644 --- a/doc/html/boost_typetraits/reference/remove_reference.html +++ b/doc/html/boost_typetraits/reference/remove_reference.html @@ -3,7 +3,7 @@ remove_reference - + @@ -24,10 +24,9 @@
    -
    -template <class T>
    +
    template <class T>
     struct remove_reference
     {
        typedef see-below type;
    @@ -45,7 +44,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -54,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.23. Examples

    +

    Table 1.23. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_volatile.html b/doc/html/boost_typetraits/reference/remove_volatile.html index 19ac843..983b48b 100644 --- a/doc/html/boost_typetraits/reference/remove_volatile.html +++ b/doc/html/boost_typetraits/reference/remove_volatile.html @@ -3,7 +3,7 @@ remove_volatile - + @@ -24,10 +24,9 @@
    -
    -template <class T>
    +
    template <class T>
     struct remove_volatile
     {
        typedef see-below type;
    @@ -45,7 +44,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -54,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.24. Examples

    +

    Table 1.24. Examples

    diff --git a/doc/html/boost_typetraits/reference/type_with_alignment.html b/doc/html/boost_typetraits/reference/type_with_alignment.html index 3e0068c..d589e9e 100644 --- a/doc/html/boost_typetraits/reference/type_with_alignment.html +++ b/doc/html/boost_typetraits/reference/type_with_alignment.html @@ -3,7 +3,7 @@ type_with_alignment - + @@ -24,10 +24,9 @@
    -
    -template <std::size_t Align>
    +
    template <std::size_t Align>
     struct type_with_alignment
     {
        typedef see-below type;
    diff --git a/doc/html/boost_typetraits/user_defined.html b/doc/html/boost_typetraits/user_defined.html
    index 6a03356..86abd4c 100644
    --- a/doc/html/boost_typetraits/user_defined.html
    +++ b/doc/html/boost_typetraits/user_defined.html
    @@ -3,7 +3,7 @@
     
     User Defined Specializations
     
    -
    +
     
     
     
    @@ -24,18 +24,17 @@
     

    Occationally the end user may need to provide their own specialization for one of the type traits - typically where intrinsic compiler support is required to implement a specific trait fully. These specializations should derive from - boost::true_type - or boost::false_type + boost::true_type + or boost::false_type as appropriate:

    -
    -#include <boost/type_traits/is_pod.hpp>
    +
    #include <boost/type_traits/is_pod.hpp>
     #include <boost/type_traits/is_class.hpp>
     #include <boost/type_traits/is_union.hpp>
     
    @@ -49,16 +48,16 @@
     namespace boost
     {
        template<>
    -   struct is_pod<my_pod> : public true_type{};
    +   struct is_pod<my_pod> : public true_type{};
           
        template<>
    -   struct is_pod<my_union> : public true_type{};
    +   struct is_pod<my_union> : public true_type{};
        
        template<>
    -   struct is_union<my_union> : public true_type{};
    +   struct is_union<my_union> : public true_type{};
        
        template<>
    -   struct is_class<my_union> : public false_type{};
    +   struct is_class<my_union> : public false_type{};
     }
     
    diff --git a/doc/html/index.html b/doc/html/index.html index 35dbeaa..1d99708 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -3,7 +3,7 @@ Chapter 1. Boost.TypeTraits - + @@ -30,7 +30,7 @@ Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert Ramey and Jeremy Siek

    -

    +

    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)

    @@ -161,7 +161,7 @@

    - +

    Last revised: November 08, 2007 at 09:38:22 +0000

    Last revised: February 21, 2008 at 13:51:18 +0000


    diff --git a/doc/intrinsics.qbk b/doc/intrinsics.qbk index d8a0734..4432772 100644 --- a/doc/intrinsics.qbk +++ b/doc/intrinsics.qbk @@ -9,7 +9,8 @@ There are some traits that can not be implemented within the current C++ language: to make these traits "just work" with user defined types, some kind of additional -help from the compiler is required. Currently (May 2005) MWCW 9 and Visual C++ 8 +help from the compiler is required. Currently (April 2008) Visual C++ 8 and 9, +GNU GCC 4.3 and MWCW 9 provide the necessary intrinsics, and other compilers will no doubt follow in due course. diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index a8cde36..6c285bf 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -39,6 +39,7 @@ // BOOST_IS_ABSTRACT(T) true if T is an abstract type // BOOST_IS_BASE_OF(T,U) true if T is a base class of U // BOOST_IS_CLASS(T) true if T is a class type +// BOOST_IS_CONVERTIBLE(T,U) true if T is convertible to U // BOOST_IS_ENUM(T) true is T is an enum // BOOST_IS_POLYMORPHIC(T) true if T is a polymorphic type @@ -81,6 +82,8 @@ #endif #if defined(BOOST_MSVC) && defined(_MSC_FULL_VER) && (_MSC_FULL_VER >=140050215) +# include + # define BOOST_IS_UNION(T) __is_union(T) # define BOOST_IS_POD(T) (__is_pod(T) && __has_trivial_constructor(T)) # define BOOST_IS_EMPTY(T) __is_empty(T) @@ -92,6 +95,16 @@ # define BOOST_HAS_NOTHROW_COPY(T) __has_nothrow_copy(T) # define BOOST_HAS_NOTHROW_ASSIGN(T) __has_nothrow_assign(T) # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# define BOOST_IS_CLASS(T) __is_class(T) +// This one doesn't quite always do the right thing: +// # define BOOST_IS_CONVERTIBLE(T,U) __is_convertible_to(T,U) +# define BOOST_IS_ENUM(T) __is_enum(T) +// This one doesn't quite always do the right thing: +// # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) + # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif @@ -133,6 +146,8 @@ # define BOOST_IS_CLASS(T) __is_class(T) # define BOOST_IS_ENUM(T) __is_enum(T) # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif #ifndef BOOST_IS_UNION diff --git a/include/boost/type_traits/is_convertible.hpp b/include/boost/type_traits/is_convertible.hpp index 10309ca..6652199 100644 --- a/include/boost/type_traits/is_convertible.hpp +++ b/include/boost/type_traits/is_convertible.hpp @@ -12,6 +12,8 @@ #ifndef BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED #define BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED +#include +#ifndef BOOST_IS_CONVERTIBLE #include #include #include @@ -28,11 +30,15 @@ #include #endif +#endif // BOOST_IS_CONVERTIBLE + // should be always the last #include directive #include namespace boost { +#ifndef BOOST_IS_CONVERTIBLE + // is one type convertable to another? // // there are multiple versions of the is_convertible @@ -411,6 +417,12 @@ BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,v BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,(::boost::detail::is_convertible_impl_dispatch::value)) +#else + +BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,BOOST_IS_CONVERTIBLE(From,To)) + +#endif + } // namespace boost #include From aaefead804ab8aed214e7dc64430841e17d62bed Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 9 Apr 2008 15:21:03 +0000 Subject: [PATCH 14/92] Fix bug report #1797. [SVN r44126] --- doc/function_traits.qbk | 12 +++++----- doc/html/boost_typetraits/background.html | 22 +++++++++---------- .../boost_typetraits/category/transform.html | 2 +- doc/html/boost_typetraits/intrinsics.html | 2 +- .../boost_typetraits/reference/add_const.html | 2 +- .../boost_typetraits/reference/add_cv.html | 2 +- .../reference/add_pointer.html | 2 +- .../reference/add_reference.html | 2 +- .../reference/add_volatile.html | 2 +- .../boost_typetraits/reference/decay.html | 2 +- .../reference/floating_point_promotion.html | 2 +- .../reference/function_traits.html | 18 +++++++-------- .../reference/integral_promotion.html | 2 +- .../reference/make_signed.html | 2 +- .../reference/make_unsigned.html | 2 +- .../boost_typetraits/reference/promote.html | 2 +- .../reference/remove_all_extents.html | 2 +- .../reference/remove_const.html | 2 +- .../boost_typetraits/reference/remove_cv.html | 2 +- .../reference/remove_extent.html | 2 +- .../reference/remove_pointer.html | 2 +- .../reference/remove_reference.html | 2 +- .../reference/remove_volatile.html | 2 +- doc/html/index.html | 2 +- 24 files changed, 47 insertions(+), 47 deletions(-) diff --git a/doc/function_traits.qbk b/doc/function_traits.qbk index 2403d0c..1d2b364 100644 --- a/doc/function_traits.qbk +++ b/doc/function_traits.qbk @@ -8,7 +8,7 @@ [section:function_traits function_traits] [def __argN '''argN_type'''] - template + template struct function_traits { static const std::size_t arity = __below; @@ -19,7 +19,7 @@ The class template function_traits will only compile if: * The compiler supports partial specialization of class templates. -* The template argument `T` is a /function type/, note that this ['[*is not]] +* The template argument `F` is a /function type/, note that this ['[*is not]] the same thing as a /pointer to a function/. [tip @@ -30,11 +30,11 @@ type use __remove_pointer.] [table Function Traits Members [[Member] [Description]] -[[`function_traits::arity`] +[[`function_traits::arity`] [An integral constant expression that gives the number of arguments accepted by the function type `F`.]] -[[`function_traits::result_type`] +[[`function_traits::result_type`] [The type returned by function type `F`.]] -[[`function_traits::__argN`] +[[`function_traits::__argN`] [The '''Nth''' argument type of function type `F`, where `1 <= N <= arity` of `F`.]] ] @@ -47,7 +47,7 @@ type use __remove_pointer.] [[`function_traits::result_type`] [The type `long`.]] [[`function_traits::arg1_type`] [The type `int`.]] [[`function_traits::arg4_type`] [The type `void*`.]] -[[`function_traits::arg5_type`] [A compiler error: there is no `arg4_type` since there are only three arguments.]] +[[`function_traits::arg5_type`] [A compiler error: there is no `arg5_type` since there are only four arguments.]] [[`function_traits::arity`] [A compiler error: argument type is a /function pointer/, and not a /function type/.]] ] diff --git a/doc/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index b17d516..c997f66 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -56,7 +56,7 @@ method available to them.

    - + Type Traits

    @@ -84,7 +84,7 @@ given.

    - + Implementation

    @@ -174,7 +174,7 @@ in the default template.

    - + Optimized copy

    @@ -247,7 +247,7 @@ otherwise it will call the "slow but safe version".

    - + Was it worth it?

    @@ -280,7 +280,7 @@

    -

    Table 1.1. Time taken to copy 1000 elements using `copy<const +

    Table 1.1. Time taken to copy 1000 elements using `copy<const T*, T*>` (times in micro-seconds)

    @@ -379,7 +379,7 @@

    - + Pair of References

    @@ -416,7 +416,7 @@ to hold non-reference types, references, and constant references:

    -

    Table 1.2. Required Constructor Argument Types

    +

    Table 1.2. Required Constructor Argument Types

    @@ -481,7 +481,7 @@ adds a reference to its type, unless it is already a reference.

    -

    Table 1.3. Using add_reference to synthesize the correct constructor +

    Table 1.3. Using add_reference to synthesize the correct constructor type

    @@ -598,7 +598,7 @@ easier to maintain and easier to understand.

    - + Conclusion

    @@ -611,7 +611,7 @@ can be optimal as well as generic.

    - + Acknowledgements

    @@ -619,7 +619,7 @@ comments when preparing this article.

    - + References
      diff --git a/doc/html/boost_typetraits/category/transform.html b/doc/html/boost_typetraits/category/transform.html index 136a7fa..9435034 100644 --- a/doc/html/boost_typetraits/category/transform.html +++ b/doc/html/boost_typetraits/category/transform.html @@ -91,7 +91,7 @@ struct remove_volatile;
      - + Broken Compiler Workarounds:
      diff --git a/doc/html/boost_typetraits/intrinsics.html b/doc/html/boost_typetraits/intrinsics.html index 93cd2a3..5445124 100644 --- a/doc/html/boost_typetraits/intrinsics.html +++ b/doc/html/boost_typetraits/intrinsics.html @@ -71,7 +71,7 @@ of the following macros:

      -

      Table 1.4. Macros for Compiler Intrinsics

      +

      Table 1.4. Macros for Compiler Intrinsics

    diff --git a/doc/html/boost_typetraits/reference/add_const.html b/doc/html/boost_typetraits/reference/add_const.html index fb7bf4e..88c7d52 100644 --- a/doc/html/boost_typetraits/reference/add_const.html +++ b/doc/html/boost_typetraits/reference/add_const.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.5. Examples

    +

    Table 1.5. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_cv.html b/doc/html/boost_typetraits/reference/add_cv.html index dd8a994..14aa5ba 100644 --- a/doc/html/boost_typetraits/reference/add_cv.html +++ b/doc/html/boost_typetraits/reference/add_cv.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.6. Examples

    +

    Table 1.6. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_pointer.html b/doc/html/boost_typetraits/reference/add_pointer.html index f018df8..a12dafc 100644 --- a/doc/html/boost_typetraits/reference/add_pointer.html +++ b/doc/html/boost_typetraits/reference/add_pointer.html @@ -56,7 +56,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.7. Examples

    +

    Table 1.7. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_reference.html b/doc/html/boost_typetraits/reference/add_reference.html index 2ee1c13..7c41f87 100644 --- a/doc/html/boost_typetraits/reference/add_reference.html +++ b/doc/html/boost_typetraits/reference/add_reference.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.8. Examples

    +

    Table 1.8. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_volatile.html b/doc/html/boost_typetraits/reference/add_volatile.html index e31cb1a..7671f29 100644 --- a/doc/html/boost_typetraits/reference/add_volatile.html +++ b/doc/html/boost_typetraits/reference/add_volatile.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.9. Examples

    +

    Table 1.9. Examples

    diff --git a/doc/html/boost_typetraits/reference/decay.html b/doc/html/boost_typetraits/reference/decay.html index 73853be..7e05ace 100644 --- a/doc/html/boost_typetraits/reference/decay.html +++ b/doc/html/boost_typetraits/reference/decay.html @@ -48,7 +48,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.10. Examples

    +

    Table 1.10. Examples

    diff --git a/doc/html/boost_typetraits/reference/floating_point_promotion.html b/doc/html/boost_typetraits/reference/floating_point_promotion.html index 3cd3f2a..5abf23a 100644 --- a/doc/html/boost_typetraits/reference/floating_point_promotion.html +++ b/doc/html/boost_typetraits/reference/floating_point_promotion.html @@ -49,7 +49,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.11. Examples

    +

    Table 1.11. Examples

    diff --git a/doc/html/boost_typetraits/reference/function_traits.html b/doc/html/boost_typetraits/reference/function_traits.html index 7b0a8be..e8f50ec 100644 --- a/doc/html/boost_typetraits/reference/function_traits.html +++ b/doc/html/boost_typetraits/reference/function_traits.html @@ -26,7 +26,7 @@ -
    template <class T>
    +
    template <class F>
     struct function_traits
     {
        static const std::size_t    arity = see-below;
    @@ -42,7 +42,7 @@
               The compiler supports partial specialization of class templates.
             
     
  • - The template argument T + The template argument F is a function type, note that this is not the same thing as a pointer to a function.
  • @@ -59,7 +59,7 @@

    -

    Table 1.12. Function Traits Members

    +

    Table 1.12. Function Traits Members

    @@ -81,7 +81,7 @@

    - function_traits<T>::arity + function_traits<F>::arity

    @@ -94,7 +94,7 @@

    - function_traits<T>::result_type + function_traits<F>::result_type

    @@ -106,7 +106,7 @@

    - function_traits<T>::argN_type + function_traits<F>::argN_type

    @@ -122,7 +122,7 @@

    -

    Table 1.13. Examples

    +

    Table 1.13. Examples

    @@ -233,8 +233,8 @@ diff --git a/doc/html/boost_typetraits/reference/integral_promotion.html b/doc/html/boost_typetraits/reference/integral_promotion.html index 75d798d..d3b7dbe 100644 --- a/doc/html/boost_typetraits/reference/integral_promotion.html +++ b/doc/html/boost_typetraits/reference/integral_promotion.html @@ -49,7 +49,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.14. Examples

    +

    Table 1.14. Examples

    - A compiler error: there is no arg4_type - since there are only three arguments. + A compiler error: there is no arg5_type + since there are only four arguments.

    diff --git a/doc/html/boost_typetraits/reference/make_signed.html b/doc/html/boost_typetraits/reference/make_signed.html index b4ed1a4..361ae54 100644 --- a/doc/html/boost_typetraits/reference/make_signed.html +++ b/doc/html/boost_typetraits/reference/make_signed.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.15. Examples

    +

    Table 1.15. Examples

    diff --git a/doc/html/boost_typetraits/reference/make_unsigned.html b/doc/html/boost_typetraits/reference/make_unsigned.html index 61f868f..bf70792 100644 --- a/doc/html/boost_typetraits/reference/make_unsigned.html +++ b/doc/html/boost_typetraits/reference/make_unsigned.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.16. Examples

    +

    Table 1.16. Examples

    diff --git a/doc/html/boost_typetraits/reference/promote.html b/doc/html/boost_typetraits/reference/promote.html index 03d1949..08d606f 100644 --- a/doc/html/boost_typetraits/reference/promote.html +++ b/doc/html/boost_typetraits/reference/promote.html @@ -51,7 +51,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.17. Examples

    +

    Table 1.17. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_all_extents.html b/doc/html/boost_typetraits/reference/remove_all_extents.html index 9b991a5..7a51af8 100644 --- a/doc/html/boost_typetraits/reference/remove_all_extents.html +++ b/doc/html/boost_typetraits/reference/remove_all_extents.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.18. Examples

    +

    Table 1.18. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_const.html b/doc/html/boost_typetraits/reference/remove_const.html index bcc8351..fabea57 100644 --- a/doc/html/boost_typetraits/reference/remove_const.html +++ b/doc/html/boost_typetraits/reference/remove_const.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.19. Examples

    +

    Table 1.19. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_cv.html b/doc/html/boost_typetraits/reference/remove_cv.html index ca269a2..886a0a2 100644 --- a/doc/html/boost_typetraits/reference/remove_cv.html +++ b/doc/html/boost_typetraits/reference/remove_cv.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.20. Examples

    +

    Table 1.20. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_extent.html b/doc/html/boost_typetraits/reference/remove_extent.html index 88e9817..b6946e1 100644 --- a/doc/html/boost_typetraits/reference/remove_extent.html +++ b/doc/html/boost_typetraits/reference/remove_extent.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.21. Examples

    +

    Table 1.21. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_pointer.html b/doc/html/boost_typetraits/reference/remove_pointer.html index ed48364..4672498 100644 --- a/doc/html/boost_typetraits/reference/remove_pointer.html +++ b/doc/html/boost_typetraits/reference/remove_pointer.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.22. Examples

    +

    Table 1.22. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_reference.html b/doc/html/boost_typetraits/reference/remove_reference.html index 7983aff..d1fa0b9 100644 --- a/doc/html/boost_typetraits/reference/remove_reference.html +++ b/doc/html/boost_typetraits/reference/remove_reference.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.23. Examples

    +

    Table 1.23. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_volatile.html b/doc/html/boost_typetraits/reference/remove_volatile.html index 983b48b..95b9e29 100644 --- a/doc/html/boost_typetraits/reference/remove_volatile.html +++ b/doc/html/boost_typetraits/reference/remove_volatile.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.24. Examples

    +

    Table 1.24. Examples

    diff --git a/doc/html/index.html b/doc/html/index.html index 1d99708..a0fbb5e 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -30,7 +30,7 @@ Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert Ramey and Jeremy Siek

    -

    +

    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)

    From fb2ea8595a7b3c3b958645ea464094da41e17869 Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Sat, 12 Apr 2008 03:00:17 +0000 Subject: [PATCH 15/92] Fixed an ambiguity. [SVN r44203] --- include/boost/type_traits/type_with_alignment.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/type_traits/type_with_alignment.hpp b/include/boost/type_traits/type_with_alignment.hpp index 03b753e..7f8497b 100644 --- a/include/boost/type_traits/type_with_alignment.hpp +++ b/include/boost/type_traits/type_with_alignment.hpp @@ -213,7 +213,8 @@ class type_with_alignment_imp } template -class type_with_alignment : public detail::type_with_alignment_imp +class type_with_alignment + : public ::boost::detail::type_with_alignment_imp { }; From 72e51548aaa0f36d3be678a30fac83cf18a4674f Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 1 May 2008 16:50:39 +0000 Subject: [PATCH 16/92] make_shared added; tweaks for old compilers; fixes #1884. [SVN r44979] --- include/boost/type_traits/type_with_alignment.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/type_traits/type_with_alignment.hpp b/include/boost/type_traits/type_with_alignment.hpp index 7f8497b..063bf32 100644 --- a/include/boost/type_traits/type_with_alignment.hpp +++ b/include/boost/type_traits/type_with_alignment.hpp @@ -242,7 +242,7 @@ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a16,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a32,true) } #endif -#if defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER)) +#if (defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && _MSC_VER >= 1300 // // MSVC supports types which have alignments greater than the normal // maximum: these are used for example in the types __m64 and __m128 From d1420c8e5a77b8f914abd8cd782cf36c1afa9d18 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 16 May 2008 09:09:23 +0000 Subject: [PATCH 17/92] Don't test SSE2 primitives on non-Intel chips. [SVN r45421] --- test/type_with_alignment_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/type_with_alignment_test.cpp b/test/type_with_alignment_test.cpp index 534803c..c8a9722 100644 --- a/test/type_with_alignment_test.cpp +++ b/test/type_with_alignment_test.cpp @@ -15,7 +15,7 @@ #endif #if defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER)) -#if _MSC_VER >= 1400 +#if (_MSC_VER >= 1400) && defined(_M_IX86) #include #endif struct __declspec(align(8)) a8 { char m[8]; }; @@ -87,7 +87,7 @@ TYPE_WITH_ALIGNMENT_TEST_EX(empty_UDT) TYPE_WITH_ALIGNMENT_TEST_EX(union_UDT) #if defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER)) -#if _MSC_VER >= 1400 +#if (_MSC_VER >= 1400) && defined(_M_IX86) TYPE_WITH_ALIGNMENT_TEST(__m128) TYPE_WITH_ALIGNMENT_TEST(__m64) #endif From 3cc8416611ea8e784d8bd56773a051a5eac483bc Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 4 Jun 2008 17:00:19 +0000 Subject: [PATCH 18/92] Enable alignof intrinsic support. Also fixes #1946. [SVN r46127] --- include/boost/type_traits/alignment_of.hpp | 11 +++++++++++ include/boost/type_traits/intrinsics.hpp | 3 +++ 2 files changed, 14 insertions(+) diff --git a/include/boost/type_traits/alignment_of.hpp b/include/boost/type_traits/alignment_of.hpp index 45cf38f..9739f14 100644 --- a/include/boost/type_traits/alignment_of.hpp +++ b/include/boost/type_traits/alignment_of.hpp @@ -12,6 +12,7 @@ #include #include +#include // should be the last #include #include @@ -55,11 +56,21 @@ struct alignment_logic template< typename T > struct alignment_of_impl { +#ifndef BOOST_ALIGNMENT_OF BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::alignment_logic< sizeof(::boost::detail::alignment_of_hack) - sizeof(T), sizeof(T) >::value)); +#else + // + // We put this here, rather than in the definition of + // alignment_of below, because MSVC's __alignof doesn't + // always work in that context for some unexplained reason. + // (See type_with_alignment tests for test cases). + // + BOOST_STATIC_CONSTANT(std::size_t, value = BOOST_ALIGNMENT_OF(T)); +#endif }; } // namespace detail diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 6c285bf..316a966 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -42,6 +42,7 @@ // BOOST_IS_CONVERTIBLE(T,U) true if T is convertible to U // BOOST_IS_ENUM(T) true is T is an enum // BOOST_IS_POLYMORPHIC(T) true if T is a polymorphic type +// BOOST_ALIGNMENT_OF(T) should evaluate to the alignment requirements of type T. #ifdef BOOST_HAS_SGI_TYPE_TRAITS // Hook into SGI's __type_traits class, this will pick up user supplied @@ -104,6 +105,7 @@ # define BOOST_IS_ENUM(T) __is_enum(T) // This one doesn't quite always do the right thing: // # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +# define BOOST_ALIGNMENT_OF(T) __alignof(T) # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif @@ -146,6 +148,7 @@ # define BOOST_IS_CLASS(T) __is_class(T) # define BOOST_IS_ENUM(T) __is_enum(T) # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +# define BOOST_ALIGNMENT_OF(T) __alignof__(T) # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif From 21d466f4513744bbe058e79d3825dca4e3fb947e Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 4 Jun 2008 17:09:37 +0000 Subject: [PATCH 19/92] Added alignof intrinsic support: new tests and docs. Also added test case from issue #1946. [SVN r46128] --- doc/html/boost_typetraits/background.html | 26 +++--- doc/html/boost_typetraits/category.html | 4 +- .../boost_typetraits/category/alignment.html | 4 +- .../boost_typetraits/category/function.html | 4 +- .../boost_typetraits/category/transform.html | 6 +- .../category/value_traits.html | 4 +- .../category/value_traits/primary.html | 4 +- .../category/value_traits/properties.html | 4 +- .../category/value_traits/relate.html | 4 +- doc/html/boost_typetraits/credits.html | 4 +- doc/html/boost_typetraits/examples.html | 4 +- doc/html/boost_typetraits/examples/copy.html | 4 +- .../boost_typetraits/examples/destruct.html | 4 +- doc/html/boost_typetraits/examples/fill.html | 4 +- doc/html/boost_typetraits/examples/iter.html | 4 +- .../boost_typetraits/examples/to_double.html | 4 +- doc/html/boost_typetraits/intrinsics.html | 90 ++++++++++++++++++- doc/html/boost_typetraits/intro.html | 4 +- doc/html/boost_typetraits/mpl.html | 4 +- doc/html/boost_typetraits/reference.html | 4 +- .../boost_typetraits/reference/add_const.html | 6 +- .../boost_typetraits/reference/add_cv.html | 6 +- .../reference/add_pointer.html | 6 +- .../reference/add_reference.html | 6 +- .../reference/add_volatile.html | 6 +- .../reference/aligned_storage.html | 4 +- .../reference/alignment_of.html | 4 +- .../boost_typetraits/reference/decay.html | 6 +- .../boost_typetraits/reference/extent.html | 4 +- .../reference/floating_point_promotion.html | 6 +- .../reference/function_traits.html | 8 +- .../reference/has_no_throw_def_cons.html | 4 +- .../reference/has_nothrow_assign.html | 4 +- .../reference/has_nothrow_constructor.html | 4 +- .../reference/has_nothrow_copy.html | 4 +- .../reference/has_nothrow_cp_cons.html | 4 +- .../reference/has_trivial_assign.html | 4 +- .../reference/has_trivial_constructor.html | 4 +- .../reference/has_trivial_copy.html | 4 +- .../reference/has_trivial_cp_cons.html | 4 +- .../reference/has_trivial_def_cons.html | 4 +- .../reference/has_trivial_destructor.html | 4 +- .../reference/has_virtual_destructor.html | 4 +- .../reference/integral_constant.html | 4 +- .../reference/integral_promotion.html | 6 +- .../reference/is_abstract.html | 4 +- .../reference/is_arithmetic.html | 4 +- .../boost_typetraits/reference/is_array.html | 4 +- .../reference/is_base_of.html | 4 +- .../boost_typetraits/reference/is_class.html | 4 +- .../reference/is_complex.html | 4 +- .../reference/is_compound.html | 4 +- .../boost_typetraits/reference/is_const.html | 4 +- .../reference/is_convertible.html | 4 +- .../boost_typetraits/reference/is_empty.html | 4 +- .../boost_typetraits/reference/is_enum.html | 4 +- .../reference/is_floating_point.html | 4 +- .../reference/is_function.html | 4 +- .../reference/is_fundamental.html | 4 +- .../reference/is_integral.html | 4 +- .../reference/is_member_function_pointer.html | 4 +- .../reference/is_member_object_pointer.html | 4 +- .../reference/is_member_pointer.html | 4 +- .../boost_typetraits/reference/is_object.html | 4 +- .../boost_typetraits/reference/is_pod.html | 4 +- .../reference/is_pointer.html | 4 +- .../reference/is_polymorphic.html | 4 +- .../reference/is_reference.html | 4 +- .../boost_typetraits/reference/is_same.html | 4 +- .../boost_typetraits/reference/is_scalar.html | 4 +- .../boost_typetraits/reference/is_signed.html | 4 +- .../reference/is_stateless.html | 4 +- .../boost_typetraits/reference/is_union.html | 4 +- .../reference/is_unsigned.html | 4 +- .../boost_typetraits/reference/is_void.html | 4 +- .../reference/is_volatile.html | 4 +- .../reference/make_signed.html | 6 +- .../reference/make_unsigned.html | 6 +- .../boost_typetraits/reference/promote.html | 6 +- doc/html/boost_typetraits/reference/rank.html | 4 +- .../reference/remove_all_extents.html | 6 +- .../reference/remove_const.html | 6 +- .../boost_typetraits/reference/remove_cv.html | 6 +- .../reference/remove_extent.html | 6 +- .../reference/remove_pointer.html | 6 +- .../reference/remove_reference.html | 6 +- .../reference/remove_volatile.html | 6 +- .../reference/type_with_alignment.html | 4 +- doc/html/boost_typetraits/user_defined.html | 4 +- doc/html/index.html | 6 +- doc/intrinsics.qbk | 9 ++ test/alignment_of_test.cpp | 35 ++++++++ test/type_with_alignment_test.cpp | 12 ++- 93 files changed, 350 insertions(+), 218 deletions(-) diff --git a/doc/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index c997f66..709733e 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -14,8 +14,8 @@
    - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -56,7 +56,7 @@ method available to them.

    - + Type Traits

    @@ -84,7 +84,7 @@ given.

    - + Implementation

    @@ -174,7 +174,7 @@ in the default template.

    - + Optimized copy

    @@ -247,7 +247,7 @@ otherwise it will call the "slow but safe version".

    - + Was it worth it?

    @@ -280,7 +280,7 @@

    -

    Table 1.1. Time taken to copy 1000 elements using `copy<const +

    Table 1.1. Time taken to copy 1000 elements using `copy<const T*, T*>` (times in micro-seconds)

    @@ -379,7 +379,7 @@

    - + Pair of References

    @@ -416,7 +416,7 @@ to hold non-reference types, references, and constant references:

    -

    Table 1.2. Required Constructor Argument Types

    +

    Table 1.2. Required Constructor Argument Types

    @@ -481,7 +481,7 @@ adds a reference to its type, unless it is already a reference.

    -

    Table 1.3. Using add_reference to synthesize the correct constructor +

    Table 1.3. Using add_reference to synthesize the correct constructor type

    @@ -598,7 +598,7 @@ easier to maintain and easier to understand.

    - + Conclusion

    @@ -611,7 +611,7 @@ can be optimal as well as generic.

    - + Acknowledgements

    @@ -619,7 +619,7 @@ comments when preparing this article.

    - + References
      diff --git a/doc/html/boost_typetraits/category.html b/doc/html/boost_typetraits/category.html index fd7037f..43f6f85 100644 --- a/doc/html/boost_typetraits/category.html +++ b/doc/html/boost_typetraits/category.html @@ -14,8 +14,8 @@
    - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    diff --git a/doc/html/boost_typetraits/category/alignment.html b/doc/html/boost_typetraits/category/alignment.html index 597e5c4..1ce8287 100644 --- a/doc/html/boost_typetraits/category/alignment.html +++ b/doc/html/boost_typetraits/category/alignment.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/category/function.html b/doc/html/boost_typetraits/category/function.html index cf89345..88854ff 100644 --- a/doc/html/boost_typetraits/category/function.html +++ b/doc/html/boost_typetraits/category/function.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/category/transform.html b/doc/html/boost_typetraits/category/transform.html index 9435034..663a625 100644 --- a/doc/html/boost_typetraits/category/transform.html +++ b/doc/html/boost_typetraits/category/transform.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -91,7 +91,7 @@ struct remove_volatile;
    - + Broken Compiler Workarounds:
    diff --git a/doc/html/boost_typetraits/category/value_traits.html b/doc/html/boost_typetraits/category/value_traits.html index d31a0b6..550cf59 100644 --- a/doc/html/boost_typetraits/category/value_traits.html +++ b/doc/html/boost_typetraits/category/value_traits.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/category/value_traits/primary.html b/doc/html/boost_typetraits/category/value_traits/primary.html index f317f13..668f886 100644 --- a/doc/html/boost_typetraits/category/value_traits/primary.html +++ b/doc/html/boost_typetraits/category/value_traits/primary.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/category/value_traits/properties.html b/doc/html/boost_typetraits/category/value_traits/properties.html index 0a21473..278c74c 100644 --- a/doc/html/boost_typetraits/category/value_traits/properties.html +++ b/doc/html/boost_typetraits/category/value_traits/properties.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/category/value_traits/relate.html b/doc/html/boost_typetraits/category/value_traits/relate.html index 6a791a4..598e5fb 100644 --- a/doc/html/boost_typetraits/category/value_traits/relate.html +++ b/doc/html/boost_typetraits/category/value_traits/relate.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/credits.html b/doc/html/boost_typetraits/credits.html index 69bd783..201e36b 100644 --- a/doc/html/boost_typetraits/credits.html +++ b/doc/html/boost_typetraits/credits.html @@ -13,8 +13,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/examples.html b/doc/html/boost_typetraits/examples.html index d0a09ff..01cbcd3 100644 --- a/doc/html/boost_typetraits/examples.html +++ b/doc/html/boost_typetraits/examples.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/examples/copy.html b/doc/html/boost_typetraits/examples/copy.html index 76656b3..13e95b4 100644 --- a/doc/html/boost_typetraits/examples/copy.html +++ b/doc/html/boost_typetraits/examples/copy.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/examples/destruct.html b/doc/html/boost_typetraits/examples/destruct.html index cb91b48..c93989f 100644 --- a/doc/html/boost_typetraits/examples/destruct.html +++ b/doc/html/boost_typetraits/examples/destruct.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/examples/fill.html b/doc/html/boost_typetraits/examples/fill.html index d8b98e7..9939850 100644 --- a/doc/html/boost_typetraits/examples/fill.html +++ b/doc/html/boost_typetraits/examples/fill.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/examples/iter.html b/doc/html/boost_typetraits/examples/iter.html index 3283949..23c7385 100644 --- a/doc/html/boost_typetraits/examples/iter.html +++ b/doc/html/boost_typetraits/examples/iter.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/examples/to_double.html b/doc/html/boost_typetraits/examples/to_double.html index a9fb6d4..2fe87cc 100644 --- a/doc/html/boost_typetraits/examples/to_double.html +++ b/doc/html/boost_typetraits/examples/to_double.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/intrinsics.html b/doc/html/boost_typetraits/intrinsics.html index 5445124..3eecb24 100644 --- a/doc/html/boost_typetraits/intrinsics.html +++ b/doc/html/boost_typetraits/intrinsics.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -71,7 +71,7 @@ of the following macros:

    -

    Table 1.4. Macros for Compiler Intrinsics

    +

    Table 1.4. Macros for Compiler Intrinsics

    @@ -220,6 +220,90 @@

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    + BOOST_IS_ABSTRACT(T) +

    +
    +

    + Should evaluate to true if T is an abstract type +

    +
    +

    + BOOST_IS_BASE_OF(T,U) +

    +
    +

    + Should evaluate to true if T is a base class of U +

    +
    +

    + BOOST_IS_CLASS(T) +

    +
    +

    + Should evaluate to true if T is a class type +

    +
    +

    + BOOST_IS_CONVERTIBLE(T,U) +

    +
    +

    + Should evaluate to true if T is convertible to U +

    +
    +

    + BOOST_IS_ENUM(T) +

    +
    +

    + Should evaluate to true is T is an enum +

    +
    +

    + BOOST_IS_POLYMORPHIC(T) +

    +
    +

    + Should evaluate to true if T is a polymorphic type +

    +
    +

    + BOOST_ALIGNMENT_OF(T) +

    +
    +

    + Should evaluate to the alignment requirements of type T. +

    +
    diff --git a/doc/html/boost_typetraits/intro.html b/doc/html/boost_typetraits/intro.html index aa8f8f9..b874987 100644 --- a/doc/html/boost_typetraits/intro.html +++ b/doc/html/boost_typetraits/intro.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/mpl.html b/doc/html/boost_typetraits/mpl.html index b4f8efb..b058fad 100644 --- a/doc/html/boost_typetraits/mpl.html +++ b/doc/html/boost_typetraits/mpl.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference.html b/doc/html/boost_typetraits/reference.html index 46f0f9e..40c1482 100644 --- a/doc/html/boost_typetraits/reference.html +++ b/doc/html/boost_typetraits/reference.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/add_const.html b/doc/html/boost_typetraits/reference/add_const.html index 88c7d52..226b327 100644 --- a/doc/html/boost_typetraits/reference/add_const.html +++ b/doc/html/boost_typetraits/reference/add_const.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.5. Examples

    +

    Table 1.5. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_cv.html b/doc/html/boost_typetraits/reference/add_cv.html index 14aa5ba..dd451c4 100644 --- a/doc/html/boost_typetraits/reference/add_cv.html +++ b/doc/html/boost_typetraits/reference/add_cv.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.6. Examples

    +

    Table 1.6. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_pointer.html b/doc/html/boost_typetraits/reference/add_pointer.html index a12dafc..b09f78a 100644 --- a/doc/html/boost_typetraits/reference/add_pointer.html +++ b/doc/html/boost_typetraits/reference/add_pointer.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -56,7 +56,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.7. Examples

    +

    Table 1.7. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_reference.html b/doc/html/boost_typetraits/reference/add_reference.html index 7c41f87..ebc8eee 100644 --- a/doc/html/boost_typetraits/reference/add_reference.html +++ b/doc/html/boost_typetraits/reference/add_reference.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.8. Examples

    +

    Table 1.8. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_volatile.html b/doc/html/boost_typetraits/reference/add_volatile.html index 7671f29..7fc6a02 100644 --- a/doc/html/boost_typetraits/reference/add_volatile.html +++ b/doc/html/boost_typetraits/reference/add_volatile.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.9. Examples

    +

    Table 1.9. Examples

    diff --git a/doc/html/boost_typetraits/reference/aligned_storage.html b/doc/html/boost_typetraits/reference/aligned_storage.html index d19d847..dd4d40c 100644 --- a/doc/html/boost_typetraits/reference/aligned_storage.html +++ b/doc/html/boost_typetraits/reference/aligned_storage.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    diff --git a/doc/html/boost_typetraits/reference/alignment_of.html b/doc/html/boost_typetraits/reference/alignment_of.html index 5ddd52e..e98f4bd 100644 --- a/doc/html/boost_typetraits/reference/alignment_of.html +++ b/doc/html/boost_typetraits/reference/alignment_of.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/decay.html b/doc/html/boost_typetraits/reference/decay.html index 7e05ace..9af1fef 100644 --- a/doc/html/boost_typetraits/reference/decay.html +++ b/doc/html/boost_typetraits/reference/decay.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -48,7 +48,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.10. Examples

    +

    Table 1.10. Examples

    diff --git a/doc/html/boost_typetraits/reference/extent.html b/doc/html/boost_typetraits/reference/extent.html index e1d5229..ff75445 100644 --- a/doc/html/boost_typetraits/reference/extent.html +++ b/doc/html/boost_typetraits/reference/extent.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    diff --git a/doc/html/boost_typetraits/reference/floating_point_promotion.html b/doc/html/boost_typetraits/reference/floating_point_promotion.html index 5abf23a..02b4afd 100644 --- a/doc/html/boost_typetraits/reference/floating_point_promotion.html +++ b/doc/html/boost_typetraits/reference/floating_point_promotion.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -49,7 +49,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.11. Examples

    +

    Table 1.11. Examples

    diff --git a/doc/html/boost_typetraits/reference/function_traits.html b/doc/html/boost_typetraits/reference/function_traits.html index e8f50ec..7c27d49 100644 --- a/doc/html/boost_typetraits/reference/function_traits.html +++ b/doc/html/boost_typetraits/reference/function_traits.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -59,7 +59,7 @@

    -

    Table 1.12. Function Traits Members

    +

    Table 1.12. Function Traits Members

    @@ -122,7 +122,7 @@

    -

    Table 1.13. Examples

    +

    Table 1.13. Examples

    diff --git a/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html b/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html index d9e8de1..4fd3c42 100644 --- a/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html +++ b/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    diff --git a/doc/html/boost_typetraits/reference/has_nothrow_assign.html b/doc/html/boost_typetraits/reference/has_nothrow_assign.html index 1211cd3..16acc7b 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_assign.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_assign.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html index a5b50e8..1e03f71 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/has_nothrow_copy.html b/doc/html/boost_typetraits/reference/has_nothrow_copy.html index b5e4bbd..9346165 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_copy.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_copy.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html b/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html index 24a431d..b59f9bc 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/has_trivial_assign.html b/doc/html/boost_typetraits/reference/has_trivial_assign.html index 1718206..116deef 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_assign.html +++ b/doc/html/boost_typetraits/reference/has_trivial_assign.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/has_trivial_constructor.html b/doc/html/boost_typetraits/reference/has_trivial_constructor.html index e21fc4a..82f2984 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_constructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_constructor.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/has_trivial_copy.html b/doc/html/boost_typetraits/reference/has_trivial_copy.html index 0c55e4a..477049b 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_copy.html +++ b/doc/html/boost_typetraits/reference/has_trivial_copy.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html b/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html index 1f16bf4..a26b6be 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/has_trivial_def_cons.html b/doc/html/boost_typetraits/reference/has_trivial_def_cons.html index e3e740c..6079d35 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_def_cons.html +++ b/doc/html/boost_typetraits/reference/has_trivial_def_cons.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/has_trivial_destructor.html b/doc/html/boost_typetraits/reference/has_trivial_destructor.html index a6f9ea8..2b7379e 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_destructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_destructor.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/has_virtual_destructor.html b/doc/html/boost_typetraits/reference/has_virtual_destructor.html index ddfd4f6..06a92b3 100644 --- a/doc/html/boost_typetraits/reference/has_virtual_destructor.html +++ b/doc/html/boost_typetraits/reference/has_virtual_destructor.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/integral_constant.html b/doc/html/boost_typetraits/reference/integral_constant.html index 31764d2..45a0f4e 100644 --- a/doc/html/boost_typetraits/reference/integral_constant.html +++ b/doc/html/boost_typetraits/reference/integral_constant.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/integral_promotion.html b/doc/html/boost_typetraits/reference/integral_promotion.html index d3b7dbe..fd454b8 100644 --- a/doc/html/boost_typetraits/reference/integral_promotion.html +++ b/doc/html/boost_typetraits/reference/integral_promotion.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -49,7 +49,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.14. Examples

    +

    Table 1.14. Examples

    diff --git a/doc/html/boost_typetraits/reference/is_abstract.html b/doc/html/boost_typetraits/reference/is_abstract.html index 1196f5f..b61bdd2 100644 --- a/doc/html/boost_typetraits/reference/is_abstract.html +++ b/doc/html/boost_typetraits/reference/is_abstract.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    diff --git a/doc/html/boost_typetraits/reference/is_arithmetic.html b/doc/html/boost_typetraits/reference/is_arithmetic.html index d0fe6f5..e1eef3e 100644 --- a/doc/html/boost_typetraits/reference/is_arithmetic.html +++ b/doc/html/boost_typetraits/reference/is_arithmetic.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_array.html b/doc/html/boost_typetraits/reference/is_array.html index 23b87a8..fe58271 100644 --- a/doc/html/boost_typetraits/reference/is_array.html +++ b/doc/html/boost_typetraits/reference/is_array.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_base_of.html b/doc/html/boost_typetraits/reference/is_base_of.html index d5c1db4..7eac36f 100644 --- a/doc/html/boost_typetraits/reference/is_base_of.html +++ b/doc/html/boost_typetraits/reference/is_base_of.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_class.html b/doc/html/boost_typetraits/reference/is_class.html index dd78a3b..9741bab 100644 --- a/doc/html/boost_typetraits/reference/is_class.html +++ b/doc/html/boost_typetraits/reference/is_class.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_complex.html b/doc/html/boost_typetraits/reference/is_complex.html index 2f1ace1..45c42a8 100644 --- a/doc/html/boost_typetraits/reference/is_complex.html +++ b/doc/html/boost_typetraits/reference/is_complex.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_compound.html b/doc/html/boost_typetraits/reference/is_compound.html index 5e4faaf..b72db34 100644 --- a/doc/html/boost_typetraits/reference/is_compound.html +++ b/doc/html/boost_typetraits/reference/is_compound.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_const.html b/doc/html/boost_typetraits/reference/is_const.html index d543c23..7dc9e95 100644 --- a/doc/html/boost_typetraits/reference/is_const.html +++ b/doc/html/boost_typetraits/reference/is_const.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_convertible.html b/doc/html/boost_typetraits/reference/is_convertible.html index 0a89de1..9b78074 100644 --- a/doc/html/boost_typetraits/reference/is_convertible.html +++ b/doc/html/boost_typetraits/reference/is_convertible.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_empty.html b/doc/html/boost_typetraits/reference/is_empty.html index d528b1c..97301d9 100644 --- a/doc/html/boost_typetraits/reference/is_empty.html +++ b/doc/html/boost_typetraits/reference/is_empty.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_enum.html b/doc/html/boost_typetraits/reference/is_enum.html index a4919b1..a09cb0b 100644 --- a/doc/html/boost_typetraits/reference/is_enum.html +++ b/doc/html/boost_typetraits/reference/is_enum.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_floating_point.html b/doc/html/boost_typetraits/reference/is_floating_point.html index fa5a303..52ae734 100644 --- a/doc/html/boost_typetraits/reference/is_floating_point.html +++ b/doc/html/boost_typetraits/reference/is_floating_point.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_function.html b/doc/html/boost_typetraits/reference/is_function.html index c8f9f74..f824337 100644 --- a/doc/html/boost_typetraits/reference/is_function.html +++ b/doc/html/boost_typetraits/reference/is_function.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_fundamental.html b/doc/html/boost_typetraits/reference/is_fundamental.html index 3107b1c..c630002 100644 --- a/doc/html/boost_typetraits/reference/is_fundamental.html +++ b/doc/html/boost_typetraits/reference/is_fundamental.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_integral.html b/doc/html/boost_typetraits/reference/is_integral.html index 8a5f237..07a2d50 100644 --- a/doc/html/boost_typetraits/reference/is_integral.html +++ b/doc/html/boost_typetraits/reference/is_integral.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_member_function_pointer.html b/doc/html/boost_typetraits/reference/is_member_function_pointer.html index 27b52ff..d0809fa 100644 --- a/doc/html/boost_typetraits/reference/is_member_function_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_function_pointer.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_member_object_pointer.html b/doc/html/boost_typetraits/reference/is_member_object_pointer.html index 7fbb1e6..018872c 100644 --- a/doc/html/boost_typetraits/reference/is_member_object_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_object_pointer.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_member_pointer.html b/doc/html/boost_typetraits/reference/is_member_pointer.html index 2b05ea4..d5c8263 100644 --- a/doc/html/boost_typetraits/reference/is_member_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_pointer.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_object.html b/doc/html/boost_typetraits/reference/is_object.html index 93cb157..9a9a917 100644 --- a/doc/html/boost_typetraits/reference/is_object.html +++ b/doc/html/boost_typetraits/reference/is_object.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_pod.html b/doc/html/boost_typetraits/reference/is_pod.html index d849d18..2912b2b 100644 --- a/doc/html/boost_typetraits/reference/is_pod.html +++ b/doc/html/boost_typetraits/reference/is_pod.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_pointer.html b/doc/html/boost_typetraits/reference/is_pointer.html index 20c9967..e4e2036 100644 --- a/doc/html/boost_typetraits/reference/is_pointer.html +++ b/doc/html/boost_typetraits/reference/is_pointer.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_polymorphic.html b/doc/html/boost_typetraits/reference/is_polymorphic.html index 851df16..3bf1cfe 100644 --- a/doc/html/boost_typetraits/reference/is_polymorphic.html +++ b/doc/html/boost_typetraits/reference/is_polymorphic.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_reference.html b/doc/html/boost_typetraits/reference/is_reference.html index 269c200..3b9010a 100644 --- a/doc/html/boost_typetraits/reference/is_reference.html +++ b/doc/html/boost_typetraits/reference/is_reference.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_same.html b/doc/html/boost_typetraits/reference/is_same.html index 5287f7d..824003f 100644 --- a/doc/html/boost_typetraits/reference/is_same.html +++ b/doc/html/boost_typetraits/reference/is_same.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_scalar.html b/doc/html/boost_typetraits/reference/is_scalar.html index 73f94bf..4e0e016 100644 --- a/doc/html/boost_typetraits/reference/is_scalar.html +++ b/doc/html/boost_typetraits/reference/is_scalar.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_signed.html b/doc/html/boost_typetraits/reference/is_signed.html index 1d7eca7..9f46b2a 100644 --- a/doc/html/boost_typetraits/reference/is_signed.html +++ b/doc/html/boost_typetraits/reference/is_signed.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_stateless.html b/doc/html/boost_typetraits/reference/is_stateless.html index e2977f8..43b34e5 100644 --- a/doc/html/boost_typetraits/reference/is_stateless.html +++ b/doc/html/boost_typetraits/reference/is_stateless.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_union.html b/doc/html/boost_typetraits/reference/is_union.html index 8e138d5..2880c0e 100644 --- a/doc/html/boost_typetraits/reference/is_union.html +++ b/doc/html/boost_typetraits/reference/is_union.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_unsigned.html b/doc/html/boost_typetraits/reference/is_unsigned.html index 90fd7e8..d892e68 100644 --- a/doc/html/boost_typetraits/reference/is_unsigned.html +++ b/doc/html/boost_typetraits/reference/is_unsigned.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_void.html b/doc/html/boost_typetraits/reference/is_void.html index dd8be37..569a964 100644 --- a/doc/html/boost_typetraits/reference/is_void.html +++ b/doc/html/boost_typetraits/reference/is_void.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/is_volatile.html b/doc/html/boost_typetraits/reference/is_volatile.html index 3c9e428..ca4673b 100644 --- a/doc/html/boost_typetraits/reference/is_volatile.html +++ b/doc/html/boost_typetraits/reference/is_volatile.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/boost_typetraits/reference/make_signed.html b/doc/html/boost_typetraits/reference/make_signed.html index 361ae54..9cd85d1 100644 --- a/doc/html/boost_typetraits/reference/make_signed.html +++ b/doc/html/boost_typetraits/reference/make_signed.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.15. Examples

    +

    Table 1.15. Examples

    diff --git a/doc/html/boost_typetraits/reference/make_unsigned.html b/doc/html/boost_typetraits/reference/make_unsigned.html index bf70792..ba8146f 100644 --- a/doc/html/boost_typetraits/reference/make_unsigned.html +++ b/doc/html/boost_typetraits/reference/make_unsigned.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.16. Examples

    +

    Table 1.16. Examples

    diff --git a/doc/html/boost_typetraits/reference/promote.html b/doc/html/boost_typetraits/reference/promote.html index 08d606f..94ade5e 100644 --- a/doc/html/boost_typetraits/reference/promote.html +++ b/doc/html/boost_typetraits/reference/promote.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -51,7 +51,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.17. Examples

    +

    Table 1.17. Examples

    diff --git a/doc/html/boost_typetraits/reference/rank.html b/doc/html/boost_typetraits/reference/rank.html index 834e0fa..96ff595 100644 --- a/doc/html/boost_typetraits/reference/rank.html +++ b/doc/html/boost_typetraits/reference/rank.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    diff --git a/doc/html/boost_typetraits/reference/remove_all_extents.html b/doc/html/boost_typetraits/reference/remove_all_extents.html index 7a51af8..498f838 100644 --- a/doc/html/boost_typetraits/reference/remove_all_extents.html +++ b/doc/html/boost_typetraits/reference/remove_all_extents.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.18. Examples

    +

    Table 1.18. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_const.html b/doc/html/boost_typetraits/reference/remove_const.html index fabea57..86b36f6 100644 --- a/doc/html/boost_typetraits/reference/remove_const.html +++ b/doc/html/boost_typetraits/reference/remove_const.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.19. Examples

    +

    Table 1.19. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_cv.html b/doc/html/boost_typetraits/reference/remove_cv.html index 886a0a2..5eac7be 100644 --- a/doc/html/boost_typetraits/reference/remove_cv.html +++ b/doc/html/boost_typetraits/reference/remove_cv.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.20. Examples

    +

    Table 1.20. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_extent.html b/doc/html/boost_typetraits/reference/remove_extent.html index b6946e1..607e43f 100644 --- a/doc/html/boost_typetraits/reference/remove_extent.html +++ b/doc/html/boost_typetraits/reference/remove_extent.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.21. Examples

    +

    Table 1.21. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_pointer.html b/doc/html/boost_typetraits/reference/remove_pointer.html index 4672498..b5736c4 100644 --- a/doc/html/boost_typetraits/reference/remove_pointer.html +++ b/doc/html/boost_typetraits/reference/remove_pointer.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.22. Examples

    +

    Table 1.22. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_reference.html b/doc/html/boost_typetraits/reference/remove_reference.html index d1fa0b9..57118d8 100644 --- a/doc/html/boost_typetraits/reference/remove_reference.html +++ b/doc/html/boost_typetraits/reference/remove_reference.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.23. Examples

    +

    Table 1.23. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_volatile.html b/doc/html/boost_typetraits/reference/remove_volatile.html index 95b9e29..20cc90f 100644 --- a/doc/html/boost_typetraits/reference/remove_volatile.html +++ b/doc/html/boost_typetraits/reference/remove_volatile.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.24. Examples

    +

    Table 1.24. Examples

    diff --git a/doc/html/boost_typetraits/reference/type_with_alignment.html b/doc/html/boost_typetraits/reference/type_with_alignment.html index d589e9e..0a619f3 100644 --- a/doc/html/boost_typetraits/reference/type_with_alignment.html +++ b/doc/html/boost_typetraits/reference/type_with_alignment.html @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    diff --git a/doc/html/boost_typetraits/user_defined.html b/doc/html/boost_typetraits/user_defined.html index 86abd4c..7eaa8ce 100644 --- a/doc/html/boost_typetraits/user_defined.html +++ b/doc/html/boost_typetraits/user_defined.html @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    diff --git a/doc/html/index.html b/doc/html/index.html index a0fbb5e..2e1bab5 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -12,8 +12,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -30,7 +30,7 @@ Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert Ramey and Jeremy Siek

    -

    +

    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)

    diff --git a/doc/intrinsics.qbk b/doc/intrinsics.qbk index 4432772..2d171f6 100644 --- a/doc/intrinsics.qbk +++ b/doc/intrinsics.qbk @@ -57,6 +57,15 @@ a matter of defining one of more of the following macros: [[BOOST_HAS_NOTHROW_COPY(T)][Should evaluate to true if `T(t)` can not throw]] [[BOOST_HAS_NOTHROW_ASSIGN(T)][Should evaluate to true if `T t, u; t = u` can not throw]] [[BOOST_HAS_VIRTUAL_DESTRUCTOR(T)][Should evaluate to true T has a virtual destructor]] + + [[BOOST_IS_ABSTRACT(T)][Should evaluate to true if T is an abstract type]] + [[BOOST_IS_BASE_OF(T,U)][Should evaluate to true if T is a base class of U]] + [[BOOST_IS_CLASS(T)][Should evaluate to true if T is a class type]] + [[BOOST_IS_CONVERTIBLE(T,U)][Should evaluate to true if T is convertible to U]] + [[BOOST_IS_ENUM(T)][Should evaluate to true is T is an enum]] + [[BOOST_IS_POLYMORPHIC(T)][Should evaluate to true if T is a polymorphic type]] + [[BOOST_ALIGNMENT_OF(T)][Should evaluate to the alignment requirements of type T.]] + ] [endsect] diff --git a/test/alignment_of_test.cpp b/test/alignment_of_test.cpp index 4947e1f..85a4551 100644 --- a/test/alignment_of_test.cpp +++ b/test/alignment_of_test.cpp @@ -16,6 +16,37 @@ // VC++ emits an awful lot of warnings unless we define these: #ifdef BOOST_MSVC # pragma warning(disable:4244) +// +// What follows here is the test case for issue 1946. +// +#include +// This kind of packing is set within MSVC 9.0 headers. +// E.g. std::ostream has it. +#pragma pack(push,8) + +// The issue is gone if Root has no data members +struct Root { int a; }; +// The issue is gone if Root is inherited non-virtually +struct A : virtual public Root {}; + +#pragma pack(pop) +// +// This class has 8-byte alignment but is 44 bytes in size, which means +// that elements in an array of this type will not actually be 8 byte +// aligned. This appears to be an MSVC bug, and throws off our +// alignment calculations: causing us to report a non-sensical 12-byte +// alignment for this type. This is fixed by using the native __alignof +// operator. +// +class issue1946 : + public A +{ +public: + // The issue is gone if the type is not a boost::function. The signature doesn't matter. + typedef boost::function0< void > function_type; + function_type m_function; +}; + #endif @@ -63,6 +94,10 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(POD_UD BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(empty_UDT)); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(union_UDT)); +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(issue1946)); +#endif + TT_TEST_END diff --git a/test/type_with_alignment_test.cpp b/test/type_with_alignment_test.cpp index c8a9722..65a9232 100644 --- a/test/type_with_alignment_test.cpp +++ b/test/type_with_alignment_test.cpp @@ -35,6 +35,14 @@ void check_call(const T& v) #define TYPE_WITH_ALIGNMENT_TEST(T)\ {\ +std::cout << "\ntesting type " << typeid(T).name() << std::endl;\ +std::cout << "Alignment of T is " << ::tt::alignment_of< T >::value << std::endl;\ +std::cout << "Aligned type is " << typeid(::tt::type_with_alignment< ::tt::alignment_of< T >::value>::type).name() << std::endl;\ +std::cout << "Alignment of aligned type is " << ::tt::alignment_of<\ + ::tt::type_with_alignment<\ + ::tt::alignment_of< T >::value\ + >::type\ +>::value << std::endl;\ BOOST_CHECK(::tt::alignment_of<\ ::tt::type_with_alignment<\ ::tt::alignment_of< T >::value\ @@ -57,10 +65,6 @@ BOOST_CHECK(::tt::is_pod<\ TT_TEST_BEGIN(type_with_alignment) -BOOST_MESSAGE(typeid(::tt::type_with_alignment< - ::tt::alignment_of::value - >::type).name()); - TYPE_WITH_ALIGNMENT_TEST_EX(char) TYPE_WITH_ALIGNMENT_TEST_EX(short) TYPE_WITH_ALIGNMENT_TEST_EX(int) From a8248f5884a4af9a7ab380fea7e1bbce33b6d26e Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 29 Jun 2008 09:10:46 +0000 Subject: [PATCH 20/92] Fix some more inspection report issues: mostly non-ASCII characters in peoples names (sorry folks!). [SVN r46840] --- include/boost/type_traits/conversion_traits.hpp | 2 +- include/boost/type_traits/is_convertible.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/type_traits/conversion_traits.hpp b/include/boost/type_traits/conversion_traits.hpp index 01edfa6..c8e5139 100644 --- a/include/boost/type_traits/conversion_traits.hpp +++ b/include/boost/type_traits/conversion_traits.hpp @@ -1,7 +1,7 @@ // Copyright 2000 John Maddock (john@johnmaddock.co.uk) // Copyright 2000 Jeremy Siek (jsiek@lsc.nd.edu) -// Copyright 1999, 2000 Jaakko J„rvi (jaakko.jarvi@cs.utu.fi) +// Copyright 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) // // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/include/boost/type_traits/is_convertible.hpp b/include/boost/type_traits/is_convertible.hpp index 6652199..9687a79 100644 --- a/include/boost/type_traits/is_convertible.hpp +++ b/include/boost/type_traits/is_convertible.hpp @@ -1,7 +1,7 @@ // Copyright 2000 John Maddock (john@johnmaddock.co.uk) // Copyright 2000 Jeremy Siek (jsiek@lsc.nd.edu) -// Copyright 1999, 2000 Jaakko J„rvi (jaakko.jarvi@cs.utu.fi) +// Copyright 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) // // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at From 353dad41966408c1ffdce8097c5b66953eaabaa3 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 6 Aug 2008 09:02:49 +0000 Subject: [PATCH 21/92] Change PP-logic to fix #2171. [SVN r47997] --- include/boost/type_traits/is_abstract.hpp | 4 ++-- include/boost/type_traits/is_base_and_derived.hpp | 4 ++-- include/boost/type_traits/is_convertible.hpp | 2 +- include/boost/type_traits/is_function.hpp | 4 ++-- include/boost/type_traits/is_member_function_pointer.hpp | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/boost/type_traits/is_abstract.hpp b/include/boost/type_traits/is_abstract.hpp index 29d10c3..15d4afe 100644 --- a/include/boost/type_traits/is_abstract.hpp +++ b/include/boost/type_traits/is_abstract.hpp @@ -94,12 +94,12 @@ struct is_abstract_imp2 #ifdef __GNUC__ BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(is_abstract_imp2::template check_sig(0))); #else -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig(0))); -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) #pragma warning(pop) #endif #endif diff --git a/include/boost/type_traits/is_base_and_derived.hpp b/include/boost/type_traits/is_base_and_derived.hpp index 0e195b3..57a5113 100644 --- a/include/boost/type_traits/is_base_and_derived.hpp +++ b/include/boost/type_traits/is_base_and_derived.hpp @@ -133,7 +133,7 @@ struct bd_helper template struct is_base_and_derived_impl2 { -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif @@ -156,7 +156,7 @@ struct is_base_and_derived_impl2 BOOST_STATIC_CONSTANT(bool, value = sizeof(bd_helper::check_sig(Host(), 0)) == sizeof(type_traits::yes_type)); -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) #pragma warning(pop) #endif }; diff --git a/include/boost/type_traits/is_convertible.hpp b/include/boost/type_traits/is_convertible.hpp index 9687a79..ce522a0 100644 --- a/include/boost/type_traits/is_convertible.hpp +++ b/include/boost/type_traits/is_convertible.hpp @@ -256,7 +256,7 @@ struct is_convertible_basic_impl #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4244) -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) #pragma warning(disable:6334) #endif #endif diff --git a/include/boost/type_traits/is_function.hpp b/include/boost/type_traits/is_function.hpp index 93e4846..d6458c4 100644 --- a/include/boost/type_traits/is_function.hpp +++ b/include/boost/type_traits/is_function.hpp @@ -62,7 +62,7 @@ struct is_function_impl template struct is_function_impl { -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif @@ -71,7 +71,7 @@ struct is_function_impl bool, value = sizeof(::boost::type_traits::is_function_ptr_tester(t)) == sizeof(::boost::type_traits::yes_type) ); -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) #pragma warning(pop) #endif }; diff --git a/include/boost/type_traits/is_member_function_pointer.hpp b/include/boost/type_traits/is_member_function_pointer.hpp index deedeea..f627511 100644 --- a/include/boost/type_traits/is_member_function_pointer.hpp +++ b/include/boost/type_traits/is_member_function_pointer.hpp @@ -62,7 +62,7 @@ struct is_mem_fun_pointer_select { template struct result_ { -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif @@ -73,7 +73,7 @@ struct is_mem_fun_pointer_select bool, value = ( 1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(self_type::make_t)) )); -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) #pragma warning(pop) #endif }; From ea4366f2703308a5a21aa02e49209111f48d54de Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 28 Sep 2008 12:21:39 +0000 Subject: [PATCH 22/92] Clean up some link errors. [SVN r48987] --- doc/credits.qbk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/credits.qbk b/doc/credits.qbk index 2c6c2cd..39eef4b 100644 --- a/doc/credits.qbk +++ b/doc/credits.qbk @@ -8,7 +8,7 @@ [section:credits Credits] This documentation was pulled together by John Maddock, using -[@../../../../tools/quickbook/doc/html/index.html Boost.Quickbook] +[@../../../../doc/html/quickbook.html Boost.Quickbook] and [@../../../../doc/html/boostbook.html Boost.DocBook]. The original version of this library was created by Steve Cleary, From 0126f5e95971f539e96fe59e40e8bb538524a670 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 6 Oct 2008 15:47:36 +0000 Subject: [PATCH 23/92] Fix some doc typos. [SVN r49144] --- doc/html/boost_typetraits/background.html | 22 ++++++++-------- .../boost_typetraits/category/transform.html | 2 +- .../category/value_traits/primary.html | 26 +++++++++---------- doc/html/boost_typetraits/credits.html | 2 +- doc/html/boost_typetraits/intrinsics.html | 2 +- .../boost_typetraits/reference/add_const.html | 2 +- .../boost_typetraits/reference/add_cv.html | 2 +- .../reference/add_pointer.html | 2 +- .../reference/add_reference.html | 2 +- .../reference/add_volatile.html | 2 +- .../boost_typetraits/reference/decay.html | 2 +- .../reference/floating_point_promotion.html | 2 +- .../reference/function_traits.html | 4 +-- .../reference/integral_promotion.html | 2 +- .../reference/make_signed.html | 2 +- .../reference/make_unsigned.html | 2 +- .../boost_typetraits/reference/promote.html | 2 +- .../reference/remove_all_extents.html | 2 +- .../reference/remove_const.html | 2 +- .../boost_typetraits/reference/remove_cv.html | 2 +- .../reference/remove_extent.html | 2 +- .../reference/remove_pointer.html | 2 +- .../reference/remove_reference.html | 2 +- .../reference/remove_volatile.html | 2 +- doc/html/index.html | 2 +- doc/value_traits.qbk | 26 +++++++++---------- 26 files changed, 61 insertions(+), 61 deletions(-) diff --git a/doc/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index 709733e..adca6a4 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -56,7 +56,7 @@ method available to them.

    - + Type Traits

    @@ -84,7 +84,7 @@ given.

    - + Implementation

    @@ -174,7 +174,7 @@ in the default template.

    - + Optimized copy

    @@ -247,7 +247,7 @@ otherwise it will call the "slow but safe version".

    - + Was it worth it?

    @@ -280,7 +280,7 @@

    -

    Table 1.1. Time taken to copy 1000 elements using `copy<const +

    Table 1.1. Time taken to copy 1000 elements using `copy<const T*, T*>` (times in micro-seconds)

    @@ -379,7 +379,7 @@

    - + Pair of References

    @@ -416,7 +416,7 @@ to hold non-reference types, references, and constant references:

    -

    Table 1.2. Required Constructor Argument Types

    +

    Table 1.2. Required Constructor Argument Types

    @@ -481,7 +481,7 @@ adds a reference to its type, unless it is already a reference.

    -

    Table 1.3. Using add_reference to synthesize the correct constructor +

    Table 1.3. Using add_reference to synthesize the correct constructor type

    @@ -598,7 +598,7 @@ easier to maintain and easier to understand.

    - + Conclusion

    @@ -611,7 +611,7 @@ can be optimal as well as generic.

    - + Acknowledgements

    @@ -619,7 +619,7 @@ comments when preparing this article.

    - + References
      diff --git a/doc/html/boost_typetraits/category/transform.html b/doc/html/boost_typetraits/category/transform.html index 663a625..463611b 100644 --- a/doc/html/boost_typetraits/category/transform.html +++ b/doc/html/boost_typetraits/category/transform.html @@ -91,7 +91,7 @@ struct remove_volatile;
      - + Broken Compiler Workarounds:
      diff --git a/doc/html/boost_typetraits/category/value_traits/primary.html b/doc/html/boost_typetraits/category/value_traits/primary.html index 668f886..4c6fc2b 100644 --- a/doc/html/boost_typetraits/category/value_traits/primary.html +++ b/doc/html/boost_typetraits/category/value_traits/primary.html @@ -49,43 +49,43 @@ Synopsis:

      template <class T>
      -struct is_array<T>;
      +struct is_array;
         
       template <class T>
      -struct is_class<T>;
      +struct is_class;
       
       template <class T>
      -struct is_complex<T>;
      +struct is_complex;
         
       template <class T>
      -struct is_enum<T>;
      +struct is_enum;
         
       template <class T>
      -struct is_floating_point<T>;
      +struct is_floating_point;
         
       template <class T>
      -struct is_function<T>;
      +struct is_function;
       
       template <class T>
      -struct is_integral<T>;
      +struct is_integral;
         
       template <class T>
      -struct is_member_function_pointer<T>;
      +struct is_member_function_pointer;
         
       template <class T>
      -struct is_member_object_pointer<T>;
      +struct is_member_object_pointer;
         
       template <class T>
      -struct is_pointer<T>;
      +struct is_pointer;
         
       template <class T>
      -struct is_reference<T>;
      +struct is_reference;
         
       template <class T>
      -struct is_union<T>;
      +struct is_union;
         
       template <class T>
      -struct is_void<T>;
      +struct is_void;
       

      The following traits are made up of the union of one or more type categorizations. diff --git a/doc/html/boost_typetraits/credits.html b/doc/html/boost_typetraits/credits.html index 201e36b..b473cb2 100644 --- a/doc/html/boost_typetraits/credits.html +++ b/doc/html/boost_typetraits/credits.html @@ -26,7 +26,7 @@ Credits

    - This documentation was pulled together by John Maddock, using Boost.Quickbook + This documentation was pulled together by John Maddock, using Boost.Quickbook and Boost.DocBook.

    diff --git a/doc/html/boost_typetraits/intrinsics.html b/doc/html/boost_typetraits/intrinsics.html index 3eecb24..aa18fef 100644 --- a/doc/html/boost_typetraits/intrinsics.html +++ b/doc/html/boost_typetraits/intrinsics.html @@ -71,7 +71,7 @@ of the following macros:

    -

    Table 1.4. Macros for Compiler Intrinsics

    +

    Table 1.4. Macros for Compiler Intrinsics

    diff --git a/doc/html/boost_typetraits/reference/add_const.html b/doc/html/boost_typetraits/reference/add_const.html index 226b327..82e606e 100644 --- a/doc/html/boost_typetraits/reference/add_const.html +++ b/doc/html/boost_typetraits/reference/add_const.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.5. Examples

    +

    Table 1.5. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_cv.html b/doc/html/boost_typetraits/reference/add_cv.html index dd451c4..0a4b92f 100644 --- a/doc/html/boost_typetraits/reference/add_cv.html +++ b/doc/html/boost_typetraits/reference/add_cv.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.6. Examples

    +

    Table 1.6. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_pointer.html b/doc/html/boost_typetraits/reference/add_pointer.html index b09f78a..721dfbf 100644 --- a/doc/html/boost_typetraits/reference/add_pointer.html +++ b/doc/html/boost_typetraits/reference/add_pointer.html @@ -56,7 +56,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.7. Examples

    +

    Table 1.7. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_reference.html b/doc/html/boost_typetraits/reference/add_reference.html index ebc8eee..204c4ae 100644 --- a/doc/html/boost_typetraits/reference/add_reference.html +++ b/doc/html/boost_typetraits/reference/add_reference.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.8. Examples

    +

    Table 1.8. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_volatile.html b/doc/html/boost_typetraits/reference/add_volatile.html index 7fc6a02..d971937 100644 --- a/doc/html/boost_typetraits/reference/add_volatile.html +++ b/doc/html/boost_typetraits/reference/add_volatile.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.9. Examples

    +

    Table 1.9. Examples

    diff --git a/doc/html/boost_typetraits/reference/decay.html b/doc/html/boost_typetraits/reference/decay.html index 9af1fef..483f21c 100644 --- a/doc/html/boost_typetraits/reference/decay.html +++ b/doc/html/boost_typetraits/reference/decay.html @@ -48,7 +48,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.10. Examples

    +

    Table 1.10. Examples

    diff --git a/doc/html/boost_typetraits/reference/floating_point_promotion.html b/doc/html/boost_typetraits/reference/floating_point_promotion.html index 02b4afd..8bdcc1b 100644 --- a/doc/html/boost_typetraits/reference/floating_point_promotion.html +++ b/doc/html/boost_typetraits/reference/floating_point_promotion.html @@ -49,7 +49,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.11. Examples

    +

    Table 1.11. Examples

    diff --git a/doc/html/boost_typetraits/reference/function_traits.html b/doc/html/boost_typetraits/reference/function_traits.html index 7c27d49..d67f990 100644 --- a/doc/html/boost_typetraits/reference/function_traits.html +++ b/doc/html/boost_typetraits/reference/function_traits.html @@ -59,7 +59,7 @@

    -

    Table 1.12. Function Traits Members

    +

    Table 1.12. Function Traits Members

    @@ -122,7 +122,7 @@

    -

    Table 1.13. Examples

    +

    Table 1.13. Examples

    diff --git a/doc/html/boost_typetraits/reference/integral_promotion.html b/doc/html/boost_typetraits/reference/integral_promotion.html index fd454b8..93fe371 100644 --- a/doc/html/boost_typetraits/reference/integral_promotion.html +++ b/doc/html/boost_typetraits/reference/integral_promotion.html @@ -49,7 +49,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.14. Examples

    +

    Table 1.14. Examples

    diff --git a/doc/html/boost_typetraits/reference/make_signed.html b/doc/html/boost_typetraits/reference/make_signed.html index 9cd85d1..8c6417a 100644 --- a/doc/html/boost_typetraits/reference/make_signed.html +++ b/doc/html/boost_typetraits/reference/make_signed.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.15. Examples

    +

    Table 1.15. Examples

    diff --git a/doc/html/boost_typetraits/reference/make_unsigned.html b/doc/html/boost_typetraits/reference/make_unsigned.html index ba8146f..3038f21 100644 --- a/doc/html/boost_typetraits/reference/make_unsigned.html +++ b/doc/html/boost_typetraits/reference/make_unsigned.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.16. Examples

    +

    Table 1.16. Examples

    diff --git a/doc/html/boost_typetraits/reference/promote.html b/doc/html/boost_typetraits/reference/promote.html index 94ade5e..f7fbda1 100644 --- a/doc/html/boost_typetraits/reference/promote.html +++ b/doc/html/boost_typetraits/reference/promote.html @@ -51,7 +51,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.17. Examples

    +

    Table 1.17. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_all_extents.html b/doc/html/boost_typetraits/reference/remove_all_extents.html index 498f838..82a2d2e 100644 --- a/doc/html/boost_typetraits/reference/remove_all_extents.html +++ b/doc/html/boost_typetraits/reference/remove_all_extents.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.18. Examples

    +

    Table 1.18. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_const.html b/doc/html/boost_typetraits/reference/remove_const.html index 86b36f6..1d74c46 100644 --- a/doc/html/boost_typetraits/reference/remove_const.html +++ b/doc/html/boost_typetraits/reference/remove_const.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.19. Examples

    +

    Table 1.19. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_cv.html b/doc/html/boost_typetraits/reference/remove_cv.html index 5eac7be..a41d72d 100644 --- a/doc/html/boost_typetraits/reference/remove_cv.html +++ b/doc/html/boost_typetraits/reference/remove_cv.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.20. Examples

    +

    Table 1.20. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_extent.html b/doc/html/boost_typetraits/reference/remove_extent.html index 607e43f..c2044b8 100644 --- a/doc/html/boost_typetraits/reference/remove_extent.html +++ b/doc/html/boost_typetraits/reference/remove_extent.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.21. Examples

    +

    Table 1.21. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_pointer.html b/doc/html/boost_typetraits/reference/remove_pointer.html index b5736c4..af472a0 100644 --- a/doc/html/boost_typetraits/reference/remove_pointer.html +++ b/doc/html/boost_typetraits/reference/remove_pointer.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.22. Examples

    +

    Table 1.22. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_reference.html b/doc/html/boost_typetraits/reference/remove_reference.html index 57118d8..26e32f3 100644 --- a/doc/html/boost_typetraits/reference/remove_reference.html +++ b/doc/html/boost_typetraits/reference/remove_reference.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.23. Examples

    +

    Table 1.23. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_volatile.html b/doc/html/boost_typetraits/reference/remove_volatile.html index 20cc90f..3e7771b 100644 --- a/doc/html/boost_typetraits/reference/remove_volatile.html +++ b/doc/html/boost_typetraits/reference/remove_volatile.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.24. Examples

    +

    Table 1.24. Examples

    diff --git a/doc/html/index.html b/doc/html/index.html index 2e1bab5..d3dab47 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -30,7 +30,7 @@ Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert Ramey and Jeremy Siek

    -

    +

    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)

    diff --git a/doc/value_traits.qbk b/doc/value_traits.qbk index beaa664..070f8a3 100644 --- a/doc/value_traits.qbk +++ b/doc/value_traits.qbk @@ -31,43 +31,43 @@ then use the `std::numeric_limits template` instead. [*Synopsis:] template - struct __is_array; + struct __is_array; template - struct __is_class; + struct __is_class; template - struct __is_complex; + struct __is_complex; template - struct __is_enum; + struct __is_enum; template - struct __is_floating_point; + struct __is_floating_point; template - struct __is_function; + struct __is_function; template - struct __is_integral; + struct __is_integral; template - struct __is_member_function_pointer; + struct __is_member_function_pointer; template - struct __is_member_object_pointer; + struct __is_member_object_pointer; template - struct __is_pointer; + struct __is_pointer; template - struct __is_reference; + struct __is_reference; template - struct __is_union; + struct __is_union; template - struct __is_void; + struct __is_void; The following traits are made up of the union of one or more type categorizations. A type may belong to more than one of these categories, From 2d7661d66114dec9a58b218c487628da4a07e386 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 7 Oct 2008 17:17:55 +0000 Subject: [PATCH 24/92] Fixes 2346. Patches for the codegear compiler, with intrinsic type_traits support enabled. [SVN r49169] --- include/boost/type_traits/add_pointer.hpp | 2 +- include/boost/type_traits/config.hpp | 2 +- include/boost/type_traits/extent.hpp | 13 ++++++++- include/boost/type_traits/intrinsics.hpp | 29 +++++++++++++++++++ include/boost/type_traits/is_arithmetic.hpp | 8 +++++ include/boost/type_traits/is_array.hpp | 5 ++-- .../boost/type_traits/is_base_and_derived.hpp | 4 +++ include/boost/type_traits/is_compound.hpp | 6 ++++ include/boost/type_traits/is_const.hpp | 8 +++-- include/boost/type_traits/is_function.hpp | 10 ++++++- include/boost/type_traits/is_fundamental.hpp | 4 +++ include/boost/type_traits/is_integral.hpp | 5 ++++ .../is_member_function_pointer.hpp | 4 ++- .../boost/type_traits/is_member_pointer.hpp | 4 ++- include/boost/type_traits/is_pointer.hpp | 4 ++- include/boost/type_traits/is_reference.hpp | 6 ++-- include/boost/type_traits/is_signed.hpp | 8 +++++ include/boost/type_traits/is_unsigned.hpp | 9 +++++- include/boost/type_traits/is_void.hpp | 5 ++++ include/boost/type_traits/is_volatile.hpp | 6 ++-- include/boost/type_traits/rank.hpp | 8 +++++ .../boost/type_traits/remove_all_extents.hpp | 2 +- include/boost/type_traits/remove_bounds.hpp | 2 +- include/boost/type_traits/remove_extent.hpp | 2 +- .../boost/type_traits/remove_reference.hpp | 2 +- .../boost/type_traits/type_with_alignment.hpp | 2 ++ 26 files changed, 140 insertions(+), 20 deletions(-) mode change 100755 => 100644 include/boost/type_traits/extent.hpp mode change 100755 => 100644 include/boost/type_traits/is_signed.hpp mode change 100755 => 100644 include/boost/type_traits/is_unsigned.hpp mode change 100755 => 100644 include/boost/type_traits/rank.hpp mode change 100755 => 100644 include/boost/type_traits/remove_all_extents.hpp mode change 100755 => 100644 include/boost/type_traits/remove_extent.hpp diff --git a/include/boost/type_traits/add_pointer.hpp b/include/boost/type_traits/add_pointer.hpp index 308baf0..3e0e481 100644 --- a/include/boost/type_traits/add_pointer.hpp +++ b/include/boost/type_traits/add_pointer.hpp @@ -18,7 +18,7 @@ namespace boost { namespace detail { -#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) +#if defined(__BORLANDC__) && (__BORLANDC__ < 0x5A0) // // For some reason this implementation stops Borlands compiler // from dropping cv-qualifiers, it still fails with references diff --git a/include/boost/type_traits/config.hpp b/include/boost/type_traits/config.hpp index 7f98789..94f1376 100644 --- a/include/boost/type_traits/config.hpp +++ b/include/boost/type_traits/config.hpp @@ -30,7 +30,7 @@ || BOOST_WORKAROUND(BOOST_MSVC, <= 1301) \ || !defined(__EDG_VERSION__) && BOOST_WORKAROUND(__GNUC__, < 3) \ || BOOST_WORKAROUND(__IBMCPP__, < 600 ) \ - || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) \ + || BOOST_WORKAROUND(__BORLANDC__, < 0x5A0) \ || defined(__ghs) \ || BOOST_WORKAROUND(__HP_aCC, < 60700) \ || BOOST_WORKAROUND(MPW_CPLUS, BOOST_TESTED_AT(0x890)) \ diff --git a/include/boost/type_traits/extent.hpp b/include/boost/type_traits/extent.hpp old mode 100755 new mode 100644 index 196d826..27e8a67 --- a/include/boost/type_traits/extent.hpp +++ b/include/boost/type_traits/extent.hpp @@ -17,6 +17,15 @@ namespace boost { namespace detail{ +#if defined( __CODEGEARC__ ) + // wrap the impl as main trait provides additional MPL lambda support + template < typename T, std::size_t N > + struct extent_imp { + static const std::size_t value = __array_extent(T, N); + }; + +#else + template struct extent_imp { @@ -114,7 +123,9 @@ struct extent_imp }; #endif #endif -} + +#endif // non-CodeGear implementation +} // ::boost::detail template struct extent diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 316a966..3458b9f 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -153,6 +153,35 @@ # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif +# if defined(__CODEGEARC__) +# include +# include +# include +# include + +# define BOOST_IS_UNION(T) __is_union(T) +# define BOOST_IS_POD(T) __is_pod(T) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T) || is_void::value) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T) && !is_volatile::value && !is_reference::value || is_void::value) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value || is_void::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || is_void::value) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T) || is_void::value) +# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T) && !is_volatile::value && !is_reference::value || is_void::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value || is_void::value) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_void::value && !is_void::value) +# define BOOST_IS_CLASS(T) __is_class(T) +# define BOOST_IS_CONVERTIBLE(T,U) (__is_convertible(T,U) || is_void::value) +# define BOOST_IS_ENUM(T) __is_enum(T) +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +# define BOOST_ALIGNMENT_OF(T) alignof(T) + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + #ifndef BOOST_IS_UNION # define BOOST_IS_UNION(T) false #endif diff --git a/include/boost/type_traits/is_arithmetic.hpp b/include/boost/type_traits/is_arithmetic.hpp index be881c5..a1d8c46 100644 --- a/include/boost/type_traits/is_arithmetic.hpp +++ b/include/boost/type_traits/is_arithmetic.hpp @@ -9,16 +9,19 @@ #ifndef BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED #define BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED +#if !defined( __CODEGEARC__ ) #include #include #include #include +#endif // should be the last #include #include namespace boost { +#if !defined(__CODEGEARC__) namespace detail { template< typename T > @@ -32,9 +35,14 @@ struct is_arithmetic_impl }; } // namespace detail +#endif //* is a type T an arithmetic type described in the standard (3.9.1p8) +#if defined(__CODEGEARC__) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_arithmetic,T,__is_arithmetic(T)) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_arithmetic,T,::boost::detail::is_arithmetic_impl::value) +#endif } // namespace boost diff --git a/include/boost/type_traits/is_array.hpp b/include/boost/type_traits/is_array.hpp index 24a2a90..e9e820a 100644 --- a/include/boost/type_traits/is_array.hpp +++ b/include/boost/type_traits/is_array.hpp @@ -28,8 +28,9 @@ namespace boost { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,__is_array(T)) +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,false) #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T[N],true) diff --git a/include/boost/type_traits/is_base_and_derived.hpp b/include/boost/type_traits/is_base_and_derived.hpp index 57a5113..8367b76 100644 --- a/include/boost/type_traits/is_base_and_derived.hpp +++ b/include/boost/type_traits/is_base_and_derived.hpp @@ -240,6 +240,10 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_a BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_and_derived,Base&,Derived&,false) #endif +#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610)) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename Base,is_base_and_derived,Base,Base,false) +#endif + } // namespace boost #include diff --git a/include/boost/type_traits/is_compound.hpp b/include/boost/type_traits/is_compound.hpp index 01c38a7..bbaaa42 100644 --- a/include/boost/type_traits/is_compound.hpp +++ b/include/boost/type_traits/is_compound.hpp @@ -18,6 +18,7 @@ namespace boost { +#if !defined( __CODEGEARC__ ) namespace detail { template @@ -30,8 +31,13 @@ struct is_compound_impl }; } // namespace detail +#endif // !defined( __CODEGEARC__ ) +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_compound,T,__is_compound(T)) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_compound,T,::boost::detail::is_compound_impl::value) +#endif } // namespace boost diff --git a/include/boost/type_traits/is_const.hpp b/include/boost/type_traits/is_const.hpp index 18b13f0..e66d18a 100644 --- a/include/boost/type_traits/is_const.hpp +++ b/include/boost/type_traits/is_const.hpp @@ -44,7 +44,11 @@ namespace boost { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#if defined( __CODEGEARC__ ) + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,__is_const(T)) + +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) //* is a type T declared const - is_const #if BOOST_WORKAROUND(BOOST_MSVC, < 1400) @@ -54,7 +58,7 @@ namespace boost { #endif BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T&,false) -#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) +#if defined(BOOST_ILLEGAL_CV_REFERENCES) // these are illegal specialisations; cv-qualifies applied to // references have no effect according to [8.3.2p1], // C++ Builder requires them though as it treats cv-qualified diff --git a/include/boost/type_traits/is_function.hpp b/include/boost/type_traits/is_function.hpp index d6458c4..1fba1bd 100644 --- a/include/boost/type_traits/is_function.hpp +++ b/include/boost/type_traits/is_function.hpp @@ -32,6 +32,9 @@ // function pointers to void*. namespace boost { + +#if !defined( __CODEGEARC__ ) + namespace detail { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) @@ -86,8 +89,13 @@ struct is_function_impl : public false_type } // namespace detail -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_function,T,::boost::detail::is_function_impl::value) +#endif // !defined( __CODEGEARC__ ) +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_function,T,__is_function(T)) +#else +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_function,T,::boost::detail::is_function_impl::value) +#endif } // namespace boost #include diff --git a/include/boost/type_traits/is_fundamental.hpp b/include/boost/type_traits/is_fundamental.hpp index e163ba9..6aff7dd 100644 --- a/include/boost/type_traits/is_fundamental.hpp +++ b/include/boost/type_traits/is_fundamental.hpp @@ -32,7 +32,11 @@ struct is_fundamental_impl } // namespace detail //* is a type T a fundamental type described in the standard (3.9.1) +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_fundamental,T,__is_fundamental(T)) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_fundamental,T,::boost::detail::is_fundamental_impl::value) +#endif } // namespace boost diff --git a/include/boost/type_traits/is_integral.hpp b/include/boost/type_traits/is_integral.hpp index 51710c2..99420a9 100644 --- a/include/boost/type_traits/is_integral.hpp +++ b/include/boost/type_traits/is_integral.hpp @@ -19,6 +19,9 @@ namespace boost { //* is a type T an [cv-qualified-] integral type described in the standard (3.9.1p3) // as an extention we include long long, as this is likely to be added to the // standard at a later date +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_integral,T,__is_integral(T)) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_integral,T,false) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned char,true) @@ -66,6 +69,8 @@ BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int64,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int64,true) #endif +#endif // non-CodeGear implementation + } // namespace boost #include diff --git a/include/boost/type_traits/is_member_function_pointer.hpp b/include/boost/type_traits/is_member_function_pointer.hpp index f627511..3fff063 100644 --- a/include/boost/type_traits/is_member_function_pointer.hpp +++ b/include/boost/type_traits/is_member_function_pointer.hpp @@ -37,7 +37,9 @@ namespace boost { -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_function_pointer,T,__is_member_function_pointer( T )) +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) BOOST_TT_AUX_BOOL_TRAIT_DEF1( is_member_function_pointer diff --git a/include/boost/type_traits/is_member_pointer.hpp b/include/boost/type_traits/is_member_pointer.hpp index 1f9f5a7..cdf3d6a 100644 --- a/include/boost/type_traits/is_member_pointer.hpp +++ b/include/boost/type_traits/is_member_pointer.hpp @@ -40,7 +40,9 @@ namespace boost { -#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,__is_member_pointer(T)) +#elif BOOST_WORKAROUND(__BORLANDC__, < 0x600) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true) diff --git a/include/boost/type_traits/is_pointer.hpp b/include/boost/type_traits/is_pointer.hpp index db0701e..f6ecf33 100644 --- a/include/boost/type_traits/is_pointer.hpp +++ b/include/boost/type_traits/is_pointer.hpp @@ -42,7 +42,9 @@ namespace boost { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,__is_pointer(T)) +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) namespace detail { diff --git a/include/boost/type_traits/is_reference.hpp b/include/boost/type_traits/is_reference.hpp index 0eb0d4f..dcf84db 100644 --- a/include/boost/type_traits/is_reference.hpp +++ b/include/boost/type_traits/is_reference.hpp @@ -33,12 +33,14 @@ namespace boost { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,__is_reference(T)) +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_reference,T&,true) -#if defined(__BORLANDC__) && !defined(__COMO__) && (__BORLANDC__ < 0x600) +#if defined(BOOST_ILLEGAL_CV_REFERENCES) // these are illegal specialisations; cv-qualifies applied to // references have no effect according to [8.3.2p1], // C++ Builder requires them though as it treats cv-qualified diff --git a/include/boost/type_traits/is_signed.hpp b/include/boost/type_traits/is_signed.hpp old mode 100755 new mode 100644 index 1360b11..73389a1 --- a/include/boost/type_traits/is_signed.hpp +++ b/include/boost/type_traits/is_signed.hpp @@ -20,6 +20,8 @@ namespace boost { +#if !defined( __CODEGEARC__ ) + namespace detail{ #if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) @@ -110,7 +112,13 @@ template <> struct is_signed_imp : public true_type{}; } +#endif // !defined( __CODEGEARC__ ) + +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_signed,T,__is_signed(T)) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_signed,T,::boost::detail::is_signed_imp::value) +#endif } // namespace boost diff --git a/include/boost/type_traits/is_unsigned.hpp b/include/boost/type_traits/is_unsigned.hpp old mode 100755 new mode 100644 index 67cedc1..4866486 --- a/include/boost/type_traits/is_unsigned.hpp +++ b/include/boost/type_traits/is_unsigned.hpp @@ -20,6 +20,8 @@ namespace boost { +#if !defined( __CODEGEARC__ ) + namespace detail{ #if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) @@ -104,10 +106,15 @@ template <> struct is_unsigned_imp : public true_type{}; #endif - } +#endif // !defined( __CODEGEARC__ ) + +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_unsigned,T,__is_unsigned(T)) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_unsigned,T,::boost::detail::is_unsigned_imp::value) +#endif } // namespace boost diff --git a/include/boost/type_traits/is_void.hpp b/include/boost/type_traits/is_void.hpp index ca51b54..6f6fbff 100644 --- a/include/boost/type_traits/is_void.hpp +++ b/include/boost/type_traits/is_void.hpp @@ -17,6 +17,9 @@ namespace boost { //* is a type T void - is_void +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_void,T,__is_void(T)) +#else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_void,T,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void,true) @@ -26,6 +29,8 @@ BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void volatile,true) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void const volatile,true) #endif +#endif // non-CodeGear implementation + } // namespace boost #include diff --git a/include/boost/type_traits/is_volatile.hpp b/include/boost/type_traits/is_volatile.hpp index db473b5..7ab253a 100644 --- a/include/boost/type_traits/is_volatile.hpp +++ b/include/boost/type_traits/is_volatile.hpp @@ -41,7 +41,9 @@ namespace boost { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,__is_volatile(T)) +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) //* is a type T declared volatile - is_volatile #if BOOST_WORKAROUND(BOOST_MSVC, < 1400) @@ -51,7 +53,7 @@ namespace boost { #endif BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T&,false) -#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) +#if defined(BOOST_ILLEGAL_CV_REFERENCES) // these are illegal specialisations; cv-qualifies applied to // references have no effect according to [8.3.2p1], // C++ Builder requires them though as it treats cv-qualified diff --git a/include/boost/type_traits/rank.hpp b/include/boost/type_traits/rank.hpp old mode 100755 new mode 100644 index 4209d2d..77df41e --- a/include/boost/type_traits/rank.hpp +++ b/include/boost/type_traits/rank.hpp @@ -15,6 +15,8 @@ namespace boost { +#if !defined( __CODEGEARC__ ) + namespace detail{ template @@ -72,7 +74,13 @@ struct rank_imp #endif } +#endif // !defined( __CODEGEARC__ ) + +#if defined( __CODEGEARC__ ) +BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(rank,T,__array_rank(T)) +#else BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(rank,T,(::boost::detail::rank_imp::value)) +#endif } // namespace boost diff --git a/include/boost/type_traits/remove_all_extents.hpp b/include/boost/type_traits/remove_all_extents.hpp old mode 100755 new mode 100644 index 8ae18ee..64876e1 --- a/include/boost/type_traits/remove_all_extents.hpp +++ b/include/boost/type_traits/remove_all_extents.hpp @@ -31,7 +31,7 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_all_exte BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_all_extents,T const[N],typename boost::remove_all_extents::type type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_all_extents,T volatile[N],typename boost::remove_all_extents::type type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_all_extents,T const volatile[N],typename boost::remove_all_extents::type type) -#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_all_extents,T[],typename boost::remove_all_extents::type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_all_extents,T const[],typename boost::remove_all_extents::type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_all_extents,T volatile[],typename boost::remove_all_extents::type) diff --git a/include/boost/type_traits/remove_bounds.hpp b/include/boost/type_traits/remove_bounds.hpp index 1d7b436..ce12978 100644 --- a/include/boost/type_traits/remove_bounds.hpp +++ b/include/boost/type_traits/remove_bounds.hpp @@ -31,7 +31,7 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T const[N],T const type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T volatile[N],T volatile type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T const volatile[N],T const volatile type) -#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T[],T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T const[],T const) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T volatile[],T volatile) diff --git a/include/boost/type_traits/remove_extent.hpp b/include/boost/type_traits/remove_extent.hpp old mode 100755 new mode 100644 index 32dee6f..b4c7d41 --- a/include/boost/type_traits/remove_extent.hpp +++ b/include/boost/type_traits/remove_extent.hpp @@ -31,7 +31,7 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_extent,T BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_extent,T const[N],T const type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_extent,T volatile[N],T volatile type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_extent,T const volatile[N],T const volatile type) -#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_extent,T[],T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_extent,T const[],T const) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_extent,T volatile[],T volatile) diff --git a/include/boost/type_traits/remove_reference.hpp b/include/boost/type_traits/remove_reference.hpp index 3d0b707..8fddc46 100644 --- a/include/boost/type_traits/remove_reference.hpp +++ b/include/boost/type_traits/remove_reference.hpp @@ -27,7 +27,7 @@ namespace boost { BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T&,T) -#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) +#if defined(BOOST_ILLEGAL_CV_REFERENCES) // these are illegal specialisations; cv-qualifies applied to // references have no effect according to [8.3.2p1], // C++ Builder requires them though as it treats cv-qualified diff --git a/include/boost/type_traits/type_with_alignment.hpp b/include/boost/type_traits/type_with_alignment.hpp index 063bf32..d790ee1 100644 --- a/include/boost/type_traits/type_with_alignment.hpp +++ b/include/boost/type_traits/type_with_alignment.hpp @@ -357,10 +357,12 @@ namespace detail { typedef ::boost::align::a16 max_align; +//#if ! BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610)) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a2,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a4,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a8,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a16,true) +//#endif } template struct type_with_alignment From 5490bf61f31d0ab56de18b03a15d42fb38813312 Mon Sep 17 00:00:00 2001 From: "Michael A. Jackson" Date: Sat, 1 Nov 2008 13:15:41 +0000 Subject: [PATCH 25/92] Continuing merge of CMake build system files into trunk with the encouragement of Doug Gregor [SVN r49510] --- CMakeLists.txt | 34 ++++++++++++++++++++++++++++++++++ module.cmake | 1 + test/CMakeLists.txt | 7 +++++++ 3 files changed, 42 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 module.cmake create mode 100644 test/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..564e1bf --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,34 @@ +#---------------------------------------------------------------------------- +# This file was automatically generated from the original CMakeLists.txt file +# Add a variable to hold the headers for the library +set (lib_headers + type_traits.hpp + type_traits +) + +# Add a library target to the build system +boost_library_project( + type_traits + # SRCDIRS + TESTDIRS test + HEADERS ${lib_headers} + # DOCDIRS + DESCRIPTION "Templates for fundamental properties of types." + MODULARIZED + AUTHORS "David Abrahams " + "Steve Cleary" + "Beman Dawes " + "Aleksey Gurtovoy " + "Howard Hinnant" + "Jesse Jones" + "Mat Marcus" + "Itay Maman" + "John Maddock " + "Alexander Nasonov " + "Thorsten Ottosen " + "Robert Ramey " + "Jeremy Siek " + # MAINTAINERS +) + + diff --git a/module.cmake b/module.cmake new file mode 100644 index 0000000..c1f1b3c --- /dev/null +++ b/module.cmake @@ -0,0 +1 @@ +boost_module(type_traits DEPENDS config static_assert) \ No newline at end of file diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..77c2a68 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,7 @@ +file(GLOB TEST_FILES "*_test.cpp") +foreach(TEST_FILE ${TEST_FILES}) + get_filename_component(TEST_NAME ${TEST_FILE} NAME_WE) + boost_test_run(${TEST_NAME}) +endforeach(TEST_FILE ${TEST_FILES}) + +boost_test_run(udt_specialisations) From 03d9c110267183a78f2dfbb0bd74b6353fc7fdaf Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 12 Nov 2008 18:13:36 +0000 Subject: [PATCH 26/92] Fix 32-bit Linux alignment_of failure. [SVN r49704] --- include/boost/type_traits/intrinsics.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 3458b9f..1e7d250 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -148,7 +148,12 @@ # define BOOST_IS_CLASS(T) __is_class(T) # define BOOST_IS_ENUM(T) __is_enum(T) # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) -# define BOOST_ALIGNMENT_OF(T) __alignof__(T) +# if !defined(unix) || defined(__LP64__) + // GCC sometimes lies about alignment requirements + // of type double on 32-bit unix platforms, use the + // old implementation instead in that case: +# define BOOST_ALIGNMENT_OF(T) __alignof__(T) +# endif # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif From 2e8f5e6a1423491775b6df3d9e6c100ad6ef53e1 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 23 Dec 2008 16:16:37 +0000 Subject: [PATCH 27/92] Disable intrinsic support for GCC-XML. [SVN r50373] --- include/boost/type_traits/intrinsics.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 1e7d250..0de96b2 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -126,7 +126,7 @@ # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif -#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))) +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) # include # include # include From 534e3294dc9bde5b77a3d261daacfa107527f448 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 29 Dec 2008 16:42:35 +0000 Subject: [PATCH 28/92] is_class requires remove_cv even when using intrinsics if the compiler is EDG based. [SVN r50401] --- include/boost/type_traits/is_class.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/type_traits/is_class.hpp b/include/boost/type_traits/is_class.hpp index 63a0c6a..1a2cd20 100644 --- a/include/boost/type_traits/is_class.hpp +++ b/include/boost/type_traits/is_class.hpp @@ -27,10 +27,11 @@ # include #endif +#endif // BOOST_IS_CLASS + #ifdef __EDG_VERSION__ # include #endif -#endif // BOOST_IS_CLASS // should be the last #include #include From 0e8f2434caddceb87ac8a5a7b405840719d9345f Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 30 Dec 2008 13:25:26 +0000 Subject: [PATCH 29/92] MSVC's __alignof operator doesn't always do the right thing: disable for now. [SVN r50410] --- include/boost/type_traits/intrinsics.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 0de96b2..91ee88b 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -105,7 +105,8 @@ # define BOOST_IS_ENUM(T) __is_enum(T) // This one doesn't quite always do the right thing: // # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) -# define BOOST_ALIGNMENT_OF(T) __alignof(T) +// This one fails if the default alignment has been changed with /Zp: +// # define BOOST_ALIGNMENT_OF(T) __alignof(T) # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif From 101527367aea88cf35dd4736076bd54bf5a734bb Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 13 Jan 2009 12:49:42 +0000 Subject: [PATCH 30/92] Fix msvc regression and add additional tests to check issue #1946 fix. [SVN r50559] --- include/boost/type_traits/alignment_of.hpp | 13 ++- test/aligned_storage_test_a2.cpp | 113 +++++++++++++++++++++ test/alignment_of_test_a2.cpp | 113 +++++++++++++++++++++ 3 files changed, 238 insertions(+), 1 deletion(-) create mode 100644 test/aligned_storage_test_a2.cpp create mode 100644 test/alignment_of_test_a2.cpp diff --git a/include/boost/type_traits/alignment_of.hpp b/include/boost/type_traits/alignment_of.hpp index 9739f14..564d3bb 100644 --- a/include/boost/type_traits/alignment_of.hpp +++ b/include/boost/type_traits/alignment_of.hpp @@ -56,7 +56,18 @@ struct alignment_logic template< typename T > struct alignment_of_impl { -#ifndef BOOST_ALIGNMENT_OF +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) + // + // With MSVC both the native __alignof operator + // and our own logic gets things wrong from time to time :-( + // Using a combination of the two seems to make the most of a bad job: + // + BOOST_STATIC_CONSTANT(std::size_t, value = + (::boost::detail::alignment_logic< + sizeof(::boost::detail::alignment_of_hack) - sizeof(T), + __alignof(T) + >::value)); +#elif !defined(BOOST_ALIGNMENT_OF) BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::alignment_logic< sizeof(::boost::detail::alignment_of_hack) - sizeof(T), diff --git a/test/aligned_storage_test_a2.cpp b/test/aligned_storage_test_a2.cpp new file mode 100644 index 0000000..47fe3c4 --- /dev/null +++ b/test/aligned_storage_test_a2.cpp @@ -0,0 +1,113 @@ + +#ifdef _MSC_VER +#pragma pack(2) +#endif + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to 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 "test.hpp" +#include "check_integral_constant.hpp" +#ifdef TEST_STD +# include +# include // max_align and long_long_type +#else +# include +# include +# include +#endif + +template +union must_be_pod +{ + int i; + T t; +}; + +template +inline void no_unused_warning(const volatile T&) +{ +} + +template +void check(const T&) +{ + typedef typename tt::aligned_storage::type t1; + t1 as1 = { 0, }; + must_be_pod pod1; + no_unused_warning(as1); + no_unused_warning(pod1); + BOOST_MESSAGE(typeid(t1).name()); + BOOST_CHECK(::tt::alignment_of::value == T::value); + BOOST_CHECK(sizeof(t1) == T::value); +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + BOOST_CHECK(::tt::is_pod::value == true); +#endif + typedef typename tt::aligned_storage::type t2; + t2 as2 = { 0, }; + must_be_pod pod2; + no_unused_warning(as2); + no_unused_warning(pod2); + BOOST_MESSAGE(typeid(t2).name()); + BOOST_CHECK(::tt::alignment_of::value == T::value); + BOOST_CHECK(sizeof(t2) == T::value*2); +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + BOOST_CHECK(::tt::is_pod::value == true); +#endif + +#ifndef TEST_STD + // Non-Tr1 behaviour: + typedef typename tt::aligned_storage::type t3; + t3 as3 = { 0, }; + must_be_pod pod3; + no_unused_warning(as3); + no_unused_warning(pod3); + BOOST_MESSAGE(typeid(t3).name()); + BOOST_CHECK(::tt::alignment_of::value == ::tt::alignment_of< ::boost::detail::max_align>::value); + BOOST_CHECK((sizeof(t3) % T::value) == 0); +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + BOOST_CHECK(::tt::is_pod::value == true); +#endif +#endif +} + +TT_TEST_BEGIN(type_with_alignment) + +check(tt::integral_constant::value>()); +check(tt::integral_constant::value>()); +check(tt::integral_constant::value>()); +check(tt::integral_constant::value>()); +check(tt::integral_constant::value>()); +check(tt::integral_constant::value>()); +check(tt::integral_constant::value>()); + +#ifdef BOOST_HAS_LONG_LONG +check(tt::integral_constant::value>()); +#endif +#ifdef BOOST_HAS_MS_INT64 +check(tt::integral_constant::value>()); +#endif +check(tt::integral_constant::value>()); +check(tt::integral_constant::value>()); +check(tt::integral_constant::value>()); +check(tt::integral_constant::value>()); +check(tt::integral_constant::value>()); +check(tt::integral_constant::value>()); +check(tt::integral_constant::value>()); +check(tt::integral_constant::value>()); +check(tt::integral_constant::value>()); +check(tt::integral_constant::value>()); +check(tt::integral_constant::value>()); + +TT_TEST_END + + + + + + + + + diff --git a/test/alignment_of_test_a2.cpp b/test/alignment_of_test_a2.cpp new file mode 100644 index 0000000..72a1109 --- /dev/null +++ b/test/alignment_of_test_a2.cpp @@ -0,0 +1,113 @@ + +#ifdef _MSC_VER +#pragma pack(2) +#endif + +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to 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 "test.hpp" +#include "check_integral_constant.hpp" +#ifdef TEST_STD +# include +#else +# include +#endif + +// +// VC++ emits an awful lot of warnings unless we define these: +#ifdef BOOST_MSVC +# pragma warning(disable:4244) +// +// What follows here is the test case for issue 1946. +// +#include +// This kind of packing is set within MSVC 9.0 headers. +// E.g. std::ostream has it. +#pragma pack(push,8) + +// The issue is gone if Root has no data members +struct Root { int a; }; +// The issue is gone if Root is inherited non-virtually +struct A : virtual public Root {}; + +#pragma pack(pop) +// +// This class has 8-byte alignment but is 44 bytes in size, which means +// that elements in an array of this type will not actually be 8 byte +// aligned. This appears to be an MSVC bug, and throws off our +// alignment calculations: causing us to report a non-sensical 12-byte +// alignment for this type. This is fixed by using the native __alignof +// operator. +// +class issue1946 : + public A +{ +public: + // The issue is gone if the type is not a boost::function. The signature doesn't matter. + typedef boost::function0< void > function_type; + function_type m_function; +}; + +#endif + + +template +struct align_calc +{ + char padding; + T instance; + static std::ptrdiff_t get() + { + static align_calc a; + return reinterpret_cast(&(a.instance)) - reinterpret_cast(&(a.padding)); + } +}; + +#define ALIGNOF(x) align_calc< x>::get() + +TT_TEST_BEGIN(alignment_of) + +#ifndef TEST_STD +// This test is not required to work for non-boost implementations: +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, 0); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(char)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(short)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(int)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(long)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(float)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(double)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(long double)); +#ifdef BOOST_HAS_LONG_LONG +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of< ::boost::long_long_type>::value, ALIGNOF(::boost::long_long_type)); +#endif +#ifdef BOOST_HAS_MS_INT64 +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of<__int64>::value, ALIGNOF(__int64)); +#endif +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(int[4])); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(int(*)(int))); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(int*)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(VB)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(VD)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(enum_UDT)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(mf2)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(POD_UDT)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(empty_UDT)); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(union_UDT)); + +#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::alignment_of::value, ALIGNOF(issue1946)); +#endif + +TT_TEST_END + + + + + + + + From 769487b134dd3d08cd56fed5928920f07bc3a731 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 8 Feb 2009 10:32:08 +0000 Subject: [PATCH 31/92] Fixes #2591. Also fixed formatting issue in alignment_of.qbk. Regenerated docs. [SVN r51083] --- doc/alignment_of.qbk | 2 +- doc/html/boost_typetraits/background.html | 98 +++++++++---------- doc/html/boost_typetraits/category.html | 6 +- .../boost_typetraits/category/alignment.html | 14 +-- .../boost_typetraits/category/function.html | 12 +-- .../boost_typetraits/category/transform.html | 46 ++++----- .../category/value_traits.html | 14 +-- .../category/value_traits/primary.html | 52 +++++----- .../category/value_traits/properties.html | 54 +++++----- .../category/value_traits/relate.html | 12 +-- doc/html/boost_typetraits/credits.html | 8 +- doc/html/boost_typetraits/examples.html | 6 +- doc/html/boost_typetraits/examples/copy.html | 14 +-- .../boost_typetraits/examples/destruct.html | 12 +-- doc/html/boost_typetraits/examples/fill.html | 16 +-- doc/html/boost_typetraits/examples/iter.html | 18 ++-- .../boost_typetraits/examples/to_double.html | 6 +- doc/html/boost_typetraits/intrinsics.html | 36 +++---- doc/html/boost_typetraits/intro.html | 10 +- doc/html/boost_typetraits/mpl.html | 12 +-- doc/html/boost_typetraits/reference.html | 6 +- .../boost_typetraits/reference/add_const.html | 10 +- .../boost_typetraits/reference/add_cv.html | 10 +- .../reference/add_pointer.html | 10 +- .../reference/add_reference.html | 10 +- .../reference/add_volatile.html | 10 +- .../reference/aligned_storage.html | 6 +- .../reference/alignment_of.html | 19 ++-- .../boost_typetraits/reference/decay.html | 8 +- .../boost_typetraits/reference/extent.html | 16 +-- .../reference/floating_point_promotion.html | 8 +- .../reference/function_traits.html | 12 +-- .../reference/has_no_throw_def_cons.html | 8 +- .../reference/has_nothrow_assign.html | 12 +-- .../reference/has_nothrow_constructor.html | 16 +-- .../reference/has_nothrow_copy.html | 16 +-- .../reference/has_nothrow_cp_cons.html | 8 +- .../reference/has_trivial_assign.html | 18 ++-- .../reference/has_trivial_constructor.html | 20 ++-- .../reference/has_trivial_copy.html | 20 ++-- .../reference/has_trivial_cp_cons.html | 8 +- .../reference/has_trivial_def_cons.html | 8 +- .../reference/has_trivial_destructor.html | 18 ++-- .../reference/has_virtual_destructor.html | 18 ++-- .../reference/integral_constant.html | 6 +- .../reference/integral_promotion.html | 8 +- .../reference/is_abstract.html | 18 ++-- .../reference/is_arithmetic.html | 20 ++-- .../boost_typetraits/reference/is_array.html | 16 +-- .../reference/is_base_of.html | 18 ++-- .../boost_typetraits/reference/is_class.html | 22 ++--- .../reference/is_complex.html | 8 +- .../reference/is_compound.html | 18 ++-- .../boost_typetraits/reference/is_const.html | 16 +-- .../reference/is_convertible.html | 18 ++-- .../boost_typetraits/reference/is_empty.html | 18 ++-- .../boost_typetraits/reference/is_enum.html | 18 ++-- .../reference/is_floating_point.html | 16 +-- .../reference/is_function.html | 24 ++--- .../reference/is_fundamental.html | 22 ++--- .../reference/is_integral.html | 16 +-- .../reference/is_member_function_pointer.html | 20 ++-- .../reference/is_member_object_pointer.html | 20 ++-- .../reference/is_member_pointer.html | 16 +-- .../boost_typetraits/reference/is_object.html | 16 +-- .../boost_typetraits/reference/is_pod.html | 16 +-- .../reference/is_pointer.html | 16 +-- .../reference/is_polymorphic.html | 16 +-- .../reference/is_reference.html | 16 +-- .../boost_typetraits/reference/is_same.html | 16 +-- .../boost_typetraits/reference/is_scalar.html | 16 +-- .../boost_typetraits/reference/is_signed.html | 16 +-- .../reference/is_stateless.html | 16 +-- .../boost_typetraits/reference/is_union.html | 20 ++-- .../reference/is_unsigned.html | 16 +-- .../boost_typetraits/reference/is_void.html | 16 +-- .../reference/is_volatile.html | 16 +-- .../reference/make_signed.html | 8 +- .../reference/make_unsigned.html | 18 ++-- .../boost_typetraits/reference/promote.html | 12 +-- doc/html/boost_typetraits/reference/rank.html | 14 +-- .../reference/remove_all_extents.html | 10 +- .../reference/remove_const.html | 10 +- .../boost_typetraits/reference/remove_cv.html | 10 +- .../reference/remove_extent.html | 10 +- .../reference/remove_pointer.html | 10 +- .../reference/remove_reference.html | 10 +- .../reference/remove_volatile.html | 10 +- .../reference/type_with_alignment.html | 6 +- doc/html/boost_typetraits/user_defined.html | 18 ++-- doc/html/index.html | 6 +- doc/make_unsigned.qbk | 10 +- 92 files changed, 728 insertions(+), 727 deletions(-) diff --git a/doc/alignment_of.qbk b/doc/alignment_of.qbk index eef3283..97c6bf3 100644 --- a/doc/alignment_of.qbk +++ b/doc/alignment_of.qbk @@ -9,7 +9,7 @@ template struct alignment_of : public __integral_constant {}; -__inherit Class template alignment_of inherits from +__inherit Class template `alignment_of` inherits from `__integral_constant`, where `ALIGNOF(T)` is the alignment of type T. diff --git a/doc/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index adca6a4..9f5e61f 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -3,8 +3,8 @@ Background and Tutorial - - + + @@ -24,7 +24,7 @@

    The following is an updated version of the article "C++ Type traits" @@ -56,19 +56,19 @@ method available to them.

    - - Type Traits + + Type Traits

    Class char_traits is a classic example of a collection of type specific properties wrapped up in a single - class - what Nathan Myers termed a baggage class[1]. In the Boost type-traits library, - we[2] have written a set of very + class - what Nathan Myers termed a baggage class[1]. In the Boost type-traits library, + we[2] have written a set of very specific traits classes, each of which encapsulate a single trait from the C++ type system; for example, is a type a pointer or a reference type? Or does a type have a trivial constructor, or a const-qualifier? The type-traits classes - share a unified design: each class inherits from a the type true_type - if the type has the specified property and inherits from false_type + share a unified design: each class inherits from a the type true_type + if the type has the specified property and inherits from false_type otherwise. As we will show, these classes can be used in generic programming to determine the properties of a given type and introduce optimizations that are appropriate for that case. @@ -84,8 +84,8 @@ given.

    - - Implementation + + Implementation

    There are far too many separate classes contained in the type-traits library @@ -94,17 +94,17 @@ anyway, so here we will just give you a flavor for how some of the classes are implemented. Beginning with possibly the simplest class in the library, is_void<T> inherits - from true_type + from true_type only if T is void.

    template <typename T> 
    -struct is_void : public false_type{};
    +struct is_void : public false_type{};
     
     template <> 
    -struct is_void<void> : public true_type{};
    +struct is_void<void> : public true_type{};
     

    - Here we define a primary version of the template class is_void, + Here we define a primary version of the template class is_void, and provide a full-specialization when T is void. While full specialization of a template class is an important technique, sometimes we need a solution @@ -116,10 +116,10 @@ a pointer:

    template <typename T> 
    -struct is_pointer : public false_type{};
    +struct is_pointer : public false_type{};
     
     template <typename T> 
    -struct is_pointer<T*> : public true_type{};
    +struct is_pointer<T*> : public true_type{};
     

    The syntax for partial specialization is somewhat arcane and could easily occupy @@ -155,17 +155,17 @@ is an example of a traits class that performs a transformation on a type:

    template <typename T> 
    -struct remove_extent
    +struct remove_extent
     { typedef T type; };
     
     template <typename T, std::size_t N> 
    -struct remove_extent<T[N]>
    +struct remove_extent<T[N]>
     { typedef T type; };
     

    - The aim of remove_extent + The aim of remove_extent is this: imagine a generic algorithm that is passed an array type as a template - parameter, remove_extent + parameter, remove_extent provides a means of determining the underlying type of the array. For example remove_extent<int[4][5]>::type would evaluate to the type int[5]. This example also shows that the number of template parameters in a partial specialization does not have to match the @@ -174,8 +174,8 @@ in the default template.

    - - Optimized copy + + Optimized copy

    As an example of how the type traits classes can be used, consider the standard @@ -208,7 +208,7 @@

    - By trivial assignment operator we mean that the type is either a scalar type[3] or: + By trivial assignment operator we mean that the type is either a scalar type[3] or:

    • @@ -224,20 +224,20 @@

    If all these conditions are met then a type can be copied using memcpy rather than using a compiler generated - assignment operator. The type-traits library provides a class has_trivial_assign, + assignment operator. The type-traits library provides a class has_trivial_assign, such that has_trivial_assign<T>::value is true only if T has a trivial assignment operator. This class "just works" for scalar types, but has to be explicitly specialised for class/struct types that also happen to have a trivial - assignment operator. In other words if has_trivial_assign + assignment operator. In other words if has_trivial_assign gives the wrong answer, it will give the "safe" wrong answer - that trivial assignment is not allowable.

    The code for an optimized version of copy that uses memcpy - where appropriate is given in the + where appropriate is given in the examples. The code begins by defining a template function do_copy that performs a "slow but safe" - copy. The last parameter passed to this function may be either a true_type - or a false_type. + copy. The last parameter passed to this function may be either a true_type + or a false_type. Following that there is an overload of docopy that uses `memcpy`: this time the iterators are required to actually be pointers to the same type, and the final parameter must be a `_true_type. Finally, the version @@ -247,15 +247,15 @@ otherwise it will call the "slow but safe version".

    - - Was it worth it? + + Was it worth it?

    It has often been repeated in these columns that "premature optimization - is the root of all evil" [4]. + is the root of all evil" [4]. So the question must be asked: was our optimization premature? To put this in perspective the timings for our version of copy compared a conventional - generic copy[5] are shown in table + generic copy[5] are shown in table 1.

    @@ -280,7 +280,7 @@

    -

    Table 1.1. Time taken to copy 1000 elements using `copy<const +

    Table 1.1. Time taken to copy 1000 elements using `copy<const T*, T*>` (times in micro-seconds)

    @@ -379,8 +379,8 @@

    - - Pair of References + + Pair of References

    The optimized copy example shows how type traits may be used to perform optimization @@ -388,7 +388,7 @@ code to compile that otherwise would not do so unless excessive partial specialization is used. This is possible by delegating partial specialization to the type traits classes. Our example for this form of usage is a pair that can hold - references [6]. + references [6].

    First, let us examine the definition of std::pair, omitting @@ -411,12 +411,12 @@

    Now, this "pair" cannot hold references as it currently stands, because the constructor would require taking a reference to a reference, which is currently - illegal [7]. Let us consider what + illegal [7]. Let us consider what the constructor's parameters would have to be in order to allow "pair" to hold non-reference types, references, and constant references:

    -

    Table 1.2. Required Constructor Argument Types

    +

    Table 1.2. Required Constructor Argument Types

    @@ -477,11 +477,11 @@

    A little familiarity with the type traits classes allows us to construct a single mapping that allows us to determine the type of parameter from the type - of the contained class. The type traits classes provide a transformation add_reference, which + of the contained class. The type traits classes provide a transformation add_reference, which adds a reference to its type, unless it is already a reference.

    -

    Table 1.3. Using add_reference to synthesize the correct constructor +

    Table 1.3. Using add_reference to synthesize the correct constructor type

    @@ -576,8 +576,8 @@ T1 first; T2 second; -pair(boost::add_reference<const T1>::type nfirst, - boost::add_reference<const T2>::type nsecond) +pair(boost::add_reference<const T1>::type nfirst, + boost::add_reference<const T2>::type nsecond) :first(nfirst), second(nsecond) { } }; @@ -598,8 +598,8 @@ easier to maintain and easier to understand.

    - - Conclusion + + Conclusion

    We hope that in this article we have been able to give you some idea of what @@ -611,16 +611,16 @@ can be optimal as well as generic.

    - - Acknowledgements + + Acknowledgements

    The authors would like to thank Beman Dawes and Howard Hinnant for their helpful comments when preparing this article.

    - - References + + References
    1. diff --git a/doc/html/boost_typetraits/category.html b/doc/html/boost_typetraits/category.html index 43f6f85..34d9532 100644 --- a/doc/html/boost_typetraits/category.html +++ b/doc/html/boost_typetraits/category.html @@ -3,8 +3,8 @@ Type Traits by Category - - + + @@ -24,7 +24,7 @@

    Some low level memory management routines need to synthesize a POD type with - specific alignment properties. The template type_with_alignment - finds the smallest type with a specified alignment, while template aligned_storage + specific alignment properties. The template type_with_alignment + finds the smallest type with a specified alignment, while template aligned_storage creates a type with a specific size and alignment.

    Synopsis

    template <std::size_t Align>
    -struct type_with_alignment;
    +struct type_with_alignment;
     
     template <std::size_t Size, std::size_t Align>
    -struct aligned_storage;
    +struct aligned_storage;
     
    diff --git a/doc/html/boost_typetraits/category/function.html b/doc/html/boost_typetraits/category/function.html index 88854ff..e826dc4 100644 --- a/doc/html/boost_typetraits/category/function.html +++ b/doc/html/boost_typetraits/category/function.html @@ -3,8 +3,8 @@ Decomposing Function Types - - + + @@ -24,12 +24,12 @@

    - The class template function_traits - extracts information from function types (see also is_function). + The class template function_traits + extracts information from function types (see also is_function). This traits class allows you to tell how many arguments a function takes, what those argument types are, and what the return type is.

    @@ -37,7 +37,7 @@ Synopsis

    template <std::size_t Align>
    -struct function_traits;
    +struct function_traits;
     
    diff --git a/doc/html/boost_typetraits/category/transform.html b/doc/html/boost_typetraits/category/transform.html index 463611b..01b677b 100644 --- a/doc/html/boost_typetraits/category/transform.html +++ b/doc/html/boost_typetraits/category/transform.html @@ -3,8 +3,8 @@ Type Traits that Transform One Type to Another - - + + @@ -24,7 +24,7 @@

    @@ -37,62 +37,62 @@ Synopsis:

    template <class T>
    -struct add_const;
    +struct add_const;
     
     template <class T>
    -struct add_cv;
    +struct add_cv;
     
     template <class T>
    -struct add_pointer;
    +struct add_pointer;
     
     template <class T>
    -struct add_reference;
    +struct add_reference;
     
     template <class T>
    -struct add_volatile;
    +struct add_volatile;
     
     template <class T>
    -struct decay;
    +struct decay;
     
     template <class T>
    -struct floating_point_promotion;
    +struct floating_point_promotion;
     
     template <class T>
    -struct integral_promotion;
    +struct integral_promotion;
     
     template <class T>
    -struct make_signed;
    +struct make_signed;
     
     template <class T>
    -struct make_unsigned;
    +struct make_unsigned;
     
     template <class T>
    -struct promote;
    +struct promote;
     
     template <class T>
    -struct remove_all_extents;
    +struct remove_all_extents;
     
     template <class T>
    -struct remove_const;
    +struct remove_const;
     
     template <class T>
    -struct remove_cv;
    +struct remove_cv;
     
     template <class T>
    -struct remove_extent;
    +struct remove_extent;
     
     template <class T>
    -struct remove_pointer;
    +struct remove_pointer;
     
     template <class T>
    -struct remove_reference;
    +struct remove_reference;
     
     template <class T>
    -struct remove_volatile;
    +struct remove_volatile;
     
    - - Broken + + Broken Compiler Workarounds:

    diff --git a/doc/html/boost_typetraits/category/value_traits.html b/doc/html/boost_typetraits/category/value_traits.html index 550cf59..85d37e5 100644 --- a/doc/html/boost_typetraits/category/value_traits.html +++ b/doc/html/boost_typetraits/category/value_traits.html @@ -3,8 +3,8 @@ Type Traits that Describe the Properties of a Type - - + + @@ -24,7 +24,7 @@

    @@ -37,13 +37,13 @@

    These traits are all value traits, which is to say the - traits classes all inherit from integral_constant, + traits classes all inherit from integral_constant, and are used to access some numerical property of a type. Often this is a simple true or false Boolean value, but in a few cases may be some other integer value (for example when dealing with type alignments, or array bounds: - see alignment_of, - rank - and extent). + see alignment_of, + rank + and extent).

    diff --git a/doc/html/boost_typetraits/category/value_traits/primary.html b/doc/html/boost_typetraits/category/value_traits/primary.html index 4c6fc2b..e691985 100644 --- a/doc/html/boost_typetraits/category/value_traits/primary.html +++ b/doc/html/boost_typetraits/category/value_traits/primary.html @@ -3,8 +3,8 @@ Categorizing a Type - - + + @@ -24,7 +24,7 @@

    @@ -33,13 +33,13 @@ are compositions of one or more primary traits.

    - For any given type, exactly one primary type trait will inherit from true_type, - and all the others will inherit from false_type, + For any given type, exactly one primary type trait will inherit from true_type, + and all the others will inherit from false_type, in other words these traits are mutually exclusive.

    - This means that is_integral<T>::value - and is_floating_point<T>::value + This means that is_integral<T>::value + and is_floating_point<T>::value will only ever be true for built-in types; if you want to check for a user-defined class type that behaves "as if" it is an integral or floating point type, then use the std::numeric_limits @@ -49,43 +49,43 @@ Synopsis:

    template <class T>
    -struct is_array;
    +struct is_array;
       
     template <class T>
    -struct is_class;
    +struct is_class;
     
     template <class T>
    -struct is_complex;
    +struct is_complex;
       
     template <class T>
    -struct is_enum;
    +struct is_enum;
       
     template <class T>
    -struct is_floating_point;
    +struct is_floating_point;
       
     template <class T>
    -struct is_function;
    +struct is_function;
     
     template <class T>
    -struct is_integral;
    +struct is_integral;
       
     template <class T>
    -struct is_member_function_pointer;
    +struct is_member_function_pointer;
       
     template <class T>
    -struct is_member_object_pointer;
    +struct is_member_object_pointer;
       
     template <class T>
    -struct is_pointer;
    +struct is_pointer;
       
     template <class T>
    -struct is_reference;
    +struct is_reference;
       
     template <class T>
    -struct is_union;
    +struct is_union;
       
     template <class T>
    -struct is_void;
    +struct is_void;
     

    The following traits are made up of the union of one or more type categorizations. @@ -93,22 +93,22 @@ one of the primary categories.

    template <class T>
    -struct is_arithmetic;
    +struct is_arithmetic;
     
     template <class T>
    -struct is_compound;
    +struct is_compound;
     
     template <class T>
    -struct is_fundamental;
    +struct is_fundamental;
     
     template <class T>
    -struct is_member_pointer;
    +struct is_member_pointer;
     
     template <class T>
    -struct is_object;
    +struct is_object;
     
     template <class T>
    -struct is_scalar;
    +struct is_scalar;
     
    diff --git a/doc/html/boost_typetraits/category/value_traits/properties.html b/doc/html/boost_typetraits/category/value_traits/properties.html index 278c74c..31761d3 100644 --- a/doc/html/boost_typetraits/category/value_traits/properties.html +++ b/doc/html/boost_typetraits/category/value_traits/properties.html @@ -3,8 +3,8 @@ General Type Properties - - + + @@ -24,7 +24,7 @@

    @@ -34,76 +34,76 @@ Synopsis:

    template <class T>
    -struct alignment_of;
    +struct alignment_of;
     
     template <class T>
    -struct has_nothrow_assign;
    +struct has_nothrow_assign;
     
     template <class T>
    -struct has_nothrow_constructor;
    +struct has_nothrow_constructor;
     
     template <class T>
    -struct has_nothrow_default_constructor;
    +struct has_nothrow_default_constructor;
     
     template <class T>
    -struct has_nothrow_copy;
    +struct has_nothrow_copy;
     
     template <class T>
    -struct has_nothrow_copy_constructor;
    +struct has_nothrow_copy_constructor;
     
     template <class T>
    -struct has_trivial_assign;
    +struct has_trivial_assign;
     
     template <class T>
    -struct has_trivial_constructor;
    +struct has_trivial_constructor;
     
     template <class T>
    -struct has_trivial_default_constructor;
    +struct has_trivial_default_constructor;
     
     template <class T>
    -struct has_trivial_copy;
    +struct has_trivial_copy;
     
     template <class T>
    -struct has_trivial_copy_constructor;
    +struct has_trivial_copy_constructor;
     
     template <class T>
    -struct has_trivial_destructor;
    +struct has_trivial_destructor;
     
     template <class T>
    -struct has_virtual_destructor;
    +struct has_virtual_destructor;
     
     template <class T>
    -struct is_abstract;
    +struct is_abstract;
     
     template <class T>
    -struct is_const;
    +struct is_const;
     
     template <class T>
    -struct is_empty;
    +struct is_empty;
     
     template <class T>
    -struct is_stateless;
    +struct is_stateless;
     
     template <class T>
    -struct is_pod;
    +struct is_pod;
     
     template <class T>
    -struct is_polymorphic;
    +struct is_polymorphic;
     
     template <class T>
    -struct is_signed;
    +struct is_signed;
     
     template <class T>
    -struct is_unsigned;
    +struct is_unsigned;
     
     template <class T>
    -struct is_volatile;
    +struct is_volatile;
     
     template <class T, std::size_t N = 0>
    -struct extent;
    +struct extent;
     
     template <class T>
    -struct rank;
    +struct rank;
     
    diff --git a/doc/html/boost_typetraits/category/value_traits/relate.html b/doc/html/boost_typetraits/category/value_traits/relate.html index 598e5fb..5975a0e 100644 --- a/doc/html/boost_typetraits/category/value_traits/relate.html +++ b/doc/html/boost_typetraits/category/value_traits/relate.html @@ -3,8 +3,8 @@ Relationships Between Two Types - - + + @@ -24,7 +24,7 @@

    @@ -35,13 +35,13 @@ Synopsis:

    template <class Base, class Derived>
    -struct is_base_of;
    +struct is_base_of;
     
     template <class From, class To>
    -struct is_convertible;
    +struct is_convertible;
     
     template <class T, class U>
    -struct is_same;
    +struct is_same;
     
    diff --git a/doc/html/boost_typetraits/credits.html b/doc/html/boost_typetraits/credits.html index b473cb2..898e742 100644 --- a/doc/html/boost_typetraits/credits.html +++ b/doc/html/boost_typetraits/credits.html @@ -3,8 +3,8 @@ Credits - - + + @@ -23,7 +23,7 @@

    This documentation was pulled together by John Maddock, using Boost.Quickbook @@ -49,7 +49,7 @@ Aleksey Gurtovoy added MPL integration to the library.

    - The is_convertible + The is_convertible template is based on code originally devised by Andrei Alexandrescu, see "Generic<Programming>: Mappings between Types and Values".

    diff --git a/doc/html/boost_typetraits/examples.html b/doc/html/boost_typetraits/examples.html index 01cbcd3..d68f3e0 100644 --- a/doc/html/boost_typetraits/examples.html +++ b/doc/html/boost_typetraits/examples.html @@ -3,8 +3,8 @@ Examples - - + + @@ -24,7 +24,7 @@

    Demonstrates a version of std::copy - that uses has_trivial_assign + that uses has_trivial_assign to determine whether to use memcpy to optimise the copy operation (see copy_example.cpp):

    @@ -42,7 +42,7 @@ namespace detail{ template<typename I1, typename I2, bool b> -I2 copy_imp(I1 first, I1 last, I2 out, const boost::integral_constant<bool, b>&) +I2 copy_imp(I1 first, I1 last, I2 out, const boost::integral_constant<bool, b>&) { while(first != last) { @@ -54,7 +54,7 @@ } template<typename T> -T* copy_imp(const T* first, const T* last, T* out, const boost::true_type&) +T* copy_imp(const T* first, const T* last, T* out, const boost::true_type&) { memcpy(out, first, (last-first)*sizeof(T)); return out+(last-first); @@ -72,7 +72,7 @@ // requirement we detect with overload resolution): // typedef typename std::iterator_traits<I1>::value_type value_type; - return detail::copy_imp(first, last, out, boost::has_trivial_assign<value_type>()); + return detail::copy_imp(first, last, out, boost::has_trivial_assign<value_type>()); }
    diff --git a/doc/html/boost_typetraits/examples/destruct.html b/doc/html/boost_typetraits/examples/destruct.html index c93989f..7eeae43 100644 --- a/doc/html/boost_typetraits/examples/destruct.html +++ b/doc/html/boost_typetraits/examples/destruct.html @@ -3,8 +3,8 @@ An Example that Omits Destructor Calls For Types with Trivial Destructors - - + + @@ -24,7 +24,7 @@

    @@ -40,7 +40,7 @@ namespace detail{ template <class T> -void do_destroy_array(T* first, T* last, const boost::false_type&) +void do_destroy_array(T* first, T* last, const boost::false_type&) { while(first != last) { @@ -50,7 +50,7 @@ } template <class T> -inline void do_destroy_array(T* first, T* last, const boost::true_type&) +inline void do_destroy_array(T* first, T* last, const boost::true_type&) { } @@ -59,7 +59,7 @@ template <class T> inline void destroy_array(T* p1, T* p2) { - detail::do_destroy_array(p1, p2, ::boost::has_trivial_destructor<T>()); + detail::do_destroy_array(p1, p2, ::boost::has_trivial_destructor<T>()); }

    diff --git a/doc/html/boost_typetraits/examples/fill.html b/doc/html/boost_typetraits/examples/fill.html index 9939850..0b55ad6 100644 --- a/doc/html/boost_typetraits/examples/fill.html +++ b/doc/html/boost_typetraits/examples/fill.html @@ -3,8 +3,8 @@ An Optimised Version of std::fill - - + + @@ -24,12 +24,12 @@

    Demonstrates a version of std::fill - that uses has_trivial_assign + that uses has_trivial_assign to determine whether to use memset to optimise the fill operation (see fill_example.cpp):

    @@ -40,7 +40,7 @@ namespace detail{ template <typename I, typename T, bool b> -void do_fill(I first, I last, const T& val, const boost::integral_constant<bool, b>&) +void do_fill(I first, I last, const T& val, const boost::integral_constant<bool, b>&) { while(first != last) { @@ -50,7 +50,7 @@ } template <typename T> -void do_fill(T* first, T* last, const T& val, const boost::true_type&) +void do_fill(T* first, T* last, const T& val, const boost::true_type&) { std::memset(first, val, last-first); } @@ -64,8 +64,8 @@ // We can do an optimised fill if T has a trivial assignment // operator and if it's size is one: // - typedef boost::integral_constant<bool, - ::boost::has_trivial_assign<T>::value && (sizeof(T) == 1)> truth_type; + typedef boost::integral_constant<bool, + ::boost::has_trivial_assign<T>::value && (sizeof(T) == 1)> truth_type; detail::do_fill(first, last, val, truth_type()); } diff --git a/doc/html/boost_typetraits/examples/iter.html b/doc/html/boost_typetraits/examples/iter.html index 23c7385..8d4e316 100644 --- a/doc/html/boost_typetraits/examples/iter.html +++ b/doc/html/boost_typetraits/examples/iter.html @@ -3,8 +3,8 @@ An improved Version of std::iter_swap - - + + @@ -24,7 +24,7 @@

    @@ -44,7 +44,7 @@ namespace detail{ template <typename I> -static void do_swap(I one, I two, const boost::false_type&) +static void do_swap(I one, I two, const boost::false_type&) { typedef typename std::iterator_traits<I>::value_type v_t; v_t v = *one; @@ -52,7 +52,7 @@ *two = v; } template <typename I> -static void do_swap(I one, I two, const boost::true_type&) +static void do_swap(I one, I two, const boost::true_type&) { using std::swap; swap(*one, *two); @@ -70,10 +70,10 @@ typedef typename std::iterator_traits<I1>::reference r1_t; typedef typename std::iterator_traits<I2>::reference r2_t; - typedef boost::integral_constant<bool, - ::boost::is_reference<r1_t>::value - && ::boost::is_reference<r2_t>::value - && ::boost::is_same<r1_t, r2_t>::value> truth_type; + typedef boost::integral_constant<bool, + ::boost::is_reference<r1_t>::value + && ::boost::is_reference<r2_t>::value + && ::boost::is_same<r1_t, r2_t>::value> truth_type; detail::do_swap(one, two, truth_type()); } diff --git a/doc/html/boost_typetraits/examples/to_double.html b/doc/html/boost_typetraits/examples/to_double.html index 2fe87cc..2136800 100644 --- a/doc/html/boost_typetraits/examples/to_double.html +++ b/doc/html/boost_typetraits/examples/to_double.html @@ -3,8 +3,8 @@ Convert Numeric Types and Enums to double - - + + @@ -24,7 +24,7 @@

    diff --git a/doc/html/boost_typetraits/intrinsics.html b/doc/html/boost_typetraits/intrinsics.html index aa18fef..e81984e 100644 --- a/doc/html/boost_typetraits/intrinsics.html +++ b/doc/html/boost_typetraits/intrinsics.html @@ -3,8 +3,8 @@ Support for Compiler Intrinsics - - + + @@ -24,7 +24,7 @@

    There are some traits that can not be implemented within the current C++ language: @@ -38,16 +38,16 @@ for all types (but all have safe fallback positions if this support is unavailable):

    The following traits classes can't be portably implemented in the C++ language, @@ -55,15 +55,15 @@ all the compilers we know about:

    The following traits classes are dependent on one or more of the above:

    The hooks for compiler-intrinsic support are defined in boost/type_traits/intrinsics.hpp, @@ -71,7 +71,7 @@ of the following macros:

    -

    Table 1.4. Macros for Compiler Intrinsics

    +

    Table 1.4. Macros for Compiler Intrinsics

    diff --git a/doc/html/boost_typetraits/intro.html b/doc/html/boost_typetraits/intro.html index b874987..1a685d6 100644 --- a/doc/html/boost_typetraits/intro.html +++ b/doc/html/boost_typetraits/intro.html @@ -3,8 +3,8 @@ Introduction - - + + @@ -24,7 +24,7 @@

    The Boost type-traits library contains a set of very specific traits classes, @@ -34,8 +34,8 @@

    The type-traits classes share a unified design: each class inherits from a - the type true_type - if the type has the specified property and inherits from false_type + the type true_type + if the type has the specified property and inherits from false_type otherwise.

    diff --git a/doc/html/boost_typetraits/mpl.html b/doc/html/boost_typetraits/mpl.html index b058fad..205755b 100644 --- a/doc/html/boost_typetraits/mpl.html +++ b/doc/html/boost_typetraits/mpl.html @@ -3,8 +3,8 @@ MPL Interoperability - - + + @@ -24,7 +24,7 @@

    All the value based traits in this library conform to MPL's requirements for @@ -33,11 +33,11 @@ for broken compilers.

    - Purely as an implementation detail, this means that true_type + Purely as an implementation detail, this means that true_type inherits from boost::mpl::true_, - false_type + false_type inherits from boost::mpl::false_, - and integral_constant<T, + and integral_constant<T, v> inherits from boost::mpl::integral_c<T,v> (provided T is not bool) diff --git a/doc/html/boost_typetraits/reference.html b/doc/html/boost_typetraits/reference.html index 40c1482..bb362a2 100644 --- a/doc/html/boost_typetraits/reference.html +++ b/doc/html/boost_typetraits/reference.html @@ -3,8 +3,8 @@ Alphabetical Reference - - + + @@ -24,7 +24,7 @@

    add_const
    diff --git a/doc/html/boost_typetraits/reference/add_const.html b/doc/html/boost_typetraits/reference/add_const.html index 82e606e..4164c1c 100644 --- a/doc/html/boost_typetraits/reference/add_const.html +++ b/doc/html/boost_typetraits/reference/add_const.html @@ -3,8 +3,8 @@ add_const - - + + @@ -24,7 +24,7 @@
    template <class T>
     struct add_const
    @@ -44,7 +44,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.5. Examples

    +

    Table 1.5. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_cv.html b/doc/html/boost_typetraits/reference/add_cv.html index 0a4b92f..aded111 100644 --- a/doc/html/boost_typetraits/reference/add_cv.html +++ b/doc/html/boost_typetraits/reference/add_cv.html @@ -3,8 +3,8 @@ add_cv - - + + @@ -24,7 +24,7 @@
    template <class T>
     struct add_cv
    @@ -45,7 +45,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.6. Examples

    +

    Table 1.6. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_pointer.html b/doc/html/boost_typetraits/reference/add_pointer.html index 721dfbf..4d1f84c 100644 --- a/doc/html/boost_typetraits/reference/add_pointer.html +++ b/doc/html/boost_typetraits/reference/add_pointer.html @@ -3,8 +3,8 @@ add_pointer - - + + @@ -24,7 +24,7 @@
    template <class T>
     struct add_pointer
    @@ -47,7 +47,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -56,7 +56,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.7. Examples

    +

    Table 1.7. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_reference.html b/doc/html/boost_typetraits/reference/add_reference.html index 204c4ae..621e022 100644 --- a/doc/html/boost_typetraits/reference/add_reference.html +++ b/doc/html/boost_typetraits/reference/add_reference.html @@ -3,8 +3,8 @@ add_reference - - + + @@ -24,7 +24,7 @@
    template <class T>
     struct add_reference
    @@ -44,7 +44,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.8. Examples

    +

    Table 1.8. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_volatile.html b/doc/html/boost_typetraits/reference/add_volatile.html index d971937..449f3d4 100644 --- a/doc/html/boost_typetraits/reference/add_volatile.html +++ b/doc/html/boost_typetraits/reference/add_volatile.html @@ -3,8 +3,8 @@ add_volatile - - + + @@ -24,7 +24,7 @@
    template <class T>
     struct add_volatile
    @@ -44,7 +44,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.9. Examples

    +

    Table 1.9. Examples

    diff --git a/doc/html/boost_typetraits/reference/aligned_storage.html b/doc/html/boost_typetraits/reference/aligned_storage.html index dd4d40c..bb10a3d 100644 --- a/doc/html/boost_typetraits/reference/aligned_storage.html +++ b/doc/html/boost_typetraits/reference/aligned_storage.html @@ -3,8 +3,8 @@ aligned_storage - - + + @@ -24,7 +24,7 @@
    template <std::size_t Size, std::size_t Align>
     struct aligned_storage
    diff --git a/doc/html/boost_typetraits/reference/alignment_of.html b/doc/html/boost_typetraits/reference/alignment_of.html
    index e98f4bd..f7e176f 100644
    --- a/doc/html/boost_typetraits/reference/alignment_of.html
    +++ b/doc/html/boost_typetraits/reference/alignment_of.html
    @@ -3,8 +3,8 @@
     
     alignment_of
     
    -
    -
    +
    +
     
     
     
    @@ -24,15 +24,16 @@
     
    template <class T>
    -struct alignment_of : public integral_constant<std::size_t, ALIGNOF(T)> {};
    +struct alignment_of : public integral_constant<std::size_t, ALIGNOF(T)> {};
     

    - Inherits: Class template alignmentof inherits from `_integral_constant<std::size_t, - ALIGNOF(T)>, where - ALIGNOF(T)` is the alignment of type T. + Inherits: Class template alignment_of + inherits from integral_constant<std::size_t, ALIGNOF(T)>, + where ALIGNOF(T) is the + alignment of type T.

    Note: strictly speaking you should only rely on the value of ALIGNOF(T) being @@ -52,7 +53,7 @@

    alignment_of<int> - inherits from integral_constant<std::size_t, ALIGNOF(int)>. + inherits from integral_constant<std::size_t, ALIGNOF(int)>.

    @@ -61,7 +62,7 @@

    - alignment_of<char>::type is the type integral_constant<std::size_t, ALIGNOF(char)>. + alignment_of<char>::type is the type integral_constant<std::size_t, ALIGNOF(char)>.

    diff --git a/doc/html/boost_typetraits/reference/decay.html b/doc/html/boost_typetraits/reference/decay.html index 483f21c..088b574 100644 --- a/doc/html/boost_typetraits/reference/decay.html +++ b/doc/html/boost_typetraits/reference/decay.html @@ -3,8 +3,8 @@ decay - - + + @@ -24,7 +24,7 @@
    template <class T>
     struct decay
    @@ -48,7 +48,7 @@
             or  #include <boost/type_traits.hpp>
           

    -

    Table 1.10. Examples

    +

    Table 1.10. Examples

    diff --git a/doc/html/boost_typetraits/reference/extent.html b/doc/html/boost_typetraits/reference/extent.html index ff75445..f33799f 100644 --- a/doc/html/boost_typetraits/reference/extent.html +++ b/doc/html/boost_typetraits/reference/extent.html @@ -3,8 +3,8 @@ extent - - + + @@ -24,21 +24,21 @@
    template <class T, std::size_t N = 0>
    -struct extent : public integral_constant<std::size_t, EXTENT(T,N)> {};
    +struct extent : public integral_constant<std::size_t, EXTENT(T,N)> {};
     

    Inherits: Class template extent inherits - from integral_constant<std::size_t, EXTENT(T,N)>, + from integral_constant<std::size_t, EXTENT(T,N)>, where EXTENT(T,N) is the number of elements in the N'th array dimention of type T.

    If T is not an array type, or if N > - rank<T>::value, or if the N'th array bound is incomplete, + rank<T>::value, or if the N'th array bound is incomplete, then EXTENT(T,N) is zero.

    @@ -53,7 +53,7 @@

    - extent<int[1]> inherits from integral_constant<std::size_t, 1>. + extent<int[1]> inherits from integral_constant<std::size_t, 1>.

    @@ -63,7 +63,7 @@

    extent<double[2][3][4], - 1>::type is the type integral_constant<std::size_t, 3>. + 1>::type is the type integral_constant<std::size_t, 3>.

    diff --git a/doc/html/boost_typetraits/reference/floating_point_promotion.html b/doc/html/boost_typetraits/reference/floating_point_promotion.html index 8bdcc1b..75aeb25 100644 --- a/doc/html/boost_typetraits/reference/floating_point_promotion.html +++ b/doc/html/boost_typetraits/reference/floating_point_promotion.html @@ -3,8 +3,8 @@ floating_point_promotion - - + + @@ -24,7 +24,7 @@
    template <class T>
    @@ -49,7 +49,7 @@
             or  #include <boost/type_traits.hpp>
           

    -

    Table 1.11. Examples

    +

    Table 1.11. Examples

    diff --git a/doc/html/boost_typetraits/reference/function_traits.html b/doc/html/boost_typetraits/reference/function_traits.html index d67f990..66f56c0 100644 --- a/doc/html/boost_typetraits/reference/function_traits.html +++ b/doc/html/boost_typetraits/reference/function_traits.html @@ -3,8 +3,8 @@ function_traits - - + + @@ -24,7 +24,7 @@
    template <class F>
     struct function_traits
    @@ -55,11 +55,11 @@
     

    function_traits is intended to introspect only C++ functions of the form R (), R( A1 ), R ( A1, ... etc. ) and not function pointers or class member - functions. To convert a function pointer type to a suitable type use remove_pointer. + functions. To convert a function pointer type to a suitable type use remove_pointer.

    -

    Table 1.12. Function Traits Members

    +

    Table 1.12. Function Traits Members

    @@ -122,7 +122,7 @@

    -

    Table 1.13. Examples

    +

    Table 1.13. Examples

    diff --git a/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html b/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html index 4fd3c42..20d383b 100644 --- a/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html +++ b/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html @@ -3,8 +3,8 @@ has_nothrow_default_constructor - - + + @@ -24,10 +24,10 @@
    diff --git a/doc/html/boost_typetraits/reference/has_nothrow_assign.html b/doc/html/boost_typetraits/reference/has_nothrow_assign.html index 16acc7b..eb3320d 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_assign.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_assign.html @@ -3,8 +3,8 @@ has_nothrow_assign - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct has_nothrow_assign : public true_type-or-false_type {};
    +struct has_nothrow_assign : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - type with a non-throwing assignment-operator then inherits from true_type, - otherwise inherits from false_type. + type with a non-throwing assignment-operator then inherits from true_type, + otherwise inherits from false_type. Type T must be a complete type.

    diff --git a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html index 1e03f71..936697f 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html @@ -3,8 +3,8 @@ has_nothrow_constructor - - + + @@ -24,19 +24,19 @@
    template <class T>
    -struct has_nothrow_constructor : public true_type-or-false_type {};
    +struct has_nothrow_constructor : public true_type-or-false_type {};
     
     template <class T>
    -struct has_nothrow_default_constructor : public true_type-or-false_type {};
    +struct has_nothrow_default_constructor : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - type with a non-throwing default-constructor then inherits from true_type, - otherwise inherits from false_type. + type with a non-throwing default-constructor then inherits from true_type, + otherwise inherits from false_type. Type T must be a complete type.

    @@ -52,7 +52,7 @@ Without some (as yet unspecified) help from the compiler, has_nothrow_constructor will never report that a class or struct has a non-throwing default-constructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual - C++ 8 has the necessary compiler intrinsics + C++ 8 has the necessary compiler intrinsics to ensure that this trait "just works".

    diff --git a/doc/html/boost_typetraits/reference/has_nothrow_copy.html b/doc/html/boost_typetraits/reference/has_nothrow_copy.html index 9346165..e22e2e5 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_copy.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_copy.html @@ -3,8 +3,8 @@ has_nothrow_copy - - + + @@ -24,18 +24,18 @@

    template <class T>
    -struct has_nothrow_copy : public true_type-or-false_type {};
    +struct has_nothrow_copy : public true_type-or-false_type {};
     
     template <class T>
    -struct has_nothrow_copy_constructor : public true_type-or-false_type {};
    +struct has_nothrow_copy_constructor : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - type with a non-throwing copy-constructor then inherits from true_type, - otherwise inherits from false_type. + type with a non-throwing copy-constructor then inherits from true_type, + otherwise inherits from false_type. Type T must be a complete type.

    @@ -51,7 +51,7 @@ Without some (as yet unspecified) help from the compiler, has_nothrow_copy will never report that a class or struct has a non-throwing copy-constructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual - C++ 8 has the necessary compiler intrinsics + C++ 8 has the necessary compiler intrinsics to ensure that this trait "just works".

    diff --git a/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html b/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html index b59f9bc..11ab02b 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html @@ -3,8 +3,8 @@ has_nothrow_copy_constructor - - + + @@ -24,10 +24,10 @@

    diff --git a/doc/html/boost_typetraits/reference/has_trivial_assign.html b/doc/html/boost_typetraits/reference/has_trivial_assign.html index 116deef..61a5862 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_assign.html +++ b/doc/html/boost_typetraits/reference/has_trivial_assign.html @@ -3,8 +3,8 @@ has_trivial_assign - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct has_trivial_assign : public true_type-or-false_type {};
    +struct has_trivial_assign : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - type with a trivial assignment-operator then inherits from true_type, - otherwise inherits from false_type. + type with a trivial assignment-operator then inherits from true_type, + otherwise inherits from false_type.

    If a type has a trivial assignment-operator then the operator has the same @@ -48,7 +48,7 @@ Without some (as yet unspecified) help from the compiler, has_trivial_assign will never report that a user-defined class or struct has a trivial constructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW - 9 and Visual C++ 8 have the necessary compiler intrinsics + 9 and Visual C++ 8 have the necessary compiler intrinsics to detect user-defined classes with trivial constructors.

    @@ -67,7 +67,7 @@

    has_trivial_assign<int> - inherits from true_type. + inherits from true_type.

    @@ -76,7 +76,7 @@

    - has_trivial_assign<char*>::type is the type true_type. + has_trivial_assign<char*>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/has_trivial_constructor.html b/doc/html/boost_typetraits/reference/has_trivial_constructor.html index 82f2984..913314b 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_constructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_constructor.html @@ -3,8 +3,8 @@ has_trivial_constructor - - + + @@ -24,19 +24,19 @@
    template <class T>
    -struct has_trivial_constructor : public true_type-or-false_type {};
    +struct has_trivial_constructor : public true_type-or-false_type {};
     
     template <class T>
    -struct has_trivial_default_constructor : public true_type-or-false_type {};
    +struct has_trivial_default_constructor : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - type with a trivial default-constructor then inherits from true_type, - otherwise inherits from false_type. + type with a trivial default-constructor then inherits from true_type, + otherwise inherits from false_type.

    These two traits are synonyms for each other. @@ -57,7 +57,7 @@ Without some (as yet unspecified) help from the compiler, has_trivial_constructor will never report that a user-defined class or struct has a trivial constructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW - 9 and Visual C++ 8 have the necessary compiler intrinsics + 9 and Visual C++ 8 have the necessary compiler intrinsics to detect user-defined classes with trivial constructors.

    @@ -75,7 +75,7 @@

    - has_trivial_constructor<int> inherits from true_type. + has_trivial_constructor<int> inherits from true_type.

    @@ -85,7 +85,7 @@

    has_trivial_constructor<char*>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/has_trivial_copy.html b/doc/html/boost_typetraits/reference/has_trivial_copy.html index 477049b..0008ffa 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_copy.html +++ b/doc/html/boost_typetraits/reference/has_trivial_copy.html @@ -3,8 +3,8 @@ has_trivial_copy - - + + @@ -24,18 +24,18 @@
    template <class T>
    -struct has_trivial_copy : public true_type-or-false_type {};
    +struct has_trivial_copy : public true_type-or-false_type {};
     
     template <class T>
    -struct has_trivial_copy_constructor : public true_type-or-false_type {};
    +struct has_trivial_copy_constructor : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - type with a trivial copy-constructor then inherits from true_type, - otherwise inherits from false_type. + type with a trivial copy-constructor then inherits from true_type, + otherwise inherits from false_type.

    These two traits are synonyms for each other. @@ -54,7 +54,7 @@ Without some (as yet unspecified) help from the compiler, has_trivial_copy will never report that a user-defined class or struct has a trivial constructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW - 9 and Visual C++ 8 have the necessary compiler intrinsics + 9 and Visual C++ 8 have the necessary compiler intrinsics to detect user-defined classes with trivial constructors.

    @@ -73,7 +73,7 @@

    has_trivial_copy<int> - inherits from true_type. + inherits from true_type.

    @@ -82,7 +82,7 @@

    - has_trivial_copy<char*>::type is the type true_type. + has_trivial_copy<char*>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html b/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html index a26b6be..9f816c2 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html @@ -3,8 +3,8 @@ has_trivial_copy_constructor - - + + @@ -24,10 +24,10 @@
    diff --git a/doc/html/boost_typetraits/reference/has_trivial_def_cons.html b/doc/html/boost_typetraits/reference/has_trivial_def_cons.html index 6079d35..e243d59 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_def_cons.html +++ b/doc/html/boost_typetraits/reference/has_trivial_def_cons.html @@ -3,8 +3,8 @@ has_trivial_default_constructor - - + + @@ -24,10 +24,10 @@
    diff --git a/doc/html/boost_typetraits/reference/has_trivial_destructor.html b/doc/html/boost_typetraits/reference/has_trivial_destructor.html index 2b7379e..bc80edb 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_destructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_destructor.html @@ -3,8 +3,8 @@ has_trivial_destructor - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct has_trivial_destructor : public true_type-or-false_type {};
    +struct has_trivial_destructor : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - type with a trivial destructor then inherits from true_type, - otherwise inherits from false_type. + type with a trivial destructor then inherits from true_type, + otherwise inherits from false_type.

    If a type has a trivial destructor then the destructor has no effect: calls @@ -50,7 +50,7 @@ Without some (as yet unspecified) help from the compiler, has_trivial_destructor will never report that a user-defined class or struct has a trivial destructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW - 9 and Visual C++ 8 have the necessary compiler intrinsics + 9 and Visual C++ 8 have the necessary compiler intrinsics to detect user-defined classes with trivial constructors.

    @@ -68,7 +68,7 @@

    - has_trivial_destructor<int> inherits from true_type. + has_trivial_destructor<int> inherits from true_type.

    @@ -78,7 +78,7 @@

    has_trivial_destructor<char*>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/has_virtual_destructor.html b/doc/html/boost_typetraits/reference/has_virtual_destructor.html index 06a92b3..9c33e38 100644 --- a/doc/html/boost_typetraits/reference/has_virtual_destructor.html +++ b/doc/html/boost_typetraits/reference/has_virtual_destructor.html @@ -3,8 +3,8 @@ has_virtual_destructor - - + + @@ -24,25 +24,25 @@
    template <class T>
    -struct has_virtual_destructor : public true_type-or-false_type {};
    +struct has_virtual_destructor : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - type with a virtual destructor then inherits from true_type, - otherwise inherits from false_type. + type with a virtual destructor then inherits from true_type, + otherwise inherits from false_type.

    Compiler Compatibility: This trait is provided for completeness, since it's part of the Technical Report on C++ Library Extensions. However, there is currently no way to portably implement this - trait. The default version provided always inherits from false_type, + trait. The default version provided always inherits from false_type, and has to be explicitly specialized for types with virtual destructors unless - the compiler used has compiler intrinsics + the compiler used has compiler intrinsics that enable the trait to do the right thing: currently (May 2005) only Visual - C++ 8 and GCC-4.3 have the necessary intrinsics. + C++ 8 and GCC-4.3 have the necessary intrinsics.

    C++ Standard Reference: 12.4. diff --git a/doc/html/boost_typetraits/reference/integral_constant.html b/doc/html/boost_typetraits/reference/integral_constant.html index 45a0f4e..48d4fee 100644 --- a/doc/html/boost_typetraits/reference/integral_constant.html +++ b/doc/html/boost_typetraits/reference/integral_constant.html @@ -3,8 +3,8 @@ integral_constant - - + + @@ -24,7 +24,7 @@

    template <class T, T val>
     struct integral_constant
    diff --git a/doc/html/boost_typetraits/reference/integral_promotion.html b/doc/html/boost_typetraits/reference/integral_promotion.html
    index 93fe371..a0acd07 100644
    --- a/doc/html/boost_typetraits/reference/integral_promotion.html
    +++ b/doc/html/boost_typetraits/reference/integral_promotion.html
    @@ -3,8 +3,8 @@
     
     integral_promotion
     
    -
    -
    +
    +
     
     
     
    @@ -24,7 +24,7 @@
     
    template <class T>
     struct integral_promotion
    @@ -49,7 +49,7 @@
             or  #include <boost/type_traits.hpp>
           

    -

    Table 1.14. Examples

    +

    Table 1.14. Examples

    diff --git a/doc/html/boost_typetraits/reference/is_abstract.html b/doc/html/boost_typetraits/reference/is_abstract.html index b61bdd2..677df05 100644 --- a/doc/html/boost_typetraits/reference/is_abstract.html +++ b/doc/html/boost_typetraits/reference/is_abstract.html @@ -3,8 +3,8 @@ is_abstract - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct is_abstract : public true_type-or-false_type {};
    +struct is_abstract : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - abstract type then inherits from true_type, - otherwise inherits from false_type. + abstract type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 10.3. @@ -45,7 +45,7 @@

    Compiler Compatibility: The compiler must support DR337 (as of April 2005: GCC 3.4, VC++ 7.1 (and later), Intel C++ - 7 (and later), and Comeau 4.3.2). Otherwise behaves the same as is_polymorphic; + 7 (and later), and Comeau 4.3.2). Otherwise behaves the same as is_polymorphic; this is the "safe fallback position" for which polymorphic types are always regarded as potentially abstract. The macro BOOST_NO_IS_ABSTRACT is used to signify that the implementation is buggy, users should check for @@ -69,7 +69,7 @@

    is_abstract<abc> - inherits from true_type. + inherits from true_type.

    @@ -78,7 +78,7 @@

    - is_abstract<abc>::type is the type true_type. + is_abstract<abc>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_arithmetic.html b/doc/html/boost_typetraits/reference/is_arithmetic.html index e1eef3e..74eb482 100644 --- a/doc/html/boost_typetraits/reference/is_arithmetic.html +++ b/doc/html/boost_typetraits/reference/is_arithmetic.html @@ -3,8 +3,8 @@ is_arithmetic - - + + @@ -24,17 +24,17 @@
    template <class T>
    -struct is_arithmetic : public true_type-or-false_type {};
    +struct is_arithmetic : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - arithmetic type then inherits from true_type, - otherwise inherits from false_type. - Arithmetic types include integral and floating point types (see also is_integral and - is_floating_point). + arithmetic type then inherits from true_type, + otherwise inherits from false_type. + Arithmetic types include integral and floating point types (see also is_integral and + is_floating_point).

    C++ Standard Reference: 3.9.1p8. @@ -52,7 +52,7 @@

    is_arithmetic<int> - inherits from true_type. + inherits from true_type.

    @@ -61,7 +61,7 @@

    - is_arithmetic<char>::type is the type true_type. + is_arithmetic<char>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_array.html b/doc/html/boost_typetraits/reference/is_array.html index fe58271..f256673 100644 --- a/doc/html/boost_typetraits/reference/is_array.html +++ b/doc/html/boost_typetraits/reference/is_array.html @@ -3,8 +3,8 @@ is_array - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct is_array : public true_type-or-false_type {};
    +struct is_array : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - array type then inherits from true_type, - otherwise inherits from false_type. + array type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 8.3.4. @@ -54,7 +54,7 @@

    - is_array<int[2]> inherits from true_type. + is_array<int[2]> inherits from true_type.

    @@ -64,7 +64,7 @@

    is_array<char[2][3]>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_base_of.html b/doc/html/boost_typetraits/reference/is_base_of.html index 7eac36f..04365c1 100644 --- a/doc/html/boost_typetraits/reference/is_base_of.html +++ b/doc/html/boost_typetraits/reference/is_base_of.html @@ -3,8 +3,8 @@ is_base_of - - + + @@ -24,21 +24,21 @@
    template <class Base, class Derived>
    -struct is_base_of : public true_type-or-false_type {};
    +struct is_base_of : public true_type-or-false_type {};
     

    Inherits: If Base is base class of type - Derived or if both types are the same then inherits from true_type, - otherwise inherits from false_type. + Derived or if both types are the same then inherits from true_type, + otherwise inherits from false_type.

    This template will detect non-public base classes, and ambiguous base classes.

    - Note that is_base_of<X,X> will always inherit from true_type. + Note that is_base_of<X,X> will always inherit from true_type. This is the case even if X is not a class type. This is a change in behaviour from Boost-1.33 in order to track the Technical Report on C++ Library Extensions. @@ -83,7 +83,7 @@

    is_base_of<Base, Derived> - inherits from true_type. + inherits from true_type.

    @@ -92,7 +92,7 @@

    - is_base_of<Base, Derived>::type is the type true_type. + is_base_of<Base, Derived>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_class.html b/doc/html/boost_typetraits/reference/is_class.html index 9741bab..64c0747 100644 --- a/doc/html/boost_typetraits/reference/is_class.html +++ b/doc/html/boost_typetraits/reference/is_class.html @@ -3,8 +3,8 @@ is_class - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct is_class : public true_type-or-false_type {};
    +struct is_class : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - class type then inherits from true_type, - otherwise inherits from false_type. + class type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 9.2. @@ -45,9 +45,9 @@

    Compiler Compatibility: Without (some as yet unspecified) help from the compiler, we cannot distinguish between union - and class types, as a result this type will erroneously inherit from true_type for - union types. See also is_union. - Currently (May 2005) only Visual C++ 8 has the necessary compiler intrinsics + and class types, as a result this type will erroneously inherit from true_type for + union types. See also is_union. + Currently (May 2005) only Visual C++ 8 has the necessary compiler intrinsics to correctly identify union types, and therefore make is_class function correctly.

    @@ -67,7 +67,7 @@

    is_class<MyClass> - inherits from true_type. + inherits from true_type.

    @@ -77,7 +77,7 @@

    is_class<MyClass const>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_complex.html b/doc/html/boost_typetraits/reference/is_complex.html index 45c42a8..a604a19 100644 --- a/doc/html/boost_typetraits/reference/is_complex.html +++ b/doc/html/boost_typetraits/reference/is_complex.html @@ -3,8 +3,8 @@ is_complex - - + + @@ -24,10 +24,10 @@
    template <class T>
    -struct is_complex : public true_type-or-false_type {};
    +struct is_complex : public true_type-or-false_type {};
     

    Inherits: If T diff --git a/doc/html/boost_typetraits/reference/is_compound.html b/doc/html/boost_typetraits/reference/is_compound.html index b72db34..520a455 100644 --- a/doc/html/boost_typetraits/reference/is_compound.html +++ b/doc/html/boost_typetraits/reference/is_compound.html @@ -3,8 +3,8 @@ is_compound - - + + @@ -24,16 +24,16 @@

    template <class T>
    -struct is_compound : public true_type-or-false_type {};
    +struct is_compound : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - compound type then inherits from true_type, - otherwise inherits from false_type. - Any type that is not a fundamental type is a compound type (see also is_fundamental). + compound type then inherits from true_type, + otherwise inherits from false_type. + Any type that is not a fundamental type is a compound type (see also is_fundamental).

    C++ Standard Reference: 3.9.2. @@ -51,7 +51,7 @@

    is_compound<MyClass> - inherits from true_type. + inherits from true_type.

    @@ -60,7 +60,7 @@

    - is_compound<MyEnum>::type is the type true_type. + is_compound<MyEnum>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_const.html b/doc/html/boost_typetraits/reference/is_const.html index 7dc9e95..532e799 100644 --- a/doc/html/boost_typetraits/reference/is_const.html +++ b/doc/html/boost_typetraits/reference/is_const.html @@ -3,8 +3,8 @@ is_const - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct is_const : public true_type-or-false_type {};
    +struct is_const : public true_type-or-false_type {};
     

    Inherits: If T is a (top level) const-qualified - type then inherits from true_type, - otherwise inherits from false_type. + type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.3. @@ -49,7 +49,7 @@

    - is_const<int const> inherits from true_type. + is_const<int const> inherits from true_type.

    @@ -58,7 +58,7 @@

    - is_const<int const volatile>::type is the type true_type. + is_const<int const volatile>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_convertible.html b/doc/html/boost_typetraits/reference/is_convertible.html index 9b78074..a338426 100644 --- a/doc/html/boost_typetraits/reference/is_convertible.html +++ b/doc/html/boost_typetraits/reference/is_convertible.html @@ -3,8 +3,8 @@ is_convertible - - + + @@ -24,16 +24,16 @@
    template <class From, class To>
    -struct is_convertible : public true_type-or-false_type {};
    +struct is_convertible : public true_type-or-false_type {};
     

    Inherits: If an imaginary lvalue of type From is convertible to type - To then inherits from true_type, - otherwise inherits from false_type. + To then inherits from true_type, + otherwise inherits from false_type.

    Type From must not be an incomplete type. @@ -72,7 +72,7 @@ Compiler Compatibility: This template is currently broken with Borland C++ Builder 5 (and earlier), for constructor-based conversions, and for the Metrowerks 7 (and earlier) compiler in all cases. - If the compiler does not support is_abstract, + If the compiler does not support is_abstract, then the template parameter To must not be an abstract type.

    @@ -89,7 +89,7 @@

    is_convertible<int, double> - inherits from true_type. + inherits from true_type.

    @@ -99,7 +99,7 @@

    is_convertible<const int, double>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_empty.html b/doc/html/boost_typetraits/reference/is_empty.html index 97301d9..2fcf6b3 100644 --- a/doc/html/boost_typetraits/reference/is_empty.html +++ b/doc/html/boost_typetraits/reference/is_empty.html @@ -3,8 +3,8 @@ is_empty - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct is_empty : public true_type-or-false_type {};
    +struct is_empty : public true_type-or-false_type {};
     

    Inherits: If T is an empty class type then - inherits from true_type, - otherwise inherits from false_type. + inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 10p5. @@ -51,7 +51,7 @@ the compiler implementing zero sized empty base classes, or

  • - the compiler providing intrinsics + the compiler providing intrinsics to detect empty classes.
  • @@ -83,7 +83,7 @@

    is_empty<empty_class> - inherits from true_type. + inherits from true_type.

    @@ -93,7 +93,7 @@

    is_empty<empty_class const>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_enum.html b/doc/html/boost_typetraits/reference/is_enum.html index a09cb0b..7955e00 100644 --- a/doc/html/boost_typetraits/reference/is_enum.html +++ b/doc/html/boost_typetraits/reference/is_enum.html @@ -3,8 +3,8 @@ is_enum - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct is_enum : public true_type-or-false_type {};
    +struct is_enum : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - enum type then inherits from true_type, - otherwise inherits from false_type. + enum type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 7.2. @@ -44,7 +44,7 @@

    Compiler Compatibility: Requires a correctly - functioning is_convertible + functioning is_convertible template; this means that is_enum is currently broken under Borland C++ Builder 5, and for the Metrowerks compiler prior to version 8, other compilers should handle this template just fine. @@ -67,7 +67,7 @@

    is_enum<my_enum> - inherits from true_type. + inherits from true_type.

    @@ -77,7 +77,7 @@

    is_enum<my_enum const>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_floating_point.html b/doc/html/boost_typetraits/reference/is_floating_point.html index 52ae734..d882fa2 100644 --- a/doc/html/boost_typetraits/reference/is_floating_point.html +++ b/doc/html/boost_typetraits/reference/is_floating_point.html @@ -3,8 +3,8 @@ is_floating_point - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct is_floating_point : public true_type-or-false_type {};
    +struct is_floating_point : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - floating point type then inherits from true_type, - otherwise inherits from false_type. + floating point type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.1p8. @@ -50,7 +50,7 @@

    is_floating_point<float> - inherits from true_type. + inherits from true_type.

    @@ -59,7 +59,7 @@

    - is_floating_point<double>::type is the type true_type. + is_floating_point<double>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_function.html b/doc/html/boost_typetraits/reference/is_function.html index f824337..9a429aa 100644 --- a/doc/html/boost_typetraits/reference/is_function.html +++ b/doc/html/boost_typetraits/reference/is_function.html @@ -3,8 +3,8 @@ is_function - - + + @@ -24,17 +24,17 @@
    template <class T>
    -struct is_function : public true_type-or-false_type {};
    +struct is_function : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - function type then inherits from true_type, - otherwise inherits from false_type. + function type then inherits from true_type, + otherwise inherits from false_type. Note that this template does not detect pointers to functions, - or references to functions, these are detected by is_pointer and is_reference respectively: + or references to functions, these are detected by is_pointer and is_reference respectively:

    typedef int f1();      // f1 is of function type.
     typedef int (f2*)();   // f2 is a pointer to a function.
    @@ -56,7 +56,7 @@
               

    is_function<int (void)> - inherits from true_type. + inherits from true_type.

    @@ -65,7 +65,7 @@

    - is_function<long (double, int)>::type is the type true_type. + is_function<long (double, int)>::type is the type true_type.

    @@ -161,11 +161,11 @@ If you want to detect whether some type is a pointer-to-function then use:

    - is_function<remove_pointer<T>::type>::value - && is_pointer<T>::value + is_function<remove_pointer<T>::type>::value + && is_pointer<T>::value

    - or for pointers to member functions you can just use is_member_function_pointer + or for pointers to member functions you can just use is_member_function_pointer directly.

    diff --git a/doc/html/boost_typetraits/reference/is_fundamental.html b/doc/html/boost_typetraits/reference/is_fundamental.html index c630002..ada6e02 100644 --- a/doc/html/boost_typetraits/reference/is_fundamental.html +++ b/doc/html/boost_typetraits/reference/is_fundamental.html @@ -3,8 +3,8 @@ is_fundamental - - + + @@ -24,19 +24,19 @@
    template <class T>
    -struct is_fundamental : public true_type-or-false_type {};
    +struct is_fundamental : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - fundamental type then inherits from true_type, - otherwise inherits from false_type. + fundamental type then inherits from true_type, + otherwise inherits from false_type. Fundamental types include integral, floating point and void types (see also - is_integral, - is_floating_point - and is_void) + is_integral, + is_floating_point + and is_void)

    C++ Standard Reference: 3.9.1. @@ -54,7 +54,7 @@

    is_fundamental<int)> - inherits from true_type. + inherits from true_type.

    @@ -64,7 +64,7 @@

    is_fundamental<double const>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_integral.html b/doc/html/boost_typetraits/reference/is_integral.html index 07a2d50..7d6f497 100644 --- a/doc/html/boost_typetraits/reference/is_integral.html +++ b/doc/html/boost_typetraits/reference/is_integral.html @@ -3,8 +3,8 @@ is_integral - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct is_integral : public true_type-or-false_type {};
    +struct is_integral : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - integral type then inherits from true_type, - otherwise inherits from false_type. + integral type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.1p7. @@ -50,7 +50,7 @@

    is_integral<int> - inherits from true_type. + inherits from true_type.

    @@ -60,7 +60,7 @@

    is_integral<const char>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_member_function_pointer.html b/doc/html/boost_typetraits/reference/is_member_function_pointer.html index d0809fa..2e80582 100644 --- a/doc/html/boost_typetraits/reference/is_member_function_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_function_pointer.html @@ -3,8 +3,8 @@ is_member_function_pointer - - + + @@ -24,16 +24,16 @@
    template <class T>
    -struct is_member_function_pointer : public true_type-or-false_type {};
    +struct is_member_function_pointer : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - pointer to a member function then inherits from true_type, - otherwise inherits from false_type. + pointer to a member function then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 8.3.3. @@ -50,7 +50,7 @@

    - is_member_function_pointer<int (MyClass::*)(void)> inherits from true_type. + is_member_function_pointer<int (MyClass::*)(void)> inherits from true_type.

    @@ -60,7 +60,7 @@

    is_member_function_pointer<int (MyClass::*)(char)>::type - is the type true_type. + is the type true_type.

    @@ -82,8 +82,8 @@ is_member_function_pointer<int (MyClass::*)>::value is an integral constant expression that evaluates to false: the argument in this case is a pointer to a data member and not a member - function, see is_member_object_pointer - and is_member_pointer + function, see is_member_object_pointer + and is_member_pointer

    diff --git a/doc/html/boost_typetraits/reference/is_member_object_pointer.html b/doc/html/boost_typetraits/reference/is_member_object_pointer.html index 018872c..45340f0 100644 --- a/doc/html/boost_typetraits/reference/is_member_object_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_object_pointer.html @@ -3,8 +3,8 @@ is_member_object_pointer - - + + @@ -24,16 +24,16 @@
    template <class T>
    -struct is_member_object_pointer : public true_type-or-false_type {};
    +struct is_member_object_pointer : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - pointer to a member object (a data member) then inherits from true_type, - otherwise inherits from false_type. + pointer to a member object (a data member) then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 8.3.3. @@ -50,7 +50,7 @@

    - is_member_object_pointer<int (MyClass::*)> inherits from true_type. + is_member_object_pointer<int (MyClass::*)> inherits from true_type.

    @@ -60,7 +60,7 @@

    is_member_object_pointer<double (MyClass::*)>::type - is the type true_type. + is the type true_type.

    @@ -82,8 +82,8 @@ is_member_object_pointer<int (MyClass::*)(void)>::value is an integral constant expression that evaluates to false: the argument in this case is a pointer to a member function and not a - member object, see is_member_function_pointer - and is_member_pointer + member object, see is_member_function_pointer + and is_member_pointer

    diff --git a/doc/html/boost_typetraits/reference/is_member_pointer.html b/doc/html/boost_typetraits/reference/is_member_pointer.html index d5c8263..8746af5 100644 --- a/doc/html/boost_typetraits/reference/is_member_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_pointer.html @@ -3,8 +3,8 @@ is_member_pointer - - + + @@ -24,16 +24,16 @@
    template <class T>
    -struct is_member_pointer : public true_type-or-false_type {};
    +struct is_member_pointer : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) pointer to a member (either a function or a data member) then inherits from - true_type, - otherwise inherits from false_type. + true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 8.3.3. @@ -51,7 +51,7 @@

    is_member_pointer<int (MyClass::*)> - inherits from true_type. + inherits from true_type.

    @@ -60,7 +60,7 @@

    - is_member_pointer<int (MyClass::*)(char)>::type is the type true_type. + is_member_pointer<int (MyClass::*)(char)>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_object.html b/doc/html/boost_typetraits/reference/is_object.html index 9a9a917..7ee8f5e 100644 --- a/doc/html/boost_typetraits/reference/is_object.html +++ b/doc/html/boost_typetraits/reference/is_object.html @@ -3,8 +3,8 @@ is_object - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct is_object : public true_type-or-false_type {};
    +struct is_object : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - object type then inherits from true_type, - otherwise inherits from false_type. + object type then inherits from true_type, + otherwise inherits from false_type. All types are object types except references, void, and function types.

    @@ -51,7 +51,7 @@

    is_object<int> - inherits from true_type. + inherits from true_type.

    @@ -60,7 +60,7 @@

    - is_object<int*>::type is the type true_type. + is_object<int*>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_pod.html b/doc/html/boost_typetraits/reference/is_pod.html index 2912b2b..b354ded 100644 --- a/doc/html/boost_typetraits/reference/is_pod.html +++ b/doc/html/boost_typetraits/reference/is_pod.html @@ -3,8 +3,8 @@ is_pod - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct is_pod : public true_type-or-false_type {};
    +struct is_pod : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - POD type then inherits from true_type, - otherwise inherits from false_type. + POD type then inherits from true_type, + otherwise inherits from false_type.

    POD stands for "Plain old data". Arithmetic types, and enumeration @@ -71,7 +71,7 @@

    is_pod<int> - inherits from true_type. + inherits from true_type.

    @@ -80,7 +80,7 @@

    - is_pod<char*>::type is the type true_type. + is_pod<char*>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_pointer.html b/doc/html/boost_typetraits/reference/is_pointer.html index e4e2036..70a673e 100644 --- a/doc/html/boost_typetraits/reference/is_pointer.html +++ b/doc/html/boost_typetraits/reference/is_pointer.html @@ -3,8 +3,8 @@ is_pointer - - + + @@ -24,16 +24,16 @@
    template <class T>
    -struct is_pointer : public true_type-or-false_type {};
    +struct is_pointer : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) pointer type (includes function pointers, but excludes pointers to members) - then inherits from true_type, - otherwise inherits from false_type. + then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2p2 and 8.3.1. @@ -51,7 +51,7 @@

    is_pointer<int*> - inherits from true_type. + inherits from true_type.

    @@ -60,7 +60,7 @@

    - is_pointer<char* const>::type is the type true_type. + is_pointer<char* const>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_polymorphic.html b/doc/html/boost_typetraits/reference/is_polymorphic.html index 3bf1cfe..751c0a1 100644 --- a/doc/html/boost_typetraits/reference/is_polymorphic.html +++ b/doc/html/boost_typetraits/reference/is_polymorphic.html @@ -3,8 +3,8 @@ is_polymorphic - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct is_polymorphic : public true_type-or-false_type {};
    +struct is_polymorphic : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - polymorphic type then inherits from true_type, - otherwise inherits from false_type. + polymorphic type then inherits from true_type, + otherwise inherits from false_type. Type T must be a complete type.

    @@ -66,7 +66,7 @@

    is_polymorphic<poly> - inherits from true_type. + inherits from true_type.

    @@ -76,7 +76,7 @@

    is_polymorphic<poly const>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_reference.html b/doc/html/boost_typetraits/reference/is_reference.html index 3b9010a..cbfc2fb 100644 --- a/doc/html/boost_typetraits/reference/is_reference.html +++ b/doc/html/boost_typetraits/reference/is_reference.html @@ -3,8 +3,8 @@ is_reference - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct is_reference : public true_type-or-false_type {};
    +struct is_reference : public true_type-or-false_type {};
     

    Inherits: If T is a reference pointer type - then inherits from true_type, - otherwise inherits from false_type. + then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.2 and 8.3.2. @@ -56,7 +56,7 @@

    is_reference<int&> - inherits from true_type. + inherits from true_type.

    @@ -66,7 +66,7 @@

    is_reference<int const&>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_same.html b/doc/html/boost_typetraits/reference/is_same.html index 824003f..db5f67c 100644 --- a/doc/html/boost_typetraits/reference/is_same.html +++ b/doc/html/boost_typetraits/reference/is_same.html @@ -3,8 +3,8 @@ is_same - - + + @@ -24,15 +24,15 @@
    template <class T, class U>
    -struct is_same : public true_type-or-false_type {};
    +struct is_same : public true_type-or-false_type {};
     

    Inherits: If T and U are the same types - then inherits from true_type, - otherwise inherits from false_type. + then inherits from true_type, + otherwise inherits from false_type.

    Header: #include @@ -52,7 +52,7 @@

    is_same<int, int> - inherits from true_type. + inherits from true_type.

    @@ -61,7 +61,7 @@

    - is_same<int, int>::type is the type true_type. + is_same<int, int>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_scalar.html b/doc/html/boost_typetraits/reference/is_scalar.html index 4e0e016..4156ec3 100644 --- a/doc/html/boost_typetraits/reference/is_scalar.html +++ b/doc/html/boost_typetraits/reference/is_scalar.html @@ -3,8 +3,8 @@ is_scalar - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct is_scalar : public true_type-or-false_type {};
    +struct is_scalar : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - scalar type then inherits from true_type, - otherwise inherits from false_type. + scalar type then inherits from true_type, + otherwise inherits from false_type. Scalar types include integral, floating point, enumeration, pointer, and pointer-to-member types.

    @@ -57,7 +57,7 @@

    is_scalar<int*> - inherits from true_type. + inherits from true_type.

    @@ -66,7 +66,7 @@

    - is_scalar<int>::type is the type true_type. + is_scalar<int>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_signed.html b/doc/html/boost_typetraits/reference/is_signed.html index 9f46b2a..9d0a60e 100644 --- a/doc/html/boost_typetraits/reference/is_signed.html +++ b/doc/html/boost_typetraits/reference/is_signed.html @@ -3,8 +3,8 @@ is_signed - - + + @@ -24,16 +24,16 @@
    template <class T>
    -struct is_signed : public true_type-or-false_type {};
    +struct is_signed : public true_type-or-false_type {};
     

    Inherits: If T is an signed integer type or an enumerated type with an underlying signed integer type, then inherits - from true_type, - otherwise inherits from false_type. + from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.1, 7.2. @@ -51,7 +51,7 @@

    is_signed<int> - inherits from true_type. + inherits from true_type.

    @@ -60,7 +60,7 @@

    - is_signed<int const volatile>::type is the type true_type. + is_signed<int const volatile>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_stateless.html b/doc/html/boost_typetraits/reference/is_stateless.html index 43b34e5..d1affc3 100644 --- a/doc/html/boost_typetraits/reference/is_stateless.html +++ b/doc/html/boost_typetraits/reference/is_stateless.html @@ -3,8 +3,8 @@ is_stateless - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct is_stateless : public true_type-or-false_type {};
    +struct is_stateless : public true_type-or-false_type {};
     

    Inherits: Ff T is a stateless type then - inherits from true_type, - otherwise from false_type. + inherits from true_type, + otherwise from false_type.

    Type T must be a complete type. @@ -40,7 +40,7 @@

    A stateless type is a type that has no storage and whose constructors and destructors are trivial. That means that is_stateless - only inherits from true_type + only inherits from true_type if the following expression is true:

    ::boost::has_trivial_constructor<T>::value
    @@ -66,7 +66,7 @@
             Without some (as yet unspecified) help from the compiler, is_stateless will
             never report that a class or struct is stateless; this is always safe, if
             possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have
    -        the necessary compiler intrinsics
    +        the necessary compiler intrinsics
             to make this template work automatically.
           

    diff --git a/doc/html/boost_typetraits/reference/is_union.html b/doc/html/boost_typetraits/reference/is_union.html index 2880c0e..6414d08 100644 --- a/doc/html/boost_typetraits/reference/is_union.html +++ b/doc/html/boost_typetraits/reference/is_union.html @@ -3,8 +3,8 @@ is_union - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct is_union : public true_type-or-false_type {};
    +struct is_union : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - union type then inherits from true_type, - otherwise inherits from false_type. + union type then inherits from true_type, + otherwise inherits from false_type. Currently requires some kind of compiler support, otherwise unions are identified as classes.

    @@ -43,11 +43,11 @@ Compiler Compatibility: Without (some as yet unspecified) help from the compiler, we cannot distinguish between union and class types using only standard C++, as a result this type will never - inherit from true_type, + inherit from true_type, unless the user explicitly specializes the template for their user-defined union types, or unless the compiler supplies some unspecified intrinsic that implements this functionality. Currently (May 2005) only Visual C++ 8 has - the necessary compiler intrinsics + the necessary compiler intrinsics to make this trait "just work" without user intervention.

    @@ -63,7 +63,7 @@

    is_union<void> - inherits from true_type. + inherits from true_type.

    @@ -73,7 +73,7 @@

    is_union<const void>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_unsigned.html b/doc/html/boost_typetraits/reference/is_unsigned.html index d892e68..4b65cc8 100644 --- a/doc/html/boost_typetraits/reference/is_unsigned.html +++ b/doc/html/boost_typetraits/reference/is_unsigned.html @@ -3,8 +3,8 @@ is_unsigned - - + + @@ -24,16 +24,16 @@
    template <class T>
    -struct is_unsigned : public true_type-or-false_type {};
    +struct is_unsigned : public true_type-or-false_type {};
     

    Inherits: If T is an unsigned integer type or an enumerated type with an underlying unsigned integer type, then inherits - from true_type, - otherwise inherits from false_type. + from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.1, 7.2. @@ -50,7 +50,7 @@

    - is_unsigned<unsigned int> inherits from true_type. + is_unsigned<unsigned int> inherits from true_type.

    @@ -61,7 +61,7 @@

    is_unsigned<unsigned int const volatile>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_void.html b/doc/html/boost_typetraits/reference/is_void.html index 569a964..74b28fc 100644 --- a/doc/html/boost_typetraits/reference/is_void.html +++ b/doc/html/boost_typetraits/reference/is_void.html @@ -3,8 +3,8 @@ is_void - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct is_void : public true_type-or-false_type {};
    +struct is_void : public true_type-or-false_type {};
     

    Inherits: If T is a (possibly cv-qualified) - void type then inherits from true_type, - otherwise inherits from false_type. + void type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.1p9. @@ -50,7 +50,7 @@

    is_void<void> - inherits from true_type. + inherits from true_type.

    @@ -60,7 +60,7 @@

    is_void<const void>::type - is the type true_type. + is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/is_volatile.html b/doc/html/boost_typetraits/reference/is_volatile.html index ca4673b..da7500e 100644 --- a/doc/html/boost_typetraits/reference/is_volatile.html +++ b/doc/html/boost_typetraits/reference/is_volatile.html @@ -3,8 +3,8 @@ is_volatile - - + + @@ -24,15 +24,15 @@
    template <class T>
    -struct is_volatile : public true_type-or-false_type {};
    +struct is_volatile : public true_type-or-false_type {};
     

    Inherits: If T is a (top level) volatile-qualified - type then inherits from true_type, - otherwise inherits from false_type. + type then inherits from true_type, + otherwise inherits from false_type.

    C++ Standard Reference: 3.9.3. @@ -49,7 +49,7 @@

    - is_volatile<volatile int> inherits from true_type. + is_volatile<volatile int> inherits from true_type.

    @@ -59,7 +59,7 @@

    is_volatile<const volatile - int>::type is the type true_type. + int>::type is the type true_type.

    diff --git a/doc/html/boost_typetraits/reference/make_signed.html b/doc/html/boost_typetraits/reference/make_signed.html index 8c6417a..4e37228 100644 --- a/doc/html/boost_typetraits/reference/make_signed.html +++ b/doc/html/boost_typetraits/reference/make_signed.html @@ -3,8 +3,8 @@ make_signed - - + + @@ -24,7 +24,7 @@
    template <class T>
     struct make_signed
    @@ -54,7 +54,7 @@
             or  #include <boost/type_traits.hpp>
           

    -

    Table 1.15. Examples

    +

    Table 1.15. Examples

    diff --git a/doc/html/boost_typetraits/reference/make_unsigned.html b/doc/html/boost_typetraits/reference/make_unsigned.html index 3038f21..76386a0 100644 --- a/doc/html/boost_typetraits/reference/make_unsigned.html +++ b/doc/html/boost_typetraits/reference/make_unsigned.html @@ -3,8 +3,8 @@ make_unsigned - - + + @@ -24,7 +24,7 @@
    template <class T>
     struct make_unsigned
    @@ -54,7 +54,7 @@
             or  #include <boost/type_traits.hpp>
           

    -

    Table 1.16. Examples

    +

    Table 1.16. Examples

    @@ -76,7 +76,7 @@ @@ -102,7 +102,7 @@ @@ -116,7 +116,7 @@

    - make_signed<int>::type + make_unsigned<int>::type

    @@ -88,7 +88,7 @@

    - make_signed<unsigned int + make_unsigned<unsigned int const>::type

    - make_signed<const unsigned + make_unsigned<const unsigned long long>::type

    - make_signed<my_enum>::type + make_unsigned<my_enum>::type

    @@ -128,7 +128,7 @@

    - make_signed<wchar_t>::type + make_unsigned<wchar_t>::type

    diff --git a/doc/html/boost_typetraits/reference/promote.html b/doc/html/boost_typetraits/reference/promote.html index f7fbda1..1f648d9 100644 --- a/doc/html/boost_typetraits/reference/promote.html +++ b/doc/html/boost_typetraits/reference/promote.html @@ -3,8 +3,8 @@ promote - - + + @@ -24,7 +24,7 @@
    template <class T>
     struct promote
    @@ -38,8 +38,8 @@
             then applies integral and floating point promotions to T
             and keeps cv-qualifiers of T,
             otherwise leaves T unchanged.
    -        See also integral_promotion
    -        and floating_point_promotion.
    +        See also integral_promotion
    +        and floating_point_promotion.
           

    C++ Standard Reference: 4.5 except 4.5/3 @@ -51,7 +51,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.17. Examples

    +

    Table 1.17. Examples

    diff --git a/doc/html/boost_typetraits/reference/rank.html b/doc/html/boost_typetraits/reference/rank.html index 96ff595..fd93fa6 100644 --- a/doc/html/boost_typetraits/reference/rank.html +++ b/doc/html/boost_typetraits/reference/rank.html @@ -3,8 +3,8 @@ rank - - + + @@ -24,14 +24,14 @@
    template <class T>
    -struct rank : public integral_constant<std::size_t, RANK(T)> {};
    +struct rank : public integral_constant<std::size_t, RANK(T)> {};
     

    Inherits: Class template rank inherits from - integral_constant<std::size_t, RANK(T)>, + integral_constant<std::size_t, RANK(T)>, where RANK(T) is the number of array dimensions in type T.

    @@ -52,7 +52,7 @@

    rank<int[]> - inherits from integral_constant<std::size_t, 1>. + inherits from integral_constant<std::size_t, 1>.

    @@ -61,7 +61,7 @@

    - rank<double[2][3][4]>::type is the type integral_constant<std::size_t, 3>. + rank<double[2][3][4]>::type is the type integral_constant<std::size_t, 3>.

    diff --git a/doc/html/boost_typetraits/reference/remove_all_extents.html b/doc/html/boost_typetraits/reference/remove_all_extents.html index 82a2d2e..b8d5c4c 100644 --- a/doc/html/boost_typetraits/reference/remove_all_extents.html +++ b/doc/html/boost_typetraits/reference/remove_all_extents.html @@ -3,8 +3,8 @@ remove_all_extents - - + + @@ -24,7 +24,7 @@
    template <class T>
     struct remove_all_extents
    @@ -45,7 +45,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.18. Examples

    +

    Table 1.18. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_const.html b/doc/html/boost_typetraits/reference/remove_const.html index 1d74c46..cc30157 100644 --- a/doc/html/boost_typetraits/reference/remove_const.html +++ b/doc/html/boost_typetraits/reference/remove_const.html @@ -3,8 +3,8 @@ remove_const - - + + @@ -24,7 +24,7 @@
    template <class T>
     struct remove_const
    @@ -44,7 +44,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.19. Examples

    +

    Table 1.19. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_cv.html b/doc/html/boost_typetraits/reference/remove_cv.html index a41d72d..2f8b2be 100644 --- a/doc/html/boost_typetraits/reference/remove_cv.html +++ b/doc/html/boost_typetraits/reference/remove_cv.html @@ -3,8 +3,8 @@ remove_cv - - + + @@ -24,7 +24,7 @@
    template <class T>
     struct remove_cv
    @@ -44,7 +44,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.20. Examples

    +

    Table 1.20. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_extent.html b/doc/html/boost_typetraits/reference/remove_extent.html index c2044b8..cb28caa 100644 --- a/doc/html/boost_typetraits/reference/remove_extent.html +++ b/doc/html/boost_typetraits/reference/remove_extent.html @@ -3,8 +3,8 @@ remove_extent - - + + @@ -24,7 +24,7 @@
    template <class T>
     struct remove_extent
    @@ -45,7 +45,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.21. Examples

    +

    Table 1.21. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_pointer.html b/doc/html/boost_typetraits/reference/remove_pointer.html index af472a0..09a8a02 100644 --- a/doc/html/boost_typetraits/reference/remove_pointer.html +++ b/doc/html/boost_typetraits/reference/remove_pointer.html @@ -3,8 +3,8 @@ remove_pointer - - + + @@ -24,7 +24,7 @@
    template <class T>
     struct remove_pointer
    @@ -44,7 +44,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.22. Examples

    +

    Table 1.22. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_reference.html b/doc/html/boost_typetraits/reference/remove_reference.html index 26e32f3..03c9472 100644 --- a/doc/html/boost_typetraits/reference/remove_reference.html +++ b/doc/html/boost_typetraits/reference/remove_reference.html @@ -3,8 +3,8 @@ remove_reference - - + + @@ -24,7 +24,7 @@
    template <class T>
     struct remove_reference
    @@ -44,7 +44,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.23. Examples

    +

    Table 1.23. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_volatile.html b/doc/html/boost_typetraits/reference/remove_volatile.html index 3e7771b..947a9d7 100644 --- a/doc/html/boost_typetraits/reference/remove_volatile.html +++ b/doc/html/boost_typetraits/reference/remove_volatile.html @@ -3,8 +3,8 @@ remove_volatile - - + + @@ -24,7 +24,7 @@
    template <class T>
     struct remove_volatile
    @@ -44,7 +44,7 @@
             does not support partial specialization of class-templates then this template
             will compile, but the member type
             will always be the same as type T
    -        except where compiler
    +        except where compiler
             workarounds have been applied.
           

    @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.24. Examples

    +

    Table 1.24. Examples

    diff --git a/doc/html/boost_typetraits/reference/type_with_alignment.html b/doc/html/boost_typetraits/reference/type_with_alignment.html index 0a619f3..555de35 100644 --- a/doc/html/boost_typetraits/reference/type_with_alignment.html +++ b/doc/html/boost_typetraits/reference/type_with_alignment.html @@ -3,8 +3,8 @@ type_with_alignment - - + + @@ -24,7 +24,7 @@
    template <std::size_t Align>
     struct type_with_alignment
    diff --git a/doc/html/boost_typetraits/user_defined.html b/doc/html/boost_typetraits/user_defined.html
    index 7eaa8ce..55262bc 100644
    --- a/doc/html/boost_typetraits/user_defined.html
    +++ b/doc/html/boost_typetraits/user_defined.html
    @@ -3,8 +3,8 @@
     
     User Defined Specializations
     
    -
    -
    +
    +
     
     
     
    @@ -24,14 +24,14 @@
     

    Occationally the end user may need to provide their own specialization for one of the type traits - typically where intrinsic compiler support is required to implement a specific trait fully. These specializations should derive from - boost::true_type - or boost::false_type + boost::true_type + or boost::false_type as appropriate:

    #include <boost/type_traits/is_pod.hpp>
    @@ -48,16 +48,16 @@
     namespace boost
     {
        template<>
    -   struct is_pod<my_pod> : public true_type{};
    +   struct is_pod<my_pod> : public true_type{};
           
        template<>
    -   struct is_pod<my_union> : public true_type{};
    +   struct is_pod<my_union> : public true_type{};
        
        template<>
    -   struct is_union<my_union> : public true_type{};
    +   struct is_union<my_union> : public true_type{};
        
        template<>
    -   struct is_class<my_union> : public false_type{};
    +   struct is_class<my_union> : public false_type{};
     }
     
    diff --git a/doc/html/index.html b/doc/html/index.html index d3dab47..c81c06b 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -3,8 +3,8 @@ Chapter 1. Boost.TypeTraits - - + + @@ -30,7 +30,7 @@ Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert Ramey and Jeremy Siek

    -

    +

    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)

    diff --git a/doc/make_unsigned.qbk b/doc/make_unsigned.qbk index bbdca75..cd9bd76 100644 --- a/doc/make_unsigned.qbk +++ b/doc/make_unsigned.qbk @@ -32,14 +32,14 @@ __header ` #include ` or ` #include ::type`][`unsigned int`]] +[[`make_unsigned::type`][`unsigned int`]] -[[`make_signed::type`] [`unsigned int const`]] +[[`make_unsigned::type`] [`unsigned int const`]] -[[`make_signed::type`] [`const unsigned long long`]] +[[`make_unsigned::type`] [`const unsigned long long`]] -[[`make_signed::type`] [An unsigned integer type with the same width as the enum.]] -[[`make_signed::type`] [An unsigned integer type with the same width as wchar_t.]] +[[`make_unsigned::type`] [An unsigned integer type with the same width as the enum.]] +[[`make_unsigned::type`] [An unsigned integer type with the same width as wchar_t.]] ] From cde7a04813dc9d5af28969788df5c12993f4d772 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 17 Feb 2009 10:05:58 +0000 Subject: [PATCH 32/92] Add PDF generation options to fix external links to point to the web site. Added a few more Boostbook based libs that were missed first time around. Fixed PDF naming issues. [SVN r51284] --- doc/Jamfile.v2 | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index c15db9f..9cd3d19 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -58,6 +58,7 @@ boostbook standalone # better use SVG's instead: pdf:admon.graphics.extension=".svg" pdf:admon.graphics.path=$(boost-images)/ + pdf:boost.url.prefix=http://www.boost.org/doc/libs/release/libs/type_traits/doc/html ; #install html : ../../../doc/html/boostbook.css ; From 44bd98cc6b63d6e97be44953e1e880327eaefe3d Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 13 Mar 2009 17:55:21 +0000 Subject: [PATCH 33/92] Add is_virtual_base_of. Add extra tests for is_base_of to test virtual inheritance. Trivial warning fix for is_abstract: fixes #2827. [SVN r51754] --- include/boost/type_traits/is_abstract.hpp | 4 +- .../boost/type_traits/is_virtual_base_of.hpp | 87 +++++++++++++++++++ test/is_base_of_test.cpp | 2 + test/is_virtual_base_of_test.cpp | 54 ++++++++++++ test/test.hpp | 5 +- 5 files changed, 148 insertions(+), 4 deletions(-) create mode 100644 include/boost/type_traits/is_virtual_base_of.hpp mode change 100755 => 100644 test/is_base_of_test.cpp create mode 100644 test/is_virtual_base_of_test.cpp diff --git a/include/boost/type_traits/is_abstract.hpp b/include/boost/type_traits/is_abstract.hpp index 15d4afe..a11718d 100644 --- a/include/boost/type_traits/is_abstract.hpp +++ b/include/boost/type_traits/is_abstract.hpp @@ -92,13 +92,13 @@ struct is_abstract_imp2 // GCC2 won't even parse this template if we embed the computation // of s1 in the computation of value. #ifdef __GNUC__ - BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(is_abstract_imp2::template check_sig(0))); + BOOST_STATIC_CONSTANT(std::size_t, s1 = sizeof(is_abstract_imp2::template check_sig(0))); #else #if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif - BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig(0))); + BOOST_STATIC_CONSTANT(std::size_t, s1 = sizeof(check_sig(0))); #if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) #pragma warning(pop) #endif diff --git a/include/boost/type_traits/is_virtual_base_of.hpp b/include/boost/type_traits/is_virtual_base_of.hpp new file mode 100644 index 0000000..74cbe4e --- /dev/null +++ b/include/boost/type_traits/is_virtual_base_of.hpp @@ -0,0 +1,87 @@ +// (C) Copyright Daniel Frey and Robert Ramey 2009. +// Use, modification and distribution are subject to 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). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_VIRTUAL_BASE_OF_HPP_INCLUDED +#define BOOST_TT_IS_VIRTUAL_BASE_OF_HPP_INCLUDED + +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { +namespace detail { + + +#ifdef BOOST_MSVC +#pragma warning( push ) +#pragma warning( disable : 4584 ) +#elif defined __GNUC__ +#pragma GCC system_header +#endif + +template +struct is_virtual_base_of_impl +{ + BOOST_STATIC_CONSTANT(bool, value = false); +}; + +template +struct is_virtual_base_of_impl +{ + struct X : Derived, virtual Base + { + X(); + X(const X&); + X& operator=(const X&); + ~X(); + }; + struct Y : Derived + { + Y(); + Y(const Y&); + Y& operator=(const Y&); + ~Y(); + }; + BOOST_STATIC_CONSTANT(bool, value = sizeof(X)==sizeof(Y)); +}; + +template +struct is_virtual_base_of_impl2 +{ + typedef typename mpl::and_, mpl::not_ > >::type tag_type; + typedef is_virtual_base_of_impl imp; + BOOST_STATIC_CONSTANT(bool, value = imp::value); +}; + +#ifdef BOOST_MSVC +#pragma warning( pop ) +#endif + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF2( + is_virtual_base_of + , Base + , Derived + , (::boost::detail::is_virtual_base_of_impl2::value) +) + +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_virtual_base_of,Base&,Derived,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_virtual_base_of,Base,Derived&,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_virtual_base_of,Base&,Derived&,false) +#endif + +} // namespace boost + +#include + +#endif diff --git a/test/is_base_of_test.cpp b/test/is_base_of_test.cpp old mode 100755 new mode 100644 index 97d29c1..6817ffb --- a/test/is_base_of_test.cpp +++ b/test/is_base_of_test.cpp @@ -36,6 +36,8 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); TT_TEST_END diff --git a/test/is_virtual_base_of_test.cpp b/test/is_virtual_base_of_test.cpp new file mode 100644 index 0000000..6c3dc2a --- /dev/null +++ b/test/is_virtual_base_of_test.cpp @@ -0,0 +1,54 @@ + +// (C) Copyright John Maddock 2009. +// Use, modification and distribution are subject to 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 "test.hpp" +#include "check_integral_constant.hpp" +#include + + +TT_TEST_BEGIN(is_virtual_base_of) + +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); // really it is!!!!! +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); + +TT_TEST_END + + + + + + + + + diff --git a/test/test.hpp b/test/test.hpp index 2e354b9..972441b 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -367,8 +367,9 @@ struct polymorphic_derived2 : polymorphic_base struct virtual_inherit1 : virtual Base { }; struct virtual_inherit2 : virtual_inherit1 { }; - - +struct virtual_inherit3 : private virtual Base {}; +struct virtual_inherit4 : private virtual boost::noncopyable {}; +struct virtual_inherit5 : private virtual int_convertible {}; typedef void foo0_t(); typedef void foo1_t(int); From 0ab92896c6dfea4861a9687607ea521852c72686 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 24 Mar 2009 13:35:49 +0000 Subject: [PATCH 34/92] Added has_new_operator from Robert Ramey. [SVN r51955] --- .../boost/type_traits/has_new_operator.hpp | 113 +++++++++++ test/has_operator_new_test.cpp | 181 ++++++++++++++++++ 2 files changed, 294 insertions(+) create mode 100644 include/boost/type_traits/has_new_operator.hpp create mode 100644 test/has_operator_new_test.cpp diff --git a/include/boost/type_traits/has_new_operator.hpp b/include/boost/type_traits/has_new_operator.hpp new file mode 100644 index 0000000..13cd167 --- /dev/null +++ b/include/boost/type_traits/has_new_operator.hpp @@ -0,0 +1,113 @@ + +// (C) Copyright Runar Undheim, Robert Ramey & John Maddock 2008. +// Use, modification and distribution are subject to 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). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_HAS_NEW_OPERATOR_HPP_INCLUDED +#define BOOST_TT_HAS_NEW_OPERATOR_HPP_INCLUDED + +#include +#include +#include + +// should be the last #include +#include + +namespace boost { +namespace detail { + template + struct test; + + template + struct has_new_operator_impl { + template + static type_traits::yes_type check_sig( + U*, + test< + void *(*)(std::size_t), + &U::operator new + >* = NULL + ); + template + static type_traits::yes_type check_sig( + U*, + test< + void *(*)(std::size_t, const std::nothrow_t&), + &U::operator new + >* = NULL + ); + template + static type_traits::yes_type check_sig( + U*, + test< + void *(*)(std::size_t, void*), + &U::operator new + >* = NULL + ); + template + static type_traits::no_type check_sig(...); + + template + static type_traits::yes_type check_sig2( + U*, + test< + void *(*)(std::size_t), + &U::operator new[] + >* = NULL + ); + template + static type_traits::yes_type check_sig2( + U*, + test< + void *(*)(std::size_t, const std::nothrow_t&), + &U::operator new[] + >* = NULL + ); + template + static type_traits::yes_type check_sig2( + U*, + test< + void *(*)(std::size_t, void*), + &U::operator new[] + >* = NULL + ); + template + static type_traits::no_type check_sig2(...); + + // GCC2 won't even parse this template if we embed the computation + // of s1 in the computation of value. + #ifdef __GNUC__ + BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(has_new_operator_impl::template check_sig(0))); + BOOST_STATIC_CONSTANT(unsigned, s2 = sizeof(has_new_operator_impl::template check_sig2(0))); + #else + #if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) + #pragma warning(push) + #pragma warning(disable:6334) + #endif + + BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig(0))); + BOOST_STATIC_CONSTANT(unsigned, s2 = sizeof(check_sig2(0))); + + #if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) + #pragma warning(pop) + #endif + #endif + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_or< + (s1 == sizeof(type_traits::yes_type)), + (s2 == sizeof(type_traits::yes_type)) + >::value) + ); + }; +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_new_operator,T,::boost::detail::has_new_operator_impl::value) + +} // namespace boost + +#include + +#endif // BOOST_TT_HAS_NEW_OPERATOR_HPP_INCLUDED diff --git a/test/has_operator_new_test.cpp b/test/has_operator_new_test.cpp new file mode 100644 index 0000000..d9e9349 --- /dev/null +++ b/test/has_operator_new_test.cpp @@ -0,0 +1,181 @@ +// (C) Copyright John Maddock 2000. +// Use, modification and distribution are subject to 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 "test.hpp" +#include "check_integral_constant.hpp" +#include + +struct class_with_new_op { + void * operator new(std::size_t); +}; + +struct derived_class_with_new_op : public class_with_new_op {}; + +struct class_with_new_op2 { + void* operator new(std::size_t size, const std::nothrow_t&); +}; + +struct class_with_new_op3 { + void* operator new[](std::size_t size); +}; + +struct class_with_new_op4 { + void* operator new[](std::size_t size, const std::nothrow_t&); +}; + +struct class_with_new_op5 { + void* operator new (std::size_t size, void* ptr); +}; + +struct class_with_new_op6 { + void* operator new[] (std::size_t size, void* ptr); +}; + +TT_TEST_BEGIN(has_new_operator) + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, true); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); + +#ifdef BOOST_HAS_LONG_LONG + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::ulong_long_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::long_long_type>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::ulong_long_type const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::long_long_type const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::ulong_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::long_long_type volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::ulong_long_type const volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::long_long_type const volatile>::value, false); + +#endif + +#ifdef BOOST_HAS_MS_INT64 + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int8>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int8 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int8 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int8 const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int16>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int16 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int16 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int16 const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int32>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int32 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int32 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int32 const volatile>::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int64>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int64 const>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int64 volatile>::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int64 const volatile>::value, false); + +#endif + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); + +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); + +TT_TEST_END From b253d45376bd004ab4910865b5bbb77212e53087 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 26 Mar 2009 17:57:05 +0000 Subject: [PATCH 35/92] Mostly fix is_virtual_base_of on Borland. [SVN r51988] --- include/boost/type_traits/is_virtual_base_of.hpp | 6 +++--- test/is_virtual_base_of_test.cpp | 3 ++- test/test.hpp | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/boost/type_traits/is_virtual_base_of.hpp b/include/boost/type_traits/is_virtual_base_of.hpp index 74cbe4e..5dc93c4 100644 --- a/include/boost/type_traits/is_virtual_base_of.hpp +++ b/include/boost/type_traits/is_virtual_base_of.hpp @@ -36,21 +36,21 @@ struct is_virtual_base_of_impl template struct is_virtual_base_of_impl { - struct X : Derived, virtual Base + struct X : public virtual Derived, public virtual Base { X(); X(const X&); X& operator=(const X&); ~X(); }; - struct Y : Derived + struct Y : public virtual Derived { Y(); Y(const Y&); Y& operator=(const Y&); ~Y(); }; - BOOST_STATIC_CONSTANT(bool, value = sizeof(X)==sizeof(Y)); + BOOST_STATIC_CONSTANT(bool, value = (sizeof(X)==sizeof(Y))); }; template diff --git a/test/is_virtual_base_of_test.cpp b/test/is_virtual_base_of_test.cpp index 6c3dc2a..4e33714 100644 --- a/test/is_virtual_base_of_test.cpp +++ b/test/is_virtual_base_of_test.cpp @@ -9,7 +9,6 @@ #include "check_integral_constant.hpp" #include - TT_TEST_BEGIN(is_virtual_base_of) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); @@ -35,7 +34,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of:: BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +#ifndef BOOST_BROKEN_IS_BASE_AND_DERIVED BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), true); +#endif BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); diff --git a/test/test.hpp b/test/test.hpp index 972441b..8916078 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -368,8 +368,8 @@ struct polymorphic_derived2 : polymorphic_base struct virtual_inherit1 : virtual Base { }; struct virtual_inherit2 : virtual_inherit1 { }; struct virtual_inherit3 : private virtual Base {}; -struct virtual_inherit4 : private virtual boost::noncopyable {}; -struct virtual_inherit5 : private virtual int_convertible {}; +struct virtual_inherit4 : virtual boost::noncopyable {}; +struct virtual_inherit5 : virtual int_convertible {}; typedef void foo0_t(); typedef void foo1_t(int); From da752aaaa983de11ff68d058b0cc8e4233b68f3c Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 30 Mar 2009 16:06:39 +0000 Subject: [PATCH 36/92] Revert Borland specific fix for non-Borland compilers as it breaks some of them :-( [SVN r52057] --- .../boost/type_traits/is_virtual_base_of.hpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/boost/type_traits/is_virtual_base_of.hpp b/include/boost/type_traits/is_virtual_base_of.hpp index 5dc93c4..e3dd441 100644 --- a/include/boost/type_traits/is_virtual_base_of.hpp +++ b/include/boost/type_traits/is_virtual_base_of.hpp @@ -36,6 +36,7 @@ struct is_virtual_base_of_impl template struct is_virtual_base_of_impl { +#ifdef __BORLANDC__ struct X : public virtual Derived, public virtual Base { X(); @@ -50,6 +51,22 @@ struct is_virtual_base_of_impl Y& operator=(const Y&); ~Y(); }; +#else + struct X : Derived, virtual Base + { + X(); + X(const X&); + X& operator=(const X&); + ~X(); + }; + struct Y : Derived + { + Y(); + Y(const Y&); + Y& operator=(const Y&); + ~Y(); + }; +#endif BOOST_STATIC_CONSTANT(bool, value = (sizeof(X)==sizeof(Y))); }; From 8ecf616c39d33f3802c300e20510276950edb5f3 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 30 Mar 2009 17:02:46 +0000 Subject: [PATCH 37/92] Added docs for the new has_new_operator and is_virtual_base_of traits. [SVN r52060] --- doc/has_new_operator.qbk | 49 ++++++ doc/html/boost_typetraits/background.html | 22 +-- .../boost_typetraits/category/transform.html | 2 +- .../category/value_traits/properties.html | 3 + .../category/value_traits/relate.html | 3 + doc/html/boost_typetraits/intrinsics.html | 2 +- doc/html/boost_typetraits/reference.html | 2 + .../boost_typetraits/reference/add_const.html | 2 +- .../boost_typetraits/reference/add_cv.html | 2 +- .../reference/add_pointer.html | 2 +- .../reference/add_reference.html | 2 +- .../reference/add_volatile.html | 2 +- .../boost_typetraits/reference/decay.html | 2 +- .../reference/floating_point_promotion.html | 2 +- .../reference/function_traits.html | 10 +- .../reference/has_new_operator.html | 144 ++++++++++++++++++ .../reference/has_nothrow_assign.html | 6 +- .../reference/integral_promotion.html | 2 +- .../reference/is_unsigned.html | 6 +- .../reference/is_virtual_base_of.html | 132 ++++++++++++++++ .../boost_typetraits/reference/is_void.html | 6 +- .../reference/make_signed.html | 2 +- .../reference/make_unsigned.html | 2 +- .../boost_typetraits/reference/promote.html | 2 +- .../reference/remove_all_extents.html | 2 +- .../reference/remove_const.html | 2 +- .../boost_typetraits/reference/remove_cv.html | 2 +- .../reference/remove_extent.html | 2 +- .../reference/remove_pointer.html | 2 +- .../reference/remove_reference.html | 2 +- .../reference/remove_volatile.html | 2 +- doc/html/index.html | 4 +- doc/is_virtual_base_of.qbk | 40 +++++ doc/type_traits.qbk | 4 + doc/value_traits.qbk | 6 + 35 files changed, 431 insertions(+), 46 deletions(-) create mode 100644 doc/has_new_operator.qbk create mode 100644 doc/html/boost_typetraits/reference/has_new_operator.html create mode 100644 doc/html/boost_typetraits/reference/is_virtual_base_of.html create mode 100644 doc/is_virtual_base_of.qbk diff --git a/doc/has_new_operator.qbk b/doc/has_new_operator.qbk new file mode 100644 index 0000000..72e0d4c --- /dev/null +++ b/doc/has_new_operator.qbk @@ -0,0 +1,49 @@ +[/ + Copyright 2009 John Maddock. + 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). +] + +[section:has_new_operator has_new_operator] + template + struct has_new_operator : public __tof {}; + +__inherit If T is a (possibly cv-qualified) type with an overloaded new-operator +then inherits from __true_type, otherwise inherits from __false_type. + +__compat Not usable with compilers that do not support "substitution failure is not an error" +(in which case BOOST_NO_SFINAE will be defined), also known to be broken with +the Borland/Codegear compiler. + +__std_ref 12.5. + +__header ` #include ` or ` #include ` + +__examples + +Given: + + class A { void* operator new(std::size_t); }; + class B { void* operator new(std::size_t, const std::nothrow&); }; + class C { void* operator new(std::size_t, void*); }; + class D { void* operator new[](std::size_t); }; + class E { void* operator new[](std::size_t, const std::nothrow&); }; + class F { void* operator new[](std::size_t, void*); }; + +Then: + +[:`has_new_operator` inherits from `__true_type`.] + +[:`has_new_operator` inherits from `__true_type`.] + +[:`has_new_operator` inherits from `__true_type`.] + +[:`has_new_operator` inherits from `__true_type`.] + +[:`has_new_operator` inherits from `__true_type`.] + +[:`has_new_operator` inherits from `__true_type`.] + +[endsect] + diff --git a/doc/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index 9f5e61f..b18d244 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -56,7 +56,7 @@ method available to them.

    - + Type Traits

    @@ -84,7 +84,7 @@ given.

    - + Implementation

    @@ -174,7 +174,7 @@ in the default template.

    - + Optimized copy

    @@ -247,7 +247,7 @@ otherwise it will call the "slow but safe version".

    - + Was it worth it?

    @@ -280,7 +280,7 @@

    -

    Table 1.1. Time taken to copy 1000 elements using `copy<const +

    Table 1.1. Time taken to copy 1000 elements using `copy<const T*, T*>` (times in micro-seconds)

    @@ -379,7 +379,7 @@

    - + Pair of References

    @@ -416,7 +416,7 @@ to hold non-reference types, references, and constant references:

    -

    Table 1.2. Required Constructor Argument Types

    +

    Table 1.2. Required Constructor Argument Types

    @@ -481,7 +481,7 @@ adds a reference to its type, unless it is already a reference.

    -

    Table 1.3. Using add_reference to synthesize the correct constructor +

    Table 1.3. Using add_reference to synthesize the correct constructor type

    @@ -598,7 +598,7 @@ easier to maintain and easier to understand.

    - + Conclusion

    @@ -611,7 +611,7 @@ can be optimal as well as generic.

    - + Acknowledgements

    @@ -619,7 +619,7 @@ comments when preparing this article.

    - + References
      diff --git a/doc/html/boost_typetraits/category/transform.html b/doc/html/boost_typetraits/category/transform.html index 01b677b..9da2050 100644 --- a/doc/html/boost_typetraits/category/transform.html +++ b/doc/html/boost_typetraits/category/transform.html @@ -91,7 +91,7 @@ struct remove_volatile;
      - + Broken Compiler Workarounds:
      diff --git a/doc/html/boost_typetraits/category/value_traits/properties.html b/doc/html/boost_typetraits/category/value_traits/properties.html index 31761d3..c542c7b 100644 --- a/doc/html/boost_typetraits/category/value_traits/properties.html +++ b/doc/html/boost_typetraits/category/value_traits/properties.html @@ -36,6 +36,9 @@
      template <class T>
       struct alignment_of;
       
      +template <class T>
      +struct has_new_operator;
      +
       template <class T>
       struct has_nothrow_assign;
       
      diff --git a/doc/html/boost_typetraits/category/value_traits/relate.html b/doc/html/boost_typetraits/category/value_traits/relate.html
      index 5975a0e..b51ce35 100644
      --- a/doc/html/boost_typetraits/category/value_traits/relate.html
      +++ b/doc/html/boost_typetraits/category/value_traits/relate.html
      @@ -37,6 +37,9 @@
       
      template <class Base, class Derived>
       struct is_base_of;
       
      +template <class Base, class Derived>
      +struct is_virtual_base_of;
      +
       template <class From, class To>
       struct is_convertible;
       
      diff --git a/doc/html/boost_typetraits/intrinsics.html b/doc/html/boost_typetraits/intrinsics.html
      index e81984e..ccbf12e 100644
      --- a/doc/html/boost_typetraits/intrinsics.html
      +++ b/doc/html/boost_typetraits/intrinsics.html
      @@ -71,7 +71,7 @@
             of the following macros:
           

      -

      Table 1.4. Macros for Compiler Intrinsics

      +

      Table 1.4. Macros for Compiler Intrinsics

    diff --git a/doc/html/boost_typetraits/reference.html b/doc/html/boost_typetraits/reference.html index bb362a2..b2c2e5a 100644 --- a/doc/html/boost_typetraits/reference.html +++ b/doc/html/boost_typetraits/reference.html @@ -39,6 +39,7 @@
    floating_point_promotion
    function_traits
    +
    has_new_operator
    has_nothrow_assign
    has_nothrow_constructor
    @@ -86,6 +87,7 @@
    is_reference
    is_union
    is_unsigned
    +
    is_virtual_base_of
    is_void
    is_volatile
    make_signed
    diff --git a/doc/html/boost_typetraits/reference/add_const.html b/doc/html/boost_typetraits/reference/add_const.html index 4164c1c..c14f17f 100644 --- a/doc/html/boost_typetraits/reference/add_const.html +++ b/doc/html/boost_typetraits/reference/add_const.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.5. Examples

    +

    Table 1.5. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_cv.html b/doc/html/boost_typetraits/reference/add_cv.html index aded111..e9312c7 100644 --- a/doc/html/boost_typetraits/reference/add_cv.html +++ b/doc/html/boost_typetraits/reference/add_cv.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.6. Examples

    +

    Table 1.6. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_pointer.html b/doc/html/boost_typetraits/reference/add_pointer.html index 4d1f84c..c8e7569 100644 --- a/doc/html/boost_typetraits/reference/add_pointer.html +++ b/doc/html/boost_typetraits/reference/add_pointer.html @@ -56,7 +56,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.7. Examples

    +

    Table 1.7. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_reference.html b/doc/html/boost_typetraits/reference/add_reference.html index 621e022..39e4c2c 100644 --- a/doc/html/boost_typetraits/reference/add_reference.html +++ b/doc/html/boost_typetraits/reference/add_reference.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.8. Examples

    +

    Table 1.8. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_volatile.html b/doc/html/boost_typetraits/reference/add_volatile.html index 449f3d4..20062c0 100644 --- a/doc/html/boost_typetraits/reference/add_volatile.html +++ b/doc/html/boost_typetraits/reference/add_volatile.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.9. Examples

    +

    Table 1.9. Examples

    diff --git a/doc/html/boost_typetraits/reference/decay.html b/doc/html/boost_typetraits/reference/decay.html index 088b574..6e4af7b 100644 --- a/doc/html/boost_typetraits/reference/decay.html +++ b/doc/html/boost_typetraits/reference/decay.html @@ -48,7 +48,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.10. Examples

    +

    Table 1.10. Examples

    diff --git a/doc/html/boost_typetraits/reference/floating_point_promotion.html b/doc/html/boost_typetraits/reference/floating_point_promotion.html index 75aeb25..d63eadd 100644 --- a/doc/html/boost_typetraits/reference/floating_point_promotion.html +++ b/doc/html/boost_typetraits/reference/floating_point_promotion.html @@ -49,7 +49,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.11. Examples

    +

    Table 1.11. Examples

    diff --git a/doc/html/boost_typetraits/reference/function_traits.html b/doc/html/boost_typetraits/reference/function_traits.html index 66f56c0..9bf4a8a 100644 --- a/doc/html/boost_typetraits/reference/function_traits.html +++ b/doc/html/boost_typetraits/reference/function_traits.html @@ -7,7 +7,7 @@ - +
    @@ -20,7 +20,7 @@

    -PrevUpHomeNext +PrevUpHomeNext

    @@ -59,7 +59,7 @@

    -

    Table 1.12. Function Traits Members

    +

    Table 1.12. Function Traits Members

    @@ -122,7 +122,7 @@

    -

    Table 1.13. Examples

    +

    Table 1.13. Examples

    @@ -269,7 +269,7 @@

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/boost_typetraits/reference/has_new_operator.html b/doc/html/boost_typetraits/reference/has_new_operator.html new file mode 100644 index 0000000..ff41e85 --- /dev/null +++ b/doc/html/boost_typetraits/reference/has_new_operator.html @@ -0,0 +1,144 @@ + + + +has_new_operator + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    template <class T>
    +struct has_new_operator : public true_type-or-false_type {};
    +
    +

    + Inherits: If T is a (possibly cv-qualified) + type with an overloaded new-operator then inherits from true_type, + otherwise inherits from false_type. +

    +

    + Compiler Compatibility: Not usable with + compilers that do not support "substitution failure is not an error" + (in which case BOOST_NO_SFINAE will be defined), also known to be broken + with the Borland/Codegear compiler. +

    +

    + C++ Standard Reference: 12.5. +

    +

    + Header: #include + <boost/type_traits/has_new_operator.hpp> + or #include <boost/type_traits.hpp> +

    +

    + Examples: +

    +

    + Given: +

    +
    class A { void* operator new(std::size_t); };
    +class B { void* operator new(std::size_t, const std::nothrow&); };
    +class C { void* operator new(std::size_t, void*); };
    +class D { void* operator new[](std::size_t); };
    +class E { void* operator new[](std::size_t, const std::nothrow&); };
    +class F { void* operator new[](std::size_t, void*); };
    +
    +

    + Then: +

    +
    +

    +

    +

    + has_new_operator<A> + inherits from true_type. +

    +

    +

    +
    +
    +

    +

    +

    + has_new_operator<B> + inherits from true_type. +

    +

    +

    +
    +
    +

    +

    +

    + has_new_operator<C> + inherits from true_type. +

    +

    +

    +
    +
    +

    +

    +

    + has_new_operator<D> + inherits from true_type. +

    +

    +

    +
    +
    +

    +

    +

    + has_new_operator<E> + inherits from true_type. +

    +

    +

    +
    +
    +

    +

    +

    + has_new_operator<F> + inherits from true_type. +

    +

    +

    +
    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/boost_typetraits/reference/has_nothrow_assign.html b/doc/html/boost_typetraits/reference/has_nothrow_assign.html index eb3320d..43f99e3 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_assign.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_assign.html @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@
    -PrevUpHomeNext +PrevUpHomeNext

    @@ -67,7 +67,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/boost_typetraits/reference/integral_promotion.html b/doc/html/boost_typetraits/reference/integral_promotion.html index a0acd07..79b92c1 100644 --- a/doc/html/boost_typetraits/reference/integral_promotion.html +++ b/doc/html/boost_typetraits/reference/integral_promotion.html @@ -49,7 +49,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.14. Examples

    +

    Table 1.14. Examples

    diff --git a/doc/html/boost_typetraits/reference/is_unsigned.html b/doc/html/boost_typetraits/reference/is_unsigned.html index 4b65cc8..362dfd5 100644 --- a/doc/html/boost_typetraits/reference/is_unsigned.html +++ b/doc/html/boost_typetraits/reference/is_unsigned.html @@ -7,7 +7,7 @@ - +
    @@ -20,7 +20,7 @@

    -PrevUpHomeNext +PrevUpHomeNext

    @@ -130,7 +130,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/boost_typetraits/reference/is_virtual_base_of.html b/doc/html/boost_typetraits/reference/is_virtual_base_of.html new file mode 100644 index 0000000..6a0678b --- /dev/null +++ b/doc/html/boost_typetraits/reference/is_virtual_base_of.html @@ -0,0 +1,132 @@ + + + +is_virtual_base_of + + + + + + + + + + + + + + + +
    Boost C++ LibrariesHomeLibrariesPeopleFAQMore
    +
    +
    +PrevUpHomeNext +
    +
    + +
    template <class Base, class Derived>
    +struct is_virtual_base_of : public true_type-or-false_type {};
    +
    +

    + Inherits: If Base is a virtual base class + of type Derived then inherits from true_type, + otherwise inherits from false_type. +

    +

    + Types Base and Derived must not be incomplete types. +

    +

    + C++ Standard Reference: 10. +

    +

    + Header: #include + <boost/type_traits/is_virtual_base_of.hpp> + or #include <boost/type_traits.hpp> +

    +

    + Compiler Compatibility: this trait also + requires a working is_base_of + trait. +

    +

    + Examples: +

    +
    +

    +

    +

    + Given: class Base{}; class Derived : + public virtual + Base{}; +

    +

    +

    +
    +
    +

    +

    +

    + is_virtual_base_of<Base, Derived> + inherits from true_type. +

    +

    +

    +
    +
    +

    +

    +

    + is_virtual_base_of<Base, Derived>::type is the type true_type. +

    +

    +

    +
    +
    +

    +

    +

    + is_virtual_base_of<Base, Derived>::value is an integral constant expression + that evaluates to true. +

    +

    +

    +
    +
    +

    +

    +

    + is_virtual_base_of<Base, Derived>::value is an integral constant expression + that evaluates to true. +

    +

    +

    +
    +
    +

    +

    +

    + is_virtual_base_of<T, U>::value_type is the type bool. +

    +

    +

    +
    +
    + + + +
    +
    +
    +PrevUpHomeNext +
    + + diff --git a/doc/html/boost_typetraits/reference/is_void.html b/doc/html/boost_typetraits/reference/is_void.html index 74b28fc..78bbb8b 100644 --- a/doc/html/boost_typetraits/reference/is_void.html +++ b/doc/html/boost_typetraits/reference/is_void.html @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@
    -PrevUpHomeNext +PrevUpHomeNext

    @@ -108,7 +108,7 @@
    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/boost_typetraits/reference/make_signed.html b/doc/html/boost_typetraits/reference/make_signed.html index 4e37228..c4ef33f 100644 --- a/doc/html/boost_typetraits/reference/make_signed.html +++ b/doc/html/boost_typetraits/reference/make_signed.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.15. Examples

    +

    Table 1.15. Examples

    diff --git a/doc/html/boost_typetraits/reference/make_unsigned.html b/doc/html/boost_typetraits/reference/make_unsigned.html index 76386a0..452ad8f 100644 --- a/doc/html/boost_typetraits/reference/make_unsigned.html +++ b/doc/html/boost_typetraits/reference/make_unsigned.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.16. Examples

    +

    Table 1.16. Examples

    diff --git a/doc/html/boost_typetraits/reference/promote.html b/doc/html/boost_typetraits/reference/promote.html index 1f648d9..7498f31 100644 --- a/doc/html/boost_typetraits/reference/promote.html +++ b/doc/html/boost_typetraits/reference/promote.html @@ -51,7 +51,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.17. Examples

    +

    Table 1.17. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_all_extents.html b/doc/html/boost_typetraits/reference/remove_all_extents.html index b8d5c4c..4e67ce9 100644 --- a/doc/html/boost_typetraits/reference/remove_all_extents.html +++ b/doc/html/boost_typetraits/reference/remove_all_extents.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.18. Examples

    +

    Table 1.18. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_const.html b/doc/html/boost_typetraits/reference/remove_const.html index cc30157..b10ae71 100644 --- a/doc/html/boost_typetraits/reference/remove_const.html +++ b/doc/html/boost_typetraits/reference/remove_const.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.19. Examples

    +

    Table 1.19. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_cv.html b/doc/html/boost_typetraits/reference/remove_cv.html index 2f8b2be..7aad042 100644 --- a/doc/html/boost_typetraits/reference/remove_cv.html +++ b/doc/html/boost_typetraits/reference/remove_cv.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.20. Examples

    +

    Table 1.20. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_extent.html b/doc/html/boost_typetraits/reference/remove_extent.html index cb28caa..c7262c1 100644 --- a/doc/html/boost_typetraits/reference/remove_extent.html +++ b/doc/html/boost_typetraits/reference/remove_extent.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.21. Examples

    +

    Table 1.21. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_pointer.html b/doc/html/boost_typetraits/reference/remove_pointer.html index 09a8a02..c761454 100644 --- a/doc/html/boost_typetraits/reference/remove_pointer.html +++ b/doc/html/boost_typetraits/reference/remove_pointer.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.22. Examples

    +

    Table 1.22. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_reference.html b/doc/html/boost_typetraits/reference/remove_reference.html index 03c9472..9da586a 100644 --- a/doc/html/boost_typetraits/reference/remove_reference.html +++ b/doc/html/boost_typetraits/reference/remove_reference.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.23. Examples

    +

    Table 1.23. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_volatile.html b/doc/html/boost_typetraits/reference/remove_volatile.html index 947a9d7..b154050 100644 --- a/doc/html/boost_typetraits/reference/remove_volatile.html +++ b/doc/html/boost_typetraits/reference/remove_volatile.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.24. Examples

    +

    Table 1.24. Examples

    diff --git a/doc/html/index.html b/doc/html/index.html index c81c06b..41a96b4 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -30,7 +30,7 @@ Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert Ramey and Jeremy Siek

    -

    +

    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)

    @@ -90,6 +90,7 @@
    floating_point_promotion
    function_traits
    +
    has_new_operator
    has_nothrow_assign
    has_nothrow_constructor
    @@ -137,6 +138,7 @@
    is_reference
    is_union
    is_unsigned
    +
    is_virtual_base_of
    is_void
    is_volatile
    make_signed
    diff --git a/doc/is_virtual_base_of.qbk b/doc/is_virtual_base_of.qbk new file mode 100644 index 0000000..72cf23a --- /dev/null +++ b/doc/is_virtual_base_of.qbk @@ -0,0 +1,40 @@ +[/ + Copyright 2009 John Maddock. + 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). +] + +[section:is_virtual_base_of is_virtual_base_of] + template + struct is_virtual_base_of : public __tof {}; + +__inherit If Base is a virtual base class of type Derived then inherits from __true_type, +otherwise inherits from __false_type. + +Types `Base` and `Derived` must not be incomplete types. + +__std_ref 10. + +__header ` #include ` or ` #include ` + +__compat this trait also requires a working __is_base_of trait. + +__examples + +[:Given: ` class Base{}; class Derived : public virtual Base{};` ] + +[:`is_virtual_base_of` inherits from `__true_type`.] + +[:`is_virtual_base_of::type` is the type `__true_type`.] + +[:`is_virtual_base_of::value` is an integral constant +expression that evaluates to /true/.] + +[:`is_virtual_base_of::value` is an integral constant +expression that evaluates to /true/.] + +[:`is_virtual_base_of::value_type` is the type `bool`.] + +[endsect] + diff --git a/doc/type_traits.qbk b/doc/type_traits.qbk index 9bf50f8..2c20b19 100644 --- a/doc/type_traits.qbk +++ b/doc/type_traits.qbk @@ -73,6 +73,7 @@ [def __has_virtual_destructor [link boost_typetraits.reference.has_virtual_destructor has_virtual_destructor]] [def __is_pod [link boost_typetraits.reference.is_pod is_pod]] [def __has_trivial_constructor [link boost_typetraits.reference.has_trivial_constructor has_trivial_constructor]] +[def __has_new_operator [link boost_typetraits.reference.has_new_operator has_new_operator]] [def __has_trivial_copy [link boost_typetraits.reference.has_trivial_copy has_trivial_copy]] [def __has_trivial_default_constructor [link boost_typetraits.reference.has_trivial_constructor has_trivial_default_constructor]] [def __has_trivial_copy_constructor [link boost_typetraits.reference.has_trivial_copy has_trivial_copy_constructor]] @@ -86,6 +87,7 @@ [def __has_nothrow_assign [link boost_typetraits.reference.has_nothrow_assign has_nothrow_assign]] [def __is_base_of [link boost_typetraits.reference.is_base_of is_base_of]] +[def __is_virtual_base_of [link boost_typetraits.reference.is_virtual_base_of is_virtual_base_of]] [def __is_convertible [link boost_typetraits.reference.is_convertible is_convertible]] [def __is_same [link boost_typetraits.reference.is_same is_same]] @@ -168,6 +170,7 @@ that is the result of the transformation. [include floating_point_promotion.qbk] [include function_traits.qbk] +[include has_new_operator.qbk] [include has_nothrow_assign.qbk] [include has_nothrow_constructor.qbk] [include has_nothrow_copy.qbk] @@ -221,6 +224,7 @@ See __has_trivial_constructor. [include is_reference.qbk] [include is_union.qbk] [include is_unsigned.qbk] +[include is_virtual_base_of.qbk] [include is_void.qbk] [include is_volatile.qbk] diff --git a/doc/value_traits.qbk b/doc/value_traits.qbk index 070f8a3..4ef1f98 100644 --- a/doc/value_traits.qbk +++ b/doc/value_traits.qbk @@ -102,6 +102,9 @@ The following templates describe the general properties of a type. template struct __alignment_of; + template + struct __has_new_operator; + template struct __has_nothrow_assign; @@ -183,6 +186,9 @@ between two types: template struct __is_base_of; + template + struct __is_virtual_base_of; + template struct __is_convertible; From 57bdff2d23b8705fbbe4e22a09fc4f97e67c7d20 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 30 Mar 2009 17:03:42 +0000 Subject: [PATCH 38/92] Include new headers. [SVN r52061] --- include/boost/type_traits.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/boost/type_traits.hpp b/include/boost/type_traits.hpp index 0c313b8..e6cdb76 100644 --- a/include/boost/type_traits.hpp +++ b/include/boost/type_traits.hpp @@ -16,6 +16,9 @@ #include "boost/type_traits/add_reference.hpp" #include "boost/type_traits/add_volatile.hpp" #include "boost/type_traits/alignment_of.hpp" +#ifndef __BORLANDC__ +#include "boost/type_traits/has_new_operator.hpp" +#endif #include "boost/type_traits/has_nothrow_assign.hpp" #include "boost/type_traits/has_nothrow_constructor.hpp" #include "boost/type_traits/has_nothrow_copy.hpp" @@ -56,6 +59,7 @@ #include "boost/type_traits/is_stateless.hpp" #include "boost/type_traits/is_union.hpp" #include "boost/type_traits/is_void.hpp" +#include "boost/type_traits/is_virtual_base_of.hpp" #include "boost/type_traits/is_volatile.hpp" #include "boost/type_traits/rank.hpp" #include "boost/type_traits/extent.hpp" From bbb3e5da87d746cbb659c7fb1ed7cfa002dc61d3 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 1 Apr 2009 09:32:08 +0000 Subject: [PATCH 39/92] Add missing #includes. [SVN r52102] --- include/boost/type_traits/has_new_operator.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/type_traits/has_new_operator.hpp b/include/boost/type_traits/has_new_operator.hpp index 13cd167..731f7bf 100644 --- a/include/boost/type_traits/has_new_operator.hpp +++ b/include/boost/type_traits/has_new_operator.hpp @@ -9,6 +9,8 @@ #ifndef BOOST_TT_HAS_NEW_OPERATOR_HPP_INCLUDED #define BOOST_TT_HAS_NEW_OPERATOR_HPP_INCLUDED +#include // std::nothrow_t +#include // std::size_t #include #include #include From 0c934b3466cd19492efaa5641cc7121c6bf4376b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20J=C3=B8rgen=20Ottosen?= Date: Wed, 6 May 2009 19:20:55 +0000 Subject: [PATCH 40/92] new test of empty aligned_storage [SVN r52803] --- test/aligned_storage_empy_test.cpp | 119 +++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 test/aligned_storage_empy_test.cpp diff --git a/test/aligned_storage_empy_test.cpp b/test/aligned_storage_empy_test.cpp new file mode 100644 index 0000000..79c8519 --- /dev/null +++ b/test/aligned_storage_empy_test.cpp @@ -0,0 +1,119 @@ + +// (C) Copyright Thorsten Ottosen 2009. +// Use, modification and distribution are subject to 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 "test.hpp" +#include "check_integral_constant.hpp" +#ifdef TEST_STD +# include +# include // max_align and long_long_type +#else +# include +# include +# include +#endif + + +namespace +{ + template< unsigned N, unsigned Alignment > + struct alignment_implementation1 + { + boost::detail::aligned_storage::aligned_storage_imp type; + const void* address() const { return this; } + }; + + template< unsigned N, unsigned Alignment > + struct alignment_implementation2 : private boost::detail::aligned_storage::aligned_storage_imp + { + typedef boost::detail::aligned_storage::aligned_storage_imp type; + const void* address() const { return static_cast(this)->address(); } + }; + + template< unsigned N, class T > + const void* get_address1() + { + alignment_implementation1::value> imp1; + return imp1.address(); + } + + template< unsigned N, class T > + const void* get_address2() + { + alignment_implementation2::value> imp2; + return imp2.address(); + } + + template< class T > + void check() + { + const void* addr1 = get_address1<0,T>(); + const void* addr2 = get_address2<0,T>(); + // + // @remark: only the empty case differs + // + BOOST_CHECK( addr1 != addr2 ); + + addr1 = get_address1<1,T>(); + addr2 = get_address2<1,T>(); + BOOST_CHECK( addr1 == addr2 ); + + addr1 = get_address1<2,T>(); + addr2 = get_address2<2,T>(); + BOOST_CHECK( addr1 == addr2 ); + + addr1 = get_address1<3,T>(); + addr2 = get_address2<3,T>(); + BOOST_CHECK( addr1 == addr2 ); + + addr1 = get_address1<4,T>(); + addr2 = get_address2<4,T>(); + BOOST_CHECK( addr1 == addr2 ); + + addr1 = get_address1<17,T>(); + addr2 = get_address2<17,T>(); + BOOST_CHECK( addr1 == addr2 ); + + addr1 = get_address1<32,T>(); + addr2 = get_address2<32,T>(); + BOOST_CHECK( addr1 == addr2 ); + } +} + +TT_TEST_BEGIN(type_with_empty_alignment_buffer) + +check(); +check(); +check(); +check(); +check(); +check(); +check(); + +#ifdef BOOST_HAS_MS_INT64 +check<__int64>(); +#endif + +check(); +check(); +check(); +check(); +check(); +check(); +check(); +check(); +check(); +check(); + +TT_TEST_END + + + + + + + + + From 8d163a019edda29ab297fb34b12eb070697a8efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20J=C3=B8rgen=20Ottosen?= Date: Wed, 6 May 2009 19:21:17 +0000 Subject: [PATCH 41/92] update that makes it possible to have empty aligned_storage [SVN r52804] --- include/boost/aligned_storage.hpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/include/boost/aligned_storage.hpp b/include/boost/aligned_storage.hpp index cfaf787..890d29b 100644 --- a/include/boost/aligned_storage.hpp +++ b/include/boost/aligned_storage.hpp @@ -54,6 +54,14 @@ struct aligned_storage_imp , type_with_alignment >::type align_; } data_; + void* address() const { return const_cast(this); } +}; + +template< std::size_t alignment_ > +struct aligned_storage_imp<0u,alignment_> +{ + /* intentionally empty */ + void* address() const { return 0; } }; }} // namespace detail::aligned_storage @@ -62,12 +70,9 @@ template < std::size_t size_ , std::size_t alignment_ = std::size_t(-1) > -class aligned_storage +class aligned_storage : private detail::aligned_storage::aligned_storage_imp { -private: // representation - - detail::aligned_storage::aligned_storage_imp data_; - + public: // constants typedef detail::aligned_storage::aligned_storage_imp type; @@ -118,14 +123,14 @@ public: // accessors void* address() { - return this; + return static_cast(this)->address(); } #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) const void* address() const { - return this; + return static_cast(this)->address(); } #else // MSVC6 From bc45b934b6329fb835697d6acf5a4c5d80f968bc Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 17 May 2009 09:12:30 +0000 Subject: [PATCH 42/92] Added tests for aligned_storage::address() and fixed some Borland specific bugs (these show up in serialization/test/test_delete_pointer_binary_archive). [SVN r53071] --- include/boost/aligned_storage.hpp | 8 +++++++- test/aligned_storage_empy_test.cpp | 8 +++++++- test/aligned_storage_test.cpp | 3 +++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/include/boost/aligned_storage.hpp b/include/boost/aligned_storage.hpp index 890d29b..ce277ab 100644 --- a/include/boost/aligned_storage.hpp +++ b/include/boost/aligned_storage.hpp @@ -70,7 +70,13 @@ template < std::size_t size_ , std::size_t alignment_ = std::size_t(-1) > -class aligned_storage : private detail::aligned_storage::aligned_storage_imp +class aligned_storage : +#ifndef __BORLANDC__ + private +#else + public +#endif + detail::aligned_storage::aligned_storage_imp { public: // constants diff --git a/test/aligned_storage_empy_test.cpp b/test/aligned_storage_empy_test.cpp index 79c8519..6772cc0 100644 --- a/test/aligned_storage_empy_test.cpp +++ b/test/aligned_storage_empy_test.cpp @@ -26,7 +26,13 @@ namespace }; template< unsigned N, unsigned Alignment > - struct alignment_implementation2 : private boost::detail::aligned_storage::aligned_storage_imp + struct alignment_implementation2 : +#ifndef __BORLANDC__ + private +#else + public +#endif + boost::detail::aligned_storage::aligned_storage_imp { typedef boost::detail::aligned_storage::aligned_storage_imp type; const void* address() const { return static_cast(this)->address(); } diff --git a/test/aligned_storage_test.cpp b/test/aligned_storage_test.cpp index e15cf9f..9f531ee 100644 --- a/test/aligned_storage_test.cpp +++ b/test/aligned_storage_test.cpp @@ -66,6 +66,9 @@ void check(const T&) #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_CHECK(::tt::is_pod::value == true); #endif + BOOST_CHECK(as3.address() == &as3); + const t3 as4 = { 0, }; + BOOST_CHECK(as4.address() == static_cast(&as4)); #endif } From 4f26adad46d835bc89c77eca5cbd87ef63fbd8fc Mon Sep 17 00:00:00 2001 From: Jeremiah Willcock Date: Wed, 20 May 2009 19:19:00 +0000 Subject: [PATCH 43/92] Fixed most tab and min/max issues from trunk inspection report [SVN r53141] --- include/boost/type_traits/alignment_of.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/boost/type_traits/alignment_of.hpp b/include/boost/type_traits/alignment_of.hpp index 564d3bb..51357ce 100644 --- a/include/boost/type_traits/alignment_of.hpp +++ b/include/boost/type_traits/alignment_of.hpp @@ -57,11 +57,11 @@ template< typename T > struct alignment_of_impl { #if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) - // - // With MSVC both the native __alignof operator - // and our own logic gets things wrong from time to time :-( - // Using a combination of the two seems to make the most of a bad job: - // + // + // With MSVC both the native __alignof operator + // and our own logic gets things wrong from time to time :-( + // Using a combination of the two seems to make the most of a bad job: + // BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::alignment_logic< sizeof(::boost::detail::alignment_of_hack) - sizeof(T), From 68a4a628cfc8ebf11e4ec4b3a18fa9d4ccf4f548 Mon Sep 17 00:00:00 2001 From: Alexander Nasonov Date: Sat, 23 May 2009 22:32:10 +0000 Subject: [PATCH 44/92] Test for: enum UIntEnum { value = UINT_MAX } is promoted to int [SVN r53220] --- test/promote_enum_msvc_bug_test.cpp | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 test/promote_enum_msvc_bug_test.cpp diff --git a/test/promote_enum_msvc_bug_test.cpp b/test/promote_enum_msvc_bug_test.cpp new file mode 100644 index 0000000..4d34bc0 --- /dev/null +++ b/test/promote_enum_msvc_bug_test.cpp @@ -0,0 +1,39 @@ +// Copyright 2009 Alexander Nasonov. +// 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) + +// Test bug 99776 'enum UIntEnum { value = UINT_MAX } is promoted to int' +// http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=22b0a6b7-120f-4ca0-9136-fa1b25b26efe +// +// Intel 9.0.028 for Windows has a similar problem: +// https://premier.intel.com/IssueDetail.aspx?IssueID=365073 + +#include + +#include +#include +#include + +#include "promote_util.hpp" + + +enum UIntEnum { UIntEnum_max = UINT_MAX }; + +template +void assert_is_uint(T) +{ + BOOST_STATIC_ASSERT((boost::is_same::value)); +} + +void test_promote_to_uint() +{ + assert_is_uint(+UIntEnum_max); + test_cv< UIntEnum, unsigned int >(); +} + +int main() +{ + return 0; +} + From 28ddc6e6f55cd187a2f7264ae3b1624d2634fd1d Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 22 Jun 2009 12:02:15 +0000 Subject: [PATCH 45/92] Update docs. Fixes typos. Fixes #3202. [SVN r54206] --- doc/html/boost_typetraits/background.html | 22 +++++++++---------- .../boost_typetraits/category/transform.html | 2 +- doc/html/boost_typetraits/intrinsics.html | 2 +- .../boost_typetraits/reference/add_const.html | 2 +- .../boost_typetraits/reference/add_cv.html | 2 +- .../reference/add_pointer.html | 2 +- .../reference/add_reference.html | 2 +- .../reference/add_volatile.html | 2 +- .../boost_typetraits/reference/decay.html | 2 +- .../reference/floating_point_promotion.html | 2 +- .../reference/function_traits.html | 4 ++-- .../reference/integral_promotion.html | 2 +- .../reference/is_base_of.html | 2 +- .../reference/is_convertible.html | 4 ++-- .../boost_typetraits/reference/is_same.html | 2 +- .../reference/make_signed.html | 2 +- .../reference/make_unsigned.html | 2 +- .../boost_typetraits/reference/promote.html | 2 +- .../reference/remove_all_extents.html | 2 +- .../reference/remove_const.html | 2 +- .../boost_typetraits/reference/remove_cv.html | 2 +- .../reference/remove_extent.html | 2 +- .../reference/remove_pointer.html | 2 +- .../reference/remove_reference.html | 2 +- .../reference/remove_volatile.html | 2 +- doc/html/index.html | 4 ++-- doc/is_base_of.qbk | 3 ++- doc/is_convertible.qbk | 5 +++-- doc/is_same.qbk | 3 ++- 29 files changed, 46 insertions(+), 43 deletions(-) diff --git a/doc/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index b18d244..1f0eb6e 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -56,7 +56,7 @@ method available to them.

    - + Type Traits

    @@ -84,7 +84,7 @@ given.

    - + Implementation

    @@ -174,7 +174,7 @@ in the default template.

    - + Optimized copy

    @@ -247,7 +247,7 @@ otherwise it will call the "slow but safe version".

    - + Was it worth it?

    @@ -280,7 +280,7 @@

    -

    Table 1.1. Time taken to copy 1000 elements using `copy<const +

    Table 1.1. Time taken to copy 1000 elements using `copy<const T*, T*>` (times in micro-seconds)

    @@ -379,7 +379,7 @@

    - + Pair of References

    @@ -416,7 +416,7 @@ to hold non-reference types, references, and constant references:

    -

    Table 1.2. Required Constructor Argument Types

    +

    Table 1.2. Required Constructor Argument Types

    @@ -481,7 +481,7 @@ adds a reference to its type, unless it is already a reference.

    -

    Table 1.3. Using add_reference to synthesize the correct constructor +

    Table 1.3. Using add_reference to synthesize the correct constructor type

    @@ -598,7 +598,7 @@ easier to maintain and easier to understand.

    - + Conclusion

    @@ -611,7 +611,7 @@ can be optimal as well as generic.

    - + Acknowledgements

    @@ -619,7 +619,7 @@ comments when preparing this article.

    - + References
      diff --git a/doc/html/boost_typetraits/category/transform.html b/doc/html/boost_typetraits/category/transform.html index 9da2050..a9a7c1e 100644 --- a/doc/html/boost_typetraits/category/transform.html +++ b/doc/html/boost_typetraits/category/transform.html @@ -91,7 +91,7 @@ struct remove_volatile;
      - + Broken Compiler Workarounds:
      diff --git a/doc/html/boost_typetraits/intrinsics.html b/doc/html/boost_typetraits/intrinsics.html index ccbf12e..98a73a6 100644 --- a/doc/html/boost_typetraits/intrinsics.html +++ b/doc/html/boost_typetraits/intrinsics.html @@ -71,7 +71,7 @@ of the following macros:

      -

      Table 1.4. Macros for Compiler Intrinsics

      +

      Table 1.4. Macros for Compiler Intrinsics

    diff --git a/doc/html/boost_typetraits/reference/add_const.html b/doc/html/boost_typetraits/reference/add_const.html index c14f17f..22324bd 100644 --- a/doc/html/boost_typetraits/reference/add_const.html +++ b/doc/html/boost_typetraits/reference/add_const.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.5. Examples

    +

    Table 1.5. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_cv.html b/doc/html/boost_typetraits/reference/add_cv.html index e9312c7..3d36153 100644 --- a/doc/html/boost_typetraits/reference/add_cv.html +++ b/doc/html/boost_typetraits/reference/add_cv.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.6. Examples

    +

    Table 1.6. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_pointer.html b/doc/html/boost_typetraits/reference/add_pointer.html index c8e7569..b698519 100644 --- a/doc/html/boost_typetraits/reference/add_pointer.html +++ b/doc/html/boost_typetraits/reference/add_pointer.html @@ -56,7 +56,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.7. Examples

    +

    Table 1.7. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_reference.html b/doc/html/boost_typetraits/reference/add_reference.html index 39e4c2c..d874196 100644 --- a/doc/html/boost_typetraits/reference/add_reference.html +++ b/doc/html/boost_typetraits/reference/add_reference.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.8. Examples

    +

    Table 1.8. Examples

    diff --git a/doc/html/boost_typetraits/reference/add_volatile.html b/doc/html/boost_typetraits/reference/add_volatile.html index 20062c0..1aadef8 100644 --- a/doc/html/boost_typetraits/reference/add_volatile.html +++ b/doc/html/boost_typetraits/reference/add_volatile.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.9. Examples

    +

    Table 1.9. Examples

    diff --git a/doc/html/boost_typetraits/reference/decay.html b/doc/html/boost_typetraits/reference/decay.html index 6e4af7b..f9903a3 100644 --- a/doc/html/boost_typetraits/reference/decay.html +++ b/doc/html/boost_typetraits/reference/decay.html @@ -48,7 +48,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.10. Examples

    +

    Table 1.10. Examples

    diff --git a/doc/html/boost_typetraits/reference/floating_point_promotion.html b/doc/html/boost_typetraits/reference/floating_point_promotion.html index d63eadd..801049b 100644 --- a/doc/html/boost_typetraits/reference/floating_point_promotion.html +++ b/doc/html/boost_typetraits/reference/floating_point_promotion.html @@ -49,7 +49,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.11. Examples

    +

    Table 1.11. Examples

    diff --git a/doc/html/boost_typetraits/reference/function_traits.html b/doc/html/boost_typetraits/reference/function_traits.html index 9bf4a8a..b757c15 100644 --- a/doc/html/boost_typetraits/reference/function_traits.html +++ b/doc/html/boost_typetraits/reference/function_traits.html @@ -59,7 +59,7 @@

    -

    Table 1.12. Function Traits Members

    +

    Table 1.12. Function Traits Members

    @@ -122,7 +122,7 @@

    -

    Table 1.13. Examples

    +

    Table 1.13. Examples

    diff --git a/doc/html/boost_typetraits/reference/integral_promotion.html b/doc/html/boost_typetraits/reference/integral_promotion.html index 79b92c1..d833cb3 100644 --- a/doc/html/boost_typetraits/reference/integral_promotion.html +++ b/doc/html/boost_typetraits/reference/integral_promotion.html @@ -49,7 +49,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.14. Examples

    +

    Table 1.14. Examples

    diff --git a/doc/html/boost_typetraits/reference/is_base_of.html b/doc/html/boost_typetraits/reference/is_base_of.html index 04365c1..bfc9b36 100644 --- a/doc/html/boost_typetraits/reference/is_base_of.html +++ b/doc/html/boost_typetraits/reference/is_base_of.html @@ -132,7 +132,7 @@

    - is_base_of<T>::value_type is the type bool. + is_base_of<T, T>::value_type is the type bool.

    diff --git a/doc/html/boost_typetraits/reference/is_convertible.html b/doc/html/boost_typetraits/reference/is_convertible.html index a338426..20e1af7 100644 --- a/doc/html/boost_typetraits/reference/is_convertible.html +++ b/doc/html/boost_typetraits/reference/is_convertible.html @@ -139,7 +139,7 @@

    - is_convertible<int>::value is an integral constant expression + is_convertible<int, int>::value is an integral constant expression that evaluates to false.

    @@ -149,7 +149,7 @@

    - is_convertible<T>::value_type is the type bool. + is_convertible<T, T>::value_type is the type bool.

    diff --git a/doc/html/boost_typetraits/reference/is_same.html b/doc/html/boost_typetraits/reference/is_same.html index db5f67c..f9a07ab 100644 --- a/doc/html/boost_typetraits/reference/is_same.html +++ b/doc/html/boost_typetraits/reference/is_same.html @@ -100,7 +100,7 @@

    - is_same<T>::value_type is the type bool. + is_same<T, T>::value_type is the type bool.

    diff --git a/doc/html/boost_typetraits/reference/make_signed.html b/doc/html/boost_typetraits/reference/make_signed.html index c4ef33f..0e68aec 100644 --- a/doc/html/boost_typetraits/reference/make_signed.html +++ b/doc/html/boost_typetraits/reference/make_signed.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.15. Examples

    +

    Table 1.15. Examples

    diff --git a/doc/html/boost_typetraits/reference/make_unsigned.html b/doc/html/boost_typetraits/reference/make_unsigned.html index 452ad8f..084d2d2 100644 --- a/doc/html/boost_typetraits/reference/make_unsigned.html +++ b/doc/html/boost_typetraits/reference/make_unsigned.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.16. Examples

    +

    Table 1.16. Examples

    diff --git a/doc/html/boost_typetraits/reference/promote.html b/doc/html/boost_typetraits/reference/promote.html index 7498f31..68e4296 100644 --- a/doc/html/boost_typetraits/reference/promote.html +++ b/doc/html/boost_typetraits/reference/promote.html @@ -51,7 +51,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.17. Examples

    +

    Table 1.17. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_all_extents.html b/doc/html/boost_typetraits/reference/remove_all_extents.html index 4e67ce9..4019639 100644 --- a/doc/html/boost_typetraits/reference/remove_all_extents.html +++ b/doc/html/boost_typetraits/reference/remove_all_extents.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.18. Examples

    +

    Table 1.18. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_const.html b/doc/html/boost_typetraits/reference/remove_const.html index b10ae71..d08dd61 100644 --- a/doc/html/boost_typetraits/reference/remove_const.html +++ b/doc/html/boost_typetraits/reference/remove_const.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.19. Examples

    +

    Table 1.19. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_cv.html b/doc/html/boost_typetraits/reference/remove_cv.html index 7aad042..cb409f5 100644 --- a/doc/html/boost_typetraits/reference/remove_cv.html +++ b/doc/html/boost_typetraits/reference/remove_cv.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.20. Examples

    +

    Table 1.20. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_extent.html b/doc/html/boost_typetraits/reference/remove_extent.html index c7262c1..a0b8868 100644 --- a/doc/html/boost_typetraits/reference/remove_extent.html +++ b/doc/html/boost_typetraits/reference/remove_extent.html @@ -54,7 +54,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.21. Examples

    +

    Table 1.21. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_pointer.html b/doc/html/boost_typetraits/reference/remove_pointer.html index c761454..2284b2d 100644 --- a/doc/html/boost_typetraits/reference/remove_pointer.html +++ b/doc/html/boost_typetraits/reference/remove_pointer.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.22. Examples

    +

    Table 1.22. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_reference.html b/doc/html/boost_typetraits/reference/remove_reference.html index 9da586a..d46ee67 100644 --- a/doc/html/boost_typetraits/reference/remove_reference.html +++ b/doc/html/boost_typetraits/reference/remove_reference.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.23. Examples

    +

    Table 1.23. Examples

    diff --git a/doc/html/boost_typetraits/reference/remove_volatile.html b/doc/html/boost_typetraits/reference/remove_volatile.html index b154050..7bfc1f5 100644 --- a/doc/html/boost_typetraits/reference/remove_volatile.html +++ b/doc/html/boost_typetraits/reference/remove_volatile.html @@ -53,7 +53,7 @@ or #include <boost/type_traits.hpp>

    -

    Table 1.24. Examples

    +

    Table 1.24. Examples

    diff --git a/doc/html/index.html b/doc/html/index.html index 41a96b4..073bb83 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -30,7 +30,7 @@ Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert Ramey and Jeremy Siek

    -

    +

    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)

    @@ -163,7 +163,7 @@

    - +

    Last revised: February 21, 2008 at 13:51:18 +0000

    Last revised: March 30, 2009 at 18:02:46 +0100


    diff --git a/doc/is_base_of.qbk b/doc/is_base_of.qbk index a5a4283..7347182 100644 --- a/doc/is_base_of.qbk +++ b/doc/is_base_of.qbk @@ -48,7 +48,8 @@ expression that evaluates to /true/.] [:`is_base_of::value` is an integral constant expression that evaluates to /true/: a class is regarded as it's own base.] -[:`is_base_of::value_type` is the type `bool`.] +[:`is_base_of::value_type` is the type `bool`.] [endsect] + diff --git a/doc/is_convertible.qbk b/doc/is_convertible.qbk index dc94573..d87fccc 100644 --- a/doc/is_convertible.qbk +++ b/doc/is_convertible.qbk @@ -57,10 +57,11 @@ expression that evaluates to /false/: the conversion would require a `const_cast [:`is_convertible::value` is an integral constant expression that evaluates to /true/.] -[:`is_convertible::value` is an integral constant +[:`is_convertible::value` is an integral constant expression that evaluates to /false/.] -[:`is_convertible::value_type` is the type `bool`.] +[:`is_convertible::value_type` is the type `bool`.] [endsect] + diff --git a/doc/is_same.qbk b/doc/is_same.qbk index 2ed48b2..d054988 100644 --- a/doc/is_same.qbk +++ b/doc/is_same.qbk @@ -32,7 +32,8 @@ expression that evaluates to /false/.] [:`is_same::value` is an integral constant expression that evaluates to /false/.] -[:`is_same::value_type` is the type `bool`.] +[:`is_same::value_type` is the type `bool`.] [endsect] + From 3e8055a725a41ca9e76c83cab799f62fd69644f7 Mon Sep 17 00:00:00 2001 From: "Troy D. Straszheim" Date: Sun, 26 Jul 2009 00:49:56 +0000 Subject: [PATCH 46/92] Copyrights on CMakeLists.txt to keep them from clogging up the inspect reports. This is essentially the same commit as r55095 on the release branch. [SVN r55159] --- CMakeLists.txt | 6 ++++++ test/CMakeLists.txt | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 564e1bf..951be8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,9 @@ +# +# Copyright Troy D. Straszheim +# +# Distributed under the Boost Software License, Version 1.0. +# See http://www.boost.org/LICENSE_1_0.txt +# #---------------------------------------------------------------------------- # This file was automatically generated from the original CMakeLists.txt file # Add a variable to hold the headers for the library diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 77c2a68..69fc8b9 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,3 +1,9 @@ +# +# Copyright Troy D. Straszheim +# +# Distributed under the Boost Software License, Version 1.0. +# See http://www.boost.org/LICENSE_1_0.txt +# file(GLOB TEST_FILES "*_test.cpp") foreach(TEST_FILE ${TEST_FILES}) get_filename_component(TEST_NAME ${TEST_FILE} NAME_WE) From 405c4ba902e36dc0e6b6cb6153c721b5317a66c5 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 29 Jul 2009 17:11:56 +0000 Subject: [PATCH 47/92] Added support for (?(DEFINE) blocks and updated the docs accordingly. Added support for ICU libraries which may be named icui18n.lib on some Win32 platforms. [SVN r55267] --- test/is_base_and_derived_test.cpp | 1 + test/is_base_of_test.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/test/is_base_and_derived_test.cpp b/test/is_base_and_derived_test.cpp index bb215d9..34a525f 100644 --- a/test/is_base_and_derived_test.cpp +++ b/test/is_base_and_derived_test.cpp @@ -30,6 +30,7 @@ TT_TEST_BEGIN(is_base_and_derived) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), true); diff --git a/test/is_base_of_test.cpp b/test/is_base_of_test.cpp index 6817ffb..f968244 100644 --- a/test/is_base_of_test.cpp +++ b/test/is_base_of_test.cpp @@ -19,8 +19,11 @@ TT_TEST_BEGIN(is_base_of) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); @@ -30,7 +33,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); -BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); // really it is!!!!! +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); From c9e77b9c8d321b6e104d46b6b40c0f8b04842cf1 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 4 Aug 2009 17:15:51 +0000 Subject: [PATCH 48/92] Fix is_base_of and is_base_and_derived to conform to C++0x. Also fixed consistency of handling cv-qualified types. Added new trait in boost::tr1 to archive old tr1 behaviour. Updated TR1 lib to match. [SVN r55404] --- .../boost/type_traits/is_base_and_derived.hpp | 9 ++-- include/boost/type_traits/is_base_of.hpp | 19 +++++-- include/boost/type_traits/is_base_of_tr1.hpp | 50 +++++++++++++++++++ test/is_base_and_derived_test.cpp | 5 ++ test/is_base_of_test.cpp | 5 ++ test/tricky_function_type_test.cpp | 4 ++ 6 files changed, 85 insertions(+), 7 deletions(-) mode change 100755 => 100644 include/boost/type_traits/is_base_of.hpp create mode 100644 include/boost/type_traits/is_base_of_tr1.hpp diff --git a/include/boost/type_traits/is_base_and_derived.hpp b/include/boost/type_traits/is_base_and_derived.hpp index 8367b76..59f228f 100644 --- a/include/boost/type_traits/is_base_and_derived.hpp +++ b/include/boost/type_traits/is_base_and_derived.hpp @@ -15,10 +15,10 @@ #include #include #include -#include #include #include #endif +#include // should be the last #include #include @@ -212,7 +212,7 @@ struct is_base_and_derived_impl typedef is_base_and_derived_select< ::boost::is_class::value, ::boost::is_class::value, - ::boost::is_same::value> selector; + ::boost::is_same::value> selector; typedef typename selector::template rebind binder; typedef typename binder::type bound_type; @@ -222,7 +222,10 @@ struct is_base_and_derived_impl template struct is_base_and_derived_impl { - BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_BASE_OF(B,D)); + typedef typename remove_cv::type ncvB; + typedef typename remove_cv::type ncvD; + + BOOST_STATIC_CONSTANT(bool, value = (BOOST_IS_BASE_OF(B,D) && ! ::boost::is_same::value)); }; #endif } // namespace detail diff --git a/include/boost/type_traits/is_base_of.hpp b/include/boost/type_traits/is_base_of.hpp old mode 100755 new mode 100644 index bf46da3..0cc7a32 --- a/include/boost/type_traits/is_base_of.hpp +++ b/include/boost/type_traits/is_base_of.hpp @@ -11,21 +11,32 @@ #include #include +#include #include +#include // should be the last #include #include namespace boost { + namespace detail{ + template + struct is_base_of_imp + { + typedef typename remove_cv::type ncvB; + typedef typename remove_cv::type ncvD; + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< + (::boost::detail::is_base_and_derived_impl::value), + (::boost::type_traits::ice_and< ::boost::is_same::value, ::boost::is_class::value>::value)>::value)); + }; + } + BOOST_TT_AUX_BOOL_TRAIT_DEF2( is_base_of , Base , Derived - , (::boost::type_traits::ice_or< - (::boost::detail::is_base_and_derived_impl::value), - (::boost::is_same::value)>::value) - ) + , (::boost::detail::is_base_of_imp::value)) #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base&,Derived,false) diff --git a/include/boost/type_traits/is_base_of_tr1.hpp b/include/boost/type_traits/is_base_of_tr1.hpp new file mode 100644 index 0000000..177e62b --- /dev/null +++ b/include/boost/type_traits/is_base_of_tr1.hpp @@ -0,0 +1,50 @@ + +// (C) Copyright Rani Sharoni 2003-2005. +// Use, modification and distribution are subject to 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). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_BASE_OF_TR1_HPP_INCLUDED +#define BOOST_TT_IS_BASE_OF_TR1_HPP_INCLUDED + +#include +#include +#include +#include + +// should be the last #include +#include + +namespace boost { namespace tr1{ + + namespace detail{ + template + struct is_base_of_imp + { + typedef typename remove_cv::type ncvB; + typedef typename remove_cv::type ncvD; + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< + (::boost::detail::is_base_and_derived_impl::value), + (::boost::is_same::value)>::value)); + }; + } + +BOOST_TT_AUX_BOOL_TRAIT_DEF2( + is_base_of + , Base + , Derived + , (::boost::tr1::detail::is_base_of_imp::value)) + +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base&,Derived,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base,Derived&,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base&,Derived&,false) +#endif + +} } // namespace boost + +#include + +#endif // BOOST_TT_IS_BASE_OF_TR1_HPP_INCLUDED diff --git a/test/is_base_and_derived_test.cpp b/test/is_base_and_derived_test.cpp index 34a525f..38e8fa3 100644 --- a/test/is_base_and_derived_test.cpp +++ b/test/is_base_and_derived_test.cpp @@ -41,8 +41,13 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), fal BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); +#if defined(TEST_STD) && (TEST_STD < 2006) +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), true); +#else BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_and_derived::value), true); diff --git a/test/is_base_of_test.cpp b/test/is_base_of_test.cpp index f968244..86c5754 100644 --- a/test/is_base_of_test.cpp +++ b/test/is_base_of_test.cpp @@ -33,8 +33,13 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); +#if defined(TEST_STD) && (TEST_STD < 2006) +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); +#else BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); +#endif BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); diff --git a/test/tricky_function_type_test.cpp b/test/tricky_function_type_test.cpp index c029a55..30ba24c 100644 --- a/test/tricky_function_type_test.cpp +++ b/test/tricky_function_type_test.cpp @@ -39,7 +39,11 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor::value, fals BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor::value, false); +#if defined(TEST_STD) && (TEST_STD < 2006) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), true); // TR1 required behaviour (new to 1.34) +#else +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_base_of::value), false); // C++0x required behaviour (new to 1.40) +#endif BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), false); From f1817aeee12177bc6cac1532cecfb8806c5a5975 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 6 Aug 2009 08:54:45 +0000 Subject: [PATCH 49/92] Fixes #3317. Fix is_virtual_base_of so it doesn't lose exception specifications on it's destructors (causes GCC and maybe other compilers to choke). [SVN r55428] --- .../boost/type_traits/is_virtual_base_of.hpp | 8 ++++---- test/is_virtual_base_of_test.cpp | 18 ++++++++++++++++++ test/test.hpp | 1 + 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/include/boost/type_traits/is_virtual_base_of.hpp b/include/boost/type_traits/is_virtual_base_of.hpp index e3dd441..30b34f6 100644 --- a/include/boost/type_traits/is_virtual_base_of.hpp +++ b/include/boost/type_traits/is_virtual_base_of.hpp @@ -42,14 +42,14 @@ struct is_virtual_base_of_impl X(); X(const X&); X& operator=(const X&); - ~X(); + ~X()throw(); }; struct Y : public virtual Derived { Y(); Y(const Y&); Y& operator=(const Y&); - ~Y(); + ~Y()throw(); }; #else struct X : Derived, virtual Base @@ -57,14 +57,14 @@ struct is_virtual_base_of_impl X(); X(const X&); X& operator=(const X&); - ~X(); + ~X()throw(); }; struct Y : Derived { Y(); Y(const Y&); Y& operator=(const Y&); - ~Y(); + ~Y()throw(); }; #endif BOOST_STATIC_CONSTANT(bool, value = (sizeof(X)==sizeof(Y))); diff --git a/test/is_virtual_base_of_test.cpp b/test/is_virtual_base_of_test.cpp index 4e33714..84ba744 100644 --- a/test/is_virtual_base_of_test.cpp +++ b/test/is_virtual_base_of_test.cpp @@ -9,6 +9,21 @@ #include "check_integral_constant.hpp" #include +// for bug report 3317: https://svn.boost.org/trac/boost/ticket/3317 +class B +{ +public: + B(); + virtual ~B()throw(); +}; + +class D : public B +{ +public: + D(); + virtual ~D()throw(); +}; + TT_TEST_BEGIN(is_virtual_base_of) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); @@ -42,6 +57,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of::value), false); TT_TEST_END diff --git a/test/test.hpp b/test/test.hpp index 8916078..47c3333 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -370,6 +370,7 @@ struct virtual_inherit2 : virtual_inherit1 { }; struct virtual_inherit3 : private virtual Base {}; struct virtual_inherit4 : virtual boost::noncopyable {}; struct virtual_inherit5 : virtual int_convertible {}; +struct virtual_inherit6 : virtual Base { virtual ~virtual_inherit6()throw(); }; typedef void foo0_t(); typedef void foo1_t(int); From 9de89e91576cbbffa08bfb70630ee11446310a5d Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 6 Aug 2009 09:13:09 +0000 Subject: [PATCH 50/92] Fixes #2935. Add new config macro BOOST_MSVC_FULL_VER, and updated type_traits to make use of it. [SVN r55429] --- include/boost/type_traits/has_new_operator.hpp | 4 ++-- include/boost/type_traits/intrinsics.hpp | 2 +- include/boost/type_traits/is_abstract.hpp | 4 ++-- include/boost/type_traits/is_base_and_derived.hpp | 4 ++-- include/boost/type_traits/is_convertible.hpp | 2 +- include/boost/type_traits/is_function.hpp | 4 ++-- include/boost/type_traits/is_member_function_pointer.hpp | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/boost/type_traits/has_new_operator.hpp b/include/boost/type_traits/has_new_operator.hpp index 731f7bf..6d5351e 100644 --- a/include/boost/type_traits/has_new_operator.hpp +++ b/include/boost/type_traits/has_new_operator.hpp @@ -85,7 +85,7 @@ namespace detail { BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(has_new_operator_impl::template check_sig(0))); BOOST_STATIC_CONSTANT(unsigned, s2 = sizeof(has_new_operator_impl::template check_sig2(0))); #else - #if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) + #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif @@ -93,7 +93,7 @@ namespace detail { BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig(0))); BOOST_STATIC_CONSTANT(unsigned, s2 = sizeof(check_sig2(0))); - #if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) + #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(pop) #endif #endif diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 91ee88b..74b64a7 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -82,7 +82,7 @@ # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif -#if defined(BOOST_MSVC) && defined(_MSC_FULL_VER) && (_MSC_FULL_VER >=140050215) +#if defined(BOOST_MSVC) && defined(BOOST_MSVC_FULL_VER) && (BOOST_MSVC_FULL_VER >=140050215) # include # define BOOST_IS_UNION(T) __is_union(T) diff --git a/include/boost/type_traits/is_abstract.hpp b/include/boost/type_traits/is_abstract.hpp index a11718d..09fdf33 100644 --- a/include/boost/type_traits/is_abstract.hpp +++ b/include/boost/type_traits/is_abstract.hpp @@ -94,12 +94,12 @@ struct is_abstract_imp2 #ifdef __GNUC__ BOOST_STATIC_CONSTANT(std::size_t, s1 = sizeof(is_abstract_imp2::template check_sig(0))); #else -#if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif BOOST_STATIC_CONSTANT(std::size_t, s1 = sizeof(check_sig(0))); -#if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(pop) #endif #endif diff --git a/include/boost/type_traits/is_base_and_derived.hpp b/include/boost/type_traits/is_base_and_derived.hpp index 59f228f..d6a9991 100644 --- a/include/boost/type_traits/is_base_and_derived.hpp +++ b/include/boost/type_traits/is_base_and_derived.hpp @@ -133,7 +133,7 @@ struct bd_helper template struct is_base_and_derived_impl2 { -#if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif @@ -156,7 +156,7 @@ struct is_base_and_derived_impl2 BOOST_STATIC_CONSTANT(bool, value = sizeof(bd_helper::check_sig(Host(), 0)) == sizeof(type_traits::yes_type)); -#if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(pop) #endif }; diff --git a/include/boost/type_traits/is_convertible.hpp b/include/boost/type_traits/is_convertible.hpp index ce522a0..a31a930 100644 --- a/include/boost/type_traits/is_convertible.hpp +++ b/include/boost/type_traits/is_convertible.hpp @@ -256,7 +256,7 @@ struct is_convertible_basic_impl #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4244) -#if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(disable:6334) #endif #endif diff --git a/include/boost/type_traits/is_function.hpp b/include/boost/type_traits/is_function.hpp index 1fba1bd..95dba0d 100644 --- a/include/boost/type_traits/is_function.hpp +++ b/include/boost/type_traits/is_function.hpp @@ -65,7 +65,7 @@ struct is_function_impl template struct is_function_impl { -#if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif @@ -74,7 +74,7 @@ struct is_function_impl bool, value = sizeof(::boost::type_traits::is_function_ptr_tester(t)) == sizeof(::boost::type_traits::yes_type) ); -#if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(pop) #endif }; diff --git a/include/boost/type_traits/is_member_function_pointer.hpp b/include/boost/type_traits/is_member_function_pointer.hpp index 3fff063..81f1eac 100644 --- a/include/boost/type_traits/is_member_function_pointer.hpp +++ b/include/boost/type_traits/is_member_function_pointer.hpp @@ -64,7 +64,7 @@ struct is_mem_fun_pointer_select { template struct result_ { -#if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif @@ -75,7 +75,7 @@ struct is_mem_fun_pointer_select bool, value = ( 1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(self_type::make_t)) )); -#if BOOST_WORKAROUND(_MSC_FULL_VER, >= 140050000) +#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(pop) #endif }; From fcc974dd9956ad274202c9374119af1106f1cab0 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 18 Aug 2009 11:37:46 +0000 Subject: [PATCH 51/92] Workaround for IBM compiler issue, see issue #3324. [SVN r55650] --- include/boost/type_traits/is_member_pointer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/type_traits/is_member_pointer.hpp b/include/boost/type_traits/is_member_pointer.hpp index cdf3d6a..ba02b89 100644 --- a/include/boost/type_traits/is_member_pointer.hpp +++ b/include/boost/type_traits/is_member_pointer.hpp @@ -50,7 +50,7 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer, BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,::boost::is_member_function_pointer::value) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true) -#if !BOOST_WORKAROUND(__MWERKS__,<=0x3003) +#if !BOOST_WORKAROUND(__MWERKS__,<=0x3003) && !BOOST_WORKAROUND(__IBMCPP__, <=600) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*const,true) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*volatile,true) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*const volatile,true) From be3077e2036f90f0c550659cdf4352ae3768c1e8 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 1 Sep 2009 12:24:08 +0000 Subject: [PATCH 52/92] Fix warnings emitted by gcc when building with -Wall -Wextra. Fixes #3381. [SVN r55957] --- include/boost/type_traits/is_signed.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/type_traits/is_signed.hpp b/include/boost/type_traits/is_signed.hpp index 73389a1..e06b47c 100644 --- a/include/boost/type_traits/is_signed.hpp +++ b/include/boost/type_traits/is_signed.hpp @@ -30,7 +30,7 @@ template struct is_signed_helper { typedef typename remove_cv::type no_cv_t; - BOOST_STATIC_CONSTANT(bool, value = (static_cast(-1) < 0)); + BOOST_STATIC_CONSTANT(bool, value = (!(static_cast(-1) > 0))); }; template From 13ca0cf6982efbdbf65b80ec18fbd861ea821a14 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 12 Oct 2009 11:00:02 +0000 Subject: [PATCH 53/92] Fixes #3401. [SVN r56730] --- .../boost/type_traits/has_new_operator.hpp | 101 +++++++++++------- test/has_operator_new_test.cpp | 11 ++ 2 files changed, 74 insertions(+), 38 deletions(-) diff --git a/include/boost/type_traits/has_new_operator.hpp b/include/boost/type_traits/has_new_operator.hpp index 6d5351e..2c2c322 100644 --- a/include/boost/type_traits/has_new_operator.hpp +++ b/include/boost/type_traits/has_new_operator.hpp @@ -26,7 +26,7 @@ namespace detail { template struct has_new_operator_impl { template - static type_traits::yes_type check_sig( + static type_traits::yes_type check_sig1( U*, test< void *(*)(std::size_t), @@ -34,64 +34,85 @@ namespace detail { >* = NULL ); template - static type_traits::yes_type check_sig( - U*, - test< - void *(*)(std::size_t, const std::nothrow_t&), - &U::operator new - >* = NULL - ); - template - static type_traits::yes_type check_sig( - U*, - test< - void *(*)(std::size_t, void*), - &U::operator new - >* = NULL - ); - template - static type_traits::no_type check_sig(...); + static type_traits::no_type check_sig1(...); - template - static type_traits::yes_type check_sig2( - U*, - test< - void *(*)(std::size_t), - &U::operator new[] - >* = NULL - ); template static type_traits::yes_type check_sig2( U*, test< void *(*)(std::size_t, const std::nothrow_t&), - &U::operator new[] - >* = NULL - ); - template - static type_traits::yes_type check_sig2( - U*, - test< - void *(*)(std::size_t, void*), - &U::operator new[] + &U::operator new >* = NULL ); template static type_traits::no_type check_sig2(...); + template + static type_traits::yes_type check_sig3( + U*, + test< + void *(*)(std::size_t, void*), + &U::operator new + >* = NULL + ); + template + static type_traits::no_type check_sig3(...); + + + template + static type_traits::yes_type check_sig4( + U*, + test< + void *(*)(std::size_t), + &U::operator new[] + >* = NULL + ); + template + static type_traits::no_type check_sig4(...); + + template + static type_traits::yes_type check_sig5( + U*, + test< + void *(*)(std::size_t, const std::nothrow_t&), + &U::operator new[] + >* = NULL + ); + template + static type_traits::no_type check_sig5(...); + + template + static type_traits::yes_type check_sig6( + U*, + test< + void *(*)(std::size_t, void*), + &U::operator new[] + >* = NULL + ); + template + static type_traits::no_type check_sig6(...); + // GCC2 won't even parse this template if we embed the computation // of s1 in the computation of value. #ifdef __GNUC__ - BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(has_new_operator_impl::template check_sig(0))); + BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(has_new_operator_impl::template check_sig1(0))); BOOST_STATIC_CONSTANT(unsigned, s2 = sizeof(has_new_operator_impl::template check_sig2(0))); + BOOST_STATIC_CONSTANT(unsigned, s3 = sizeof(has_new_operator_impl::template check_sig3(0))); + BOOST_STATIC_CONSTANT(unsigned, s4 = sizeof(has_new_operator_impl::template check_sig4(0))); + BOOST_STATIC_CONSTANT(unsigned, s5 = sizeof(has_new_operator_impl::template check_sig5(0))); + BOOST_STATIC_CONSTANT(unsigned, s6 = sizeof(has_new_operator_impl::template check_sig6(0))); #else #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif - BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig(0))); + BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig1(0))); BOOST_STATIC_CONSTANT(unsigned, s2 = sizeof(check_sig2(0))); + BOOST_STATIC_CONSTANT(unsigned, s3 = sizeof(check_sig3(0))); + BOOST_STATIC_CONSTANT(unsigned, s4 = sizeof(check_sig4(0))); + BOOST_STATIC_CONSTANT(unsigned, s5 = sizeof(check_sig5(0))); + BOOST_STATIC_CONSTANT(unsigned, s6 = sizeof(check_sig6(0))); #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(pop) @@ -100,7 +121,11 @@ namespace detail { BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< (s1 == sizeof(type_traits::yes_type)), - (s2 == sizeof(type_traits::yes_type)) + (s2 == sizeof(type_traits::yes_type)), + (s3 == sizeof(type_traits::yes_type)), + (s4 == sizeof(type_traits::yes_type)), + (s5 == sizeof(type_traits::yes_type)), + (s6 == sizeof(type_traits::yes_type)) >::value) ); }; diff --git a/test/has_operator_new_test.cpp b/test/has_operator_new_test.cpp index d9e9349..cd7b863 100644 --- a/test/has_operator_new_test.cpp +++ b/test/has_operator_new_test.cpp @@ -33,6 +33,16 @@ struct class_with_new_op6 { void* operator new[] (std::size_t size, void* ptr); }; +struct class_with_all_ops +{ + void * operator new(std::size_t); + void* operator new(std::size_t size, const std::nothrow_t&); + void* operator new[](std::size_t size); + void* operator new[](std::size_t size, const std::nothrow_t&); + void* operator new (std::size_t size, void* ptr); + void* operator new[] (std::size_t size, void* ptr); +}; + TT_TEST_BEGIN(has_new_operator) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, true); @@ -42,6 +52,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator::value, false); From 524cb0cfe760bb9eeaf2731a829946803b55d6bc Mon Sep 17 00:00:00 2001 From: "Troy D. Straszheim" Date: Sat, 17 Oct 2009 02:07:38 +0000 Subject: [PATCH 54/92] rm cmake from trunk. I'm not entirely sure this is necessary to satisfy the inspect script, but I'm not taking any chances, and it is easy to put back [SVN r56942] --- CMakeLists.txt | 40 ---------------------------------------- module.cmake | 1 - test/CMakeLists.txt | 13 ------------- 3 files changed, 54 deletions(-) delete mode 100644 CMakeLists.txt delete mode 100644 module.cmake delete mode 100644 test/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 951be8e..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,40 +0,0 @@ -# -# Copyright Troy D. Straszheim -# -# Distributed under the Boost Software License, Version 1.0. -# See http://www.boost.org/LICENSE_1_0.txt -# -#---------------------------------------------------------------------------- -# This file was automatically generated from the original CMakeLists.txt file -# Add a variable to hold the headers for the library -set (lib_headers - type_traits.hpp - type_traits -) - -# Add a library target to the build system -boost_library_project( - type_traits - # SRCDIRS - TESTDIRS test - HEADERS ${lib_headers} - # DOCDIRS - DESCRIPTION "Templates for fundamental properties of types." - MODULARIZED - AUTHORS "David Abrahams " - "Steve Cleary" - "Beman Dawes " - "Aleksey Gurtovoy " - "Howard Hinnant" - "Jesse Jones" - "Mat Marcus" - "Itay Maman" - "John Maddock " - "Alexander Nasonov " - "Thorsten Ottosen " - "Robert Ramey " - "Jeremy Siek " - # MAINTAINERS -) - - diff --git a/module.cmake b/module.cmake deleted file mode 100644 index c1f1b3c..0000000 --- a/module.cmake +++ /dev/null @@ -1 +0,0 @@ -boost_module(type_traits DEPENDS config static_assert) \ No newline at end of file diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt deleted file mode 100644 index 69fc8b9..0000000 --- a/test/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -# Copyright Troy D. Straszheim -# -# Distributed under the Boost Software License, Version 1.0. -# See http://www.boost.org/LICENSE_1_0.txt -# -file(GLOB TEST_FILES "*_test.cpp") -foreach(TEST_FILE ${TEST_FILES}) - get_filename_component(TEST_NAME ${TEST_FILE} NAME_WE) - boost_test_run(${TEST_NAME}) -endforeach(TEST_FILE ${TEST_FILES}) - -boost_test_run(udt_specialisations) From c8d4c6ccd15006aad02e848776abdec1dce6901f Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 8 Nov 2009 16:49:40 +0000 Subject: [PATCH 55/92] Fix msvc and gcc warnings in the type_traits library. Build should now be clean with cl /W4 or gcc -Wall -Wextra -pedantic for all except one test - there appears to be no way to use initialized aligned_storage with gcc without it producing a warning :-( [SVN r57489] --- include/boost/type_traits/is_signed.hpp | 10 +++++++++- include/boost/type_traits/is_unsigned.hpp | 11 +++++++++-- test/is_abstract_test.cpp | 4 ++++ test/test.hpp | 4 ++++ 4 files changed, 26 insertions(+), 3 deletions(-) mode change 100755 => 100644 test/is_abstract_test.cpp diff --git a/include/boost/type_traits/is_signed.hpp b/include/boost/type_traits/is_signed.hpp index e06b47c..bf7bbfd 100644 --- a/include/boost/type_traits/is_signed.hpp +++ b/include/boost/type_traits/is_signed.hpp @@ -26,11 +26,19 @@ namespace detail{ #if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) +template +struct is_signed_values +{ + typedef typename remove_cv::type no_cv_t; + BOOST_STATIC_CONSTANT(no_cv_t, minus_one = (static_cast(-1))); + BOOST_STATIC_CONSTANT(no_cv_t, zero = (static_cast(0))); +}; + template struct is_signed_helper { typedef typename remove_cv::type no_cv_t; - BOOST_STATIC_CONSTANT(bool, value = (!(static_cast(-1) > 0))); + BOOST_STATIC_CONSTANT(bool, value = (!(::boost::detail::is_signed_values::minus_one > boost::detail::is_signed_values::zero))); }; template diff --git a/include/boost/type_traits/is_unsigned.hpp b/include/boost/type_traits/is_unsigned.hpp index 4866486..98baf4e 100644 --- a/include/boost/type_traits/is_unsigned.hpp +++ b/include/boost/type_traits/is_unsigned.hpp @@ -27,10 +27,17 @@ namespace detail{ #if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) template -struct is_ununsigned_helper +struct is_unsigned_values { typedef typename remove_cv::type no_cv_t; - BOOST_STATIC_CONSTANT(bool, value = (static_cast(-1) > 0)); + BOOST_STATIC_CONSTANT(no_cv_t, minus_one = (static_cast(-1))); + BOOST_STATIC_CONSTANT(no_cv_t, zero = (static_cast(0))); +}; + +template +struct is_ununsigned_helper +{ + BOOST_STATIC_CONSTANT(bool, value = (::boost::detail::is_unsigned_values::minus_one > ::boost::detail::is_unsigned_values::zero)); }; template diff --git a/test/is_abstract_test.cpp b/test/is_abstract_test.cpp old mode 100755 new mode 100644 index 2d2079a..3f63aee --- a/test/is_abstract_test.cpp +++ b/test/is_abstract_test.cpp @@ -13,6 +13,10 @@ # include #endif +#ifdef BOOST_MSVC +#pragma warning(disable: 4505) +#endif + struct TestA {}; struct TestB { virtual void foo(void) = 0; }; diff --git a/test/test.hpp b/test/test.hpp index 47c3333..f31452b 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -407,6 +407,10 @@ struct wrap { T t; int j; +protected: + wrap(); + wrap(const wrap&); + wrap& operator=(const wrap&); }; From 908fa41cc3dc9afc813f0c8460a10cc635274e7c Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 4 Dec 2009 10:18:29 +0000 Subject: [PATCH 56/92] Check for __unix__ as well as unix. Fixes #3708. [SVN r58135] --- include/boost/type_traits/intrinsics.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 74b64a7..8f88036 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -149,7 +149,7 @@ # define BOOST_IS_CLASS(T) __is_class(T) # define BOOST_IS_ENUM(T) __is_enum(T) # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) -# if !defined(unix) || defined(__LP64__) +# if (!defined(unix) && !defined(__unix__)) || defined(__LP64__) // GCC sometimes lies about alignment requirements // of type double on 32-bit unix platforms, use the // old implementation instead in that case: From 89f18be48e63c8f86042c42268b80b7ce48cd6ea Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 7 Dec 2009 12:56:29 +0000 Subject: [PATCH 57/92] Ooops, original test case invoked very undefined behaviour. [SVN r58215] --- test/aligned_storage_empy_test.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/test/aligned_storage_empy_test.cpp b/test/aligned_storage_empy_test.cpp index 6772cc0..28e9e20 100644 --- a/test/aligned_storage_empy_test.cpp +++ b/test/aligned_storage_empy_test.cpp @@ -22,7 +22,7 @@ namespace struct alignment_implementation1 { boost::detail::aligned_storage::aligned_storage_imp type; - const void* address() const { return this; } + const void* address() const { return type.address(); } }; template< unsigned N, unsigned Alignment > @@ -39,24 +39,24 @@ namespace }; template< unsigned N, class T > - const void* get_address1() + std::ptrdiff_t get_address1() { - alignment_implementation1::value> imp1; - return imp1.address(); + static alignment_implementation1::value> imp1; + return static_cast(imp1.address()) - reinterpret_cast(&imp1); } template< unsigned N, class T > - const void* get_address2() + std::ptrdiff_t get_address2() { - alignment_implementation2::value> imp2; - return imp2.address(); + static alignment_implementation2::value> imp2; + return static_cast(imp2.address()) - reinterpret_cast(&imp2); } template< class T > void check() { - const void* addr1 = get_address1<0,T>(); - const void* addr2 = get_address2<0,T>(); + std::ptrdiff_t addr1 = get_address1<0,T>(); + std::ptrdiff_t addr2 = get_address2<0,T>(); // // @remark: only the empty case differs // @@ -101,6 +101,9 @@ check(); #ifdef BOOST_HAS_MS_INT64 check<__int64>(); #endif +#ifdef BOOST_HAS_LONG_LONG +check(); +#endif check(); check(); From e7b1b3c773b3ac918a82cb404bbbd7c84ec0e177 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 30 Dec 2009 16:56:12 +0000 Subject: [PATCH 58/92] Fixes #3800. [SVN r58595] --- doc/html/boost_typetraits/background.html | 30 +++++++++---------- doc/html/boost_typetraits/category.html | 8 ++--- .../boost_typetraits/category/alignment.html | 6 ++-- .../boost_typetraits/category/function.html | 6 ++-- .../boost_typetraits/category/transform.html | 8 ++--- .../category/value_traits.html | 6 ++-- .../category/value_traits/primary.html | 6 ++-- .../category/value_traits/properties.html | 6 ++-- .../category/value_traits/relate.html | 6 ++-- doc/html/boost_typetraits/credits.html | 8 ++--- doc/html/boost_typetraits/examples.html | 8 ++--- doc/html/boost_typetraits/examples/copy.html | 6 ++-- .../boost_typetraits/examples/destruct.html | 6 ++-- doc/html/boost_typetraits/examples/fill.html | 6 ++-- doc/html/boost_typetraits/examples/iter.html | 6 ++-- .../boost_typetraits/examples/to_double.html | 6 ++-- doc/html/boost_typetraits/intrinsics.html | 10 +++---- doc/html/boost_typetraits/intro.html | 10 +++---- doc/html/boost_typetraits/mpl.html | 8 ++--- doc/html/boost_typetraits/reference.html | 8 ++--- .../boost_typetraits/reference/add_const.html | 8 ++--- .../boost_typetraits/reference/add_cv.html | 8 ++--- .../reference/add_pointer.html | 8 ++--- .../reference/add_reference.html | 8 ++--- .../reference/add_volatile.html | 8 ++--- .../reference/aligned_storage.html | 6 ++-- .../reference/alignment_of.html | 6 ++-- .../boost_typetraits/reference/decay.html | 8 ++--- .../boost_typetraits/reference/extent.html | 6 ++-- .../reference/floating_point_promotion.html | 8 ++--- .../reference/function_traits.html | 10 +++---- .../reference/has_new_operator.html | 6 ++-- .../reference/has_no_throw_def_cons.html | 6 ++-- .../reference/has_nothrow_assign.html | 6 ++-- .../reference/has_nothrow_constructor.html | 6 ++-- .../reference/has_nothrow_copy.html | 6 ++-- .../reference/has_nothrow_cp_cons.html | 6 ++-- .../reference/has_trivial_assign.html | 6 ++-- .../reference/has_trivial_constructor.html | 6 ++-- .../reference/has_trivial_copy.html | 6 ++-- .../reference/has_trivial_cp_cons.html | 6 ++-- .../reference/has_trivial_def_cons.html | 6 ++-- .../reference/has_trivial_destructor.html | 6 ++-- .../reference/has_virtual_destructor.html | 6 ++-- .../reference/integral_constant.html | 6 ++-- .../reference/integral_promotion.html | 8 ++--- .../reference/is_abstract.html | 6 ++-- .../reference/is_arithmetic.html | 6 ++-- .../boost_typetraits/reference/is_array.html | 6 ++-- .../reference/is_base_of.html | 16 ++-------- .../boost_typetraits/reference/is_class.html | 6 ++-- .../reference/is_complex.html | 6 ++-- .../reference/is_compound.html | 6 ++-- .../boost_typetraits/reference/is_const.html | 6 ++-- .../reference/is_convertible.html | 6 ++-- .../boost_typetraits/reference/is_empty.html | 6 ++-- .../boost_typetraits/reference/is_enum.html | 6 ++-- .../reference/is_floating_point.html | 6 ++-- .../reference/is_function.html | 6 ++-- .../reference/is_fundamental.html | 6 ++-- .../reference/is_integral.html | 6 ++-- .../reference/is_member_function_pointer.html | 6 ++-- .../reference/is_member_object_pointer.html | 6 ++-- .../reference/is_member_pointer.html | 6 ++-- .../boost_typetraits/reference/is_object.html | 6 ++-- .../boost_typetraits/reference/is_pod.html | 6 ++-- .../reference/is_pointer.html | 6 ++-- .../reference/is_polymorphic.html | 6 ++-- .../reference/is_reference.html | 6 ++-- .../boost_typetraits/reference/is_same.html | 6 ++-- .../boost_typetraits/reference/is_scalar.html | 6 ++-- .../boost_typetraits/reference/is_signed.html | 6 ++-- .../reference/is_stateless.html | 6 ++-- .../boost_typetraits/reference/is_union.html | 6 ++-- .../reference/is_unsigned.html | 6 ++-- .../reference/is_virtual_base_of.html | 6 ++-- .../boost_typetraits/reference/is_void.html | 6 ++-- .../reference/is_volatile.html | 6 ++-- .../reference/make_signed.html | 8 ++--- .../reference/make_unsigned.html | 8 ++--- .../boost_typetraits/reference/promote.html | 8 ++--- doc/html/boost_typetraits/reference/rank.html | 6 ++-- .../reference/remove_all_extents.html | 8 ++--- .../reference/remove_const.html | 8 ++--- .../boost_typetraits/reference/remove_cv.html | 8 ++--- .../reference/remove_extent.html | 8 ++--- .../reference/remove_pointer.html | 8 ++--- .../reference/remove_reference.html | 8 ++--- .../reference/remove_volatile.html | 8 ++--- .../reference/type_with_alignment.html | 6 ++-- doc/html/boost_typetraits/user_defined.html | 8 ++--- doc/html/index.html | 12 ++++---- doc/is_base_of.qbk | 3 -- 93 files changed, 322 insertions(+), 335 deletions(-) diff --git a/doc/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index 1f0eb6e..da93cf3 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -1,11 +1,11 @@ - + Background and Tutorial - - + + @@ -56,7 +56,7 @@ method available to them.

    - + Type Traits

    @@ -84,7 +84,7 @@ given.

    - + Implementation

    @@ -174,7 +174,7 @@ in the default template.

    - + Optimized copy

    @@ -247,7 +247,7 @@ otherwise it will call the "slow but safe version".

    - + Was it worth it?

    @@ -280,7 +280,7 @@

    -

    Table 1.1. Time taken to copy 1000 elements using `copy<const +

    Table 1.1. Time taken to copy 1000 elements using `copy<const T*, T*>` (times in micro-seconds)

    @@ -379,7 +379,7 @@

    - + Pair of References

    @@ -416,7 +416,7 @@ to hold non-reference types, references, and constant references:

    -

    Table 1.2. Required Constructor Argument Types

    +

    Table 1.2. Required Constructor Argument Types

    @@ -481,7 +481,7 @@ adds a reference to its type, unless it is already a reference.

    -

    Table 1.3. Using add_reference to synthesize the correct constructor +

    Table 1.3. Using add_reference to synthesize the correct constructor type

    @@ -598,7 +598,7 @@ easier to maintain and easier to understand.

    - + Conclusion

    @@ -611,7 +611,7 @@ can be optimal as well as generic.

    - + Acknowledgements

    @@ -619,7 +619,7 @@ comments when preparing this article.

    - + References
      @@ -669,7 +669,7 @@
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -