From 85e6b2fb7c3247a0819e89f666e56e16013592cc Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 11 Jul 2008 10:14:39 +0000 Subject: [PATCH] Merge type_traits changes from Trunk. [SVN r47304] --- doc/function_traits.qbk | 12 +- doc/has_virtual_destructor.qbk | 2 +- doc/html/boost_typetraits/background.html | 124 ++++----- doc/html/boost_typetraits/category.html | 8 +- .../boost_typetraits/category/alignment.html | 19 +- .../boost_typetraits/category/function.html | 17 +- .../boost_typetraits/category/transform.html | 57 ++-- .../category/value_traits.html | 16 +- .../category/value_traits/primary.html | 60 ++--- .../category/value_traits/properties.html | 59 ++-- .../category/value_traits/relate.html | 17 +- doc/html/boost_typetraits/credits.html | 10 +- doc/html/boost_typetraits/examples.html | 8 +- 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 | 128 +++++++-- doc/html/boost_typetraits/intro.html | 12 +- doc/html/boost_typetraits/mpl.html | 14 +- doc/html/boost_typetraits/reference.html | 8 +- .../boost_typetraits/reference/add_const.html | 15 +- .../boost_typetraits/reference/add_cv.html | 15 +- .../reference/add_pointer.html | 15 +- .../reference/add_reference.html | 15 +- .../reference/add_volatile.html | 15 +- .../reference/aligned_storage.html | 11 +- .../reference/alignment_of.html | 17 +- .../boost_typetraits/reference/decay.html | 13 +- .../boost_typetraits/reference/extent.html | 21 +- .../reference/floating_point_promotion.html | 13 +- .../reference/function_traits.html | 29 +- .../reference/has_no_throw_def_cons.html | 10 +- .../reference/has_nothrow_assign.html | 17 +- .../reference/has_nothrow_constructor.html | 21 +- .../reference/has_nothrow_copy.html | 21 +- .../reference/has_nothrow_cp_cons.html | 10 +- .../reference/has_trivial_assign.html | 23 +- .../reference/has_trivial_constructor.html | 25 +- .../reference/has_trivial_copy.html | 25 +- .../reference/has_trivial_cp_cons.html | 10 +- .../reference/has_trivial_def_cons.html | 10 +- .../reference/has_trivial_destructor.html | 23 +- .../reference/has_virtual_destructor.html | 23 +- .../reference/integral_constant.html | 11 +- .../reference/integral_promotion.html | 13 +- .../reference/is_abstract.html | 23 +- .../reference/is_arithmetic.html | 25 +- .../boost_typetraits/reference/is_array.html | 21 +- .../reference/is_base_of.html | 23 +- .../boost_typetraits/reference/is_class.html | 27 +- .../reference/is_complex.html | 13 +- .../reference/is_compound.html | 23 +- .../boost_typetraits/reference/is_const.html | 21 +- .../reference/is_convertible.html | 26 +- .../boost_typetraits/reference/is_empty.html | 23 +- .../boost_typetraits/reference/is_enum.html | 23 +- .../reference/is_floating_point.html | 21 +- .../reference/is_function.html | 32 ++- .../reference/is_fundamental.html | 27 +- .../reference/is_integral.html | 21 +- .../reference/is_member_function_pointer.html | 25 +- .../reference/is_member_object_pointer.html | 25 +- .../reference/is_member_pointer.html | 21 +- .../boost_typetraits/reference/is_object.html | 21 +- .../boost_typetraits/reference/is_pod.html | 21 +- .../reference/is_pointer.html | 21 +- .../reference/is_polymorphic.html | 21 +- .../reference/is_reference.html | 21 +- .../boost_typetraits/reference/is_same.html | 21 +- .../boost_typetraits/reference/is_scalar.html | 21 +- .../boost_typetraits/reference/is_signed.html | 21 +- .../reference/is_stateless.html | 24 +- .../boost_typetraits/reference/is_union.html | 25 +- .../reference/is_unsigned.html | 21 +- .../boost_typetraits/reference/is_void.html | 21 +- .../reference/is_volatile.html | 21 +- .../reference/make_signed.html | 13 +- .../reference/make_unsigned.html | 13 +- .../boost_typetraits/reference/promote.html | 17 +- doc/html/boost_typetraits/reference/rank.html | 19 +- .../reference/remove_all_extents.html | 15 +- .../reference/remove_const.html | 15 +- .../boost_typetraits/reference/remove_cv.html | 15 +- .../reference/remove_extent.html | 15 +- .../reference/remove_pointer.html | 15 +- .../reference/remove_reference.html | 15 +- .../reference/remove_volatile.html | 15 +- .../reference/type_with_alignment.html | 11 +- doc/html/boost_typetraits/user_defined.html | 23 +- doc/html/index.html | 10 +- doc/intrinsics.qbk | 12 +- include/boost/type_traits/alignment_of.hpp | 19 +- .../boost/type_traits/conversion_traits.hpp | 2 +- include/boost/type_traits/intrinsics.hpp | 52 ++++ 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_convertible.hpp | 14 +- include/boost/type_traits/is_enum.hpp | 11 +- include/boost/type_traits/is_polymorphic.hpp | 12 + include/boost/type_traits/make_signed.hpp | 4 +- include/boost/type_traits/make_unsigned.hpp | 4 +- .../boost/type_traits/type_with_alignment.hpp | 105 +++++++- test/alignment_of_test.cpp | 35 +++ test/check_integral_constant.hpp | 8 +- test/has_virtual_destructor_test.cpp | 1 + test/is_convertible_test.cpp | 6 +- test/make_signed_test.cpp | 16 +- test/make_unsigned_test.cpp | 16 +- test/type_with_alignment_test.cpp | 252 ++++++------------ 112 files changed, 1388 insertions(+), 1209 deletions(-) mode change 100755 => 100644 include/boost/type_traits/is_abstract.hpp mode change 100755 => 100644 test/has_virtual_destructor_test.cpp 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/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..709733e 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -3,7 +3,7 @@ Background and Tutorial - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -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)

@@ -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..43f6f85 100644 --- a/doc/html/boost_typetraits/category.html +++ b/doc/html/boost_typetraits/category.html @@ -3,7 +3,7 @@ Type Traits by Category - + @@ -14,8 +14,8 @@
- - + +
Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

@@ -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..88854ff 100644 --- a/doc/html/boost_typetraits/category/function.html +++ b/doc/html/boost_typetraits/category/function.html @@ -3,7 +3,7 @@ Decomposing Function Types - + @@ -14,8 +14,8 @@ - - + +
Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

@@ -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..663a625 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 - + @@ -14,8 +14,8 @@ - - + +
Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

@@ -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..550cf59 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
 
-
+
 
 
 
@@ -14,8 +14,8 @@
 Boost C++ Libraries
 Home
 Libraries
-People
-FAQ
+People
+FAQ
 More
 
 
@@ -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..668f886 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 - + @@ -14,8 +14,8 @@ - - + +
Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

@@ -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..278c74c 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 - + @@ -14,8 +14,8 @@ - - + +
Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

@@ -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..598e5fb 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 - + @@ -14,8 +14,8 @@ - - + +
Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

@@ -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..201e36b 100644 --- a/doc/html/boost_typetraits/credits.html +++ b/doc/html/boost_typetraits/credits.html @@ -3,7 +3,7 @@ Credits - + @@ -13,8 +13,8 @@ - - + +
Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

@@ -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..01cbcd3 100644 --- a/doc/html/boost_typetraits/examples.html +++ b/doc/html/boost_typetraits/examples.html @@ -3,7 +3,7 @@ Examples - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -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..c93989f 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -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..9939850 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -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..23c7385 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -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..2fe87cc 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
 
-
+
 
 
 
@@ -14,8 +14,8 @@
 Boost C++ Libraries
 Home
 Libraries
-People
-FAQ
+People
+FAQ
 More
 
 
@@ -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..3eecb24 100644
--- a/doc/html/boost_typetraits/intrinsics.html
+++ b/doc/html/boost_typetraits/intrinsics.html
@@ -3,7 +3,7 @@
 
 Support for Compiler Intrinsics
 
-
+
 
 
 
@@ -14,8 +14,8 @@
 Boost C++ Libraries
 Home
 Libraries
-People
-FAQ
+People
+FAQ
 More
 
 
@@ -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

@@ -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 01a84d8..b874987 100644 --- a/doc/html/boost_typetraits/intro.html +++ b/doc/html/boost_typetraits/intro.html @@ -3,7 +3,7 @@ Introduction - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -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..b058fad 100644 --- a/doc/html/boost_typetraits/mpl.html +++ b/doc/html/boost_typetraits/mpl.html @@ -3,7 +3,7 @@ MPL Interoperability - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More


@@ -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..40c1482 100644 --- a/doc/html/boost_typetraits/reference.html +++ b/doc/html/boost_typetraits/reference.html @@ -3,7 +3,7 @@ Alphabetical Reference - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More


@@ -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..226b327 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -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..dd451c4 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 - + @@ -14,8 +14,8 @@ - - + +
Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

@@ -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..b09f78a 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 - + @@ -14,8 +14,8 @@ - - + +
Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

@@ -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..ebc8eee 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 - + @@ -14,8 +14,8 @@ - - + +
Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

@@ -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..7fc6a02 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 - + @@ -14,8 +14,8 @@ - - + +
Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

@@ -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..dd4d40c 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 - + @@ -14,8 +14,8 @@ - - + +
Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

@@ -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..e98f4bd 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
 
-
+
 
 
 
@@ -14,8 +14,8 @@
 Boost C++ Libraries
 Home
 Libraries
-People
-FAQ
+People
+FAQ
 More
 
 
@@ -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..9af1fef 100644 --- a/doc/html/boost_typetraits/reference/decay.html +++ b/doc/html/boost_typetraits/reference/decay.html @@ -3,7 +3,7 @@ decay - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -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..ff75445 100644 --- a/doc/html/boost_typetraits/reference/extent.html +++ b/doc/html/boost_typetraits/reference/extent.html @@ -3,7 +3,7 @@ extent - + @@ -14,8 +14,8 @@ - - + +
Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

@@ -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..02b4afd 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
@@ -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..7c27d49 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 - + @@ -14,8 +14,8 @@ - - + +
Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

@@ -24,10 +24,9 @@
-
-template <class T>
+
template <class F>
 struct function_traits
 {
    static const std::size_t    arity = see-below;
@@ -43,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.
  • @@ -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

    @@ -82,7 +81,7 @@

    - function_traits<T>::arity + function_traits<F>::arity

    @@ -95,7 +94,7 @@

    - function_traits<T>::result_type + function_traits<F>::result_type

    @@ -107,7 +106,7 @@

    - function_traits<T>::argN_type + function_traits<F>::argN_type

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

    -

    Table 1.13. Examples

    +

    Table 1.13. Examples

    @@ -234,8 +233,8 @@ 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..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 @@ -3,7 +3,7 @@ has_nothrow_default_constructor - + @@ -14,8 +14,8 @@ - - + +

    - 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.

    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -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..16acc7b 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 - + @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -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..1e03f71 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..9346165 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More


    @@ -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..b59f9bc 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More


    @@ -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..116deef 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 - + @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -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..82f2984 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..477049b 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..a26b6be 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..6079d35 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 - + @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -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..2b7379e 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 - + @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -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..06a92b3 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..45a0f4e 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More


    @@ -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..fd454b8 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
     
    -
    +
     
     
     
    @@ -14,8 +14,8 @@
     Boost C++ Libraries
     Home
     Libraries
    -People
    -FAQ
    +People
    +FAQ
     More
     
     
    @@ -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..b61bdd2 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 - + @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -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..e1eef3e 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..fe58271 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..7eac36f 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..9741bab 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..45c42a8 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..b72db34 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More


    @@ -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..7dc9e95 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..9b78074 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..97301d9 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..a09cb0b 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..52ae734 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..f824337 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..c630002 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..07a2d50 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..d0809fa 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..018872c 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..d5c8263 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..9a9a917 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..2912b2b 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..e4e2036 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..3bf1cfe 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..3b9010a 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..824003f 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..4e0e016 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..9f46b2a 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..43b34e5 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..2880c0e 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..d892e68 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..569a964 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..ca4673b 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..9cd85d1 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..ba8146f 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 - + @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -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..94ade5e 100644 --- a/doc/html/boost_typetraits/reference/promote.html +++ b/doc/html/boost_typetraits/reference/promote.html @@ -3,7 +3,7 @@ promote - + @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -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..96ff595 100644 --- a/doc/html/boost_typetraits/reference/rank.html +++ b/doc/html/boost_typetraits/reference/rank.html @@ -3,7 +3,7 @@ rank - + @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -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..498f838 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 - + @@ -14,8 +14,8 @@ Boost C++ Libraries Home Libraries -People -FAQ +People +FAQ More
    @@ -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..86b36f6 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 - + @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -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..5eac7be 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 - + @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -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..607e43f 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 - + @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -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..b5736c4 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 - + @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -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..57118d8 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 - + @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -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..20cc90f 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 - + @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -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..0a619f3 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 - + @@ -14,8 +14,8 @@ - - + +
    Boost C++ Libraries Home LibrariesPeopleFAQPeopleFAQ More

    @@ -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..7eaa8ce 100644
    --- a/doc/html/boost_typetraits/user_defined.html
    +++ b/doc/html/boost_typetraits/user_defined.html
    @@ -3,7 +3,7 @@
     
     User Defined Specializations
     
    -
    +
     
     
     
    @@ -14,8 +14,8 @@
     Boost C++ Libraries
     Home
     Libraries
    -People
    -FAQ
    +People
    +FAQ
     More
     
     
    @@ -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..2e1bab5 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -3,7 +3,7 @@ Chapter 1. Boost.TypeTraits - + @@ -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)

    @@ -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..2d171f6 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. @@ -56,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/include/boost/type_traits/alignment_of.hpp b/include/boost/type_traits/alignment_of.hpp index e8e4834..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 @@ -30,6 +31,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 +42,9 @@ struct alignment_of_hack T t; alignment_of_hack(); }; - +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif template struct alignment_logic @@ -49,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/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/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 3b48b47..316a966 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -31,6 +31,18 @@ // 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_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 @@ -71,6 +83,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) @@ -82,6 +96,17 @@ # 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_ALIGNMENT_OF(T) __alignof(T) + # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif @@ -101,6 +126,33 @@ # 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) +# 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_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_convertible.hpp b/include/boost/type_traits/is_convertible.hpp index 10309ca..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 @@ -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 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/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/include/boost/type_traits/type_with_alignment.hpp b/include/boost/type_traits/type_with_alignment.hpp index 49816d2..063bf32 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,14 @@ class type_with_alignment typedef align_t type; }; +} + +template +class type_with_alignment + : public ::boost::detail::type_with_alignment_imp +{ +}; + #if defined(__GNUC__) namespace align { struct __attribute__((__aligned__(2))) a2 {}; @@ -232,6 +242,99 @@ 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))) && _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 +// 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]; + 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> +{ + 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) +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/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/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 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 { 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 diff --git a/test/type_with_alignment_test.cpp b/test/type_with_alignment_test.cpp index 3e1f610..65a9232 100644 --- a/test/type_with_alignment_test.cpp +++ b/test/type_with_alignment_test.cpp @@ -14,193 +14,91 @@ # include #endif +#if defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER)) +#if (_MSC_VER >= 1400) && defined(_M_IX86) +#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 + +void check_call2(...){} + +template +void check_call(const T& v) +{ + check_call2(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\ + >::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()); +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) -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); #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 -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); +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) -// 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); +#if defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER)) +#if (_MSC_VER >= 1400) && defined(_M_IX86) +TYPE_WITH_ALIGNMENT_TEST(__m128) +TYPE_WITH_ALIGNMENT_TEST(__m64) #endif -#ifdef BOOST_HAS_MS_INT64 -BOOST_CHECK(::tt::is_pod< - ::tt::type_with_alignment< - ::tt::alignment_of<__int64>::value>::type - >::value); +TYPE_WITH_ALIGNMENT_TEST(a8) +TYPE_WITH_ALIGNMENT_TEST(a16) +TYPE_WITH_ALIGNMENT_TEST(a32) #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