From 4298d3623722010ccf82e18b32816f3941be528e Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 3 Apr 2008 18:12:04 +0000 Subject: [PATCH] Updated type_traits intrinsic support for VC8/9. Updated type_traits intrinsics docs. [SVN r44017] --- doc/has_virtual_destructor.qbk | 2 +- doc/html/boost_typetraits/background.html | 120 ++++++++---------- doc/html/boost_typetraits/category.html | 4 +- .../boost_typetraits/category/alignment.html | 15 +-- .../boost_typetraits/category/function.html | 13 +- .../boost_typetraits/category/transform.html | 53 ++++---- .../category/value_traits.html | 12 +- .../category/value_traits/primary.html | 56 ++++---- .../category/value_traits/properties.html | 55 ++++---- .../category/value_traits/relate.html | 13 +- doc/html/boost_typetraits/credits.html | 6 +- doc/html/boost_typetraits/examples.html | 4 +- doc/html/boost_typetraits/examples/copy.html | 15 +-- .../boost_typetraits/examples/destruct.html | 13 +- doc/html/boost_typetraits/examples/fill.html | 17 ++- doc/html/boost_typetraits/examples/iter.html | 19 ++- .../boost_typetraits/examples/to_double.html | 7 +- doc/html/boost_typetraits/intrinsics.html | 40 +++--- doc/html/boost_typetraits/intro.html | 8 +- doc/html/boost_typetraits/mpl.html | 10 +- doc/html/boost_typetraits/reference.html | 4 +- .../boost_typetraits/reference/add_const.html | 11 +- .../boost_typetraits/reference/add_cv.html | 11 +- .../reference/add_pointer.html | 11 +- .../reference/add_reference.html | 11 +- .../reference/add_volatile.html | 11 +- .../reference/aligned_storage.html | 7 +- .../reference/alignment_of.html | 13 +- .../boost_typetraits/reference/decay.html | 9 +- .../boost_typetraits/reference/extent.html | 17 ++- .../reference/floating_point_promotion.html | 9 +- .../reference/function_traits.html | 13 +- .../reference/has_no_throw_def_cons.html | 6 +- .../reference/has_nothrow_assign.html | 13 +- .../reference/has_nothrow_constructor.html | 17 ++- .../reference/has_nothrow_copy.html | 17 ++- .../reference/has_nothrow_cp_cons.html | 6 +- .../reference/has_trivial_assign.html | 19 ++- .../reference/has_trivial_constructor.html | 21 ++- .../reference/has_trivial_copy.html | 21 ++- .../reference/has_trivial_cp_cons.html | 6 +- .../reference/has_trivial_def_cons.html | 6 +- .../reference/has_trivial_destructor.html | 19 ++- .../reference/has_virtual_destructor.html | 19 ++- .../reference/integral_constant.html | 7 +- .../reference/integral_promotion.html | 9 +- .../reference/is_abstract.html | 19 ++- .../reference/is_arithmetic.html | 21 ++- .../boost_typetraits/reference/is_array.html | 17 ++- .../reference/is_base_of.html | 19 ++- .../boost_typetraits/reference/is_class.html | 23 ++-- .../reference/is_complex.html | 9 +- .../reference/is_compound.html | 19 ++- .../boost_typetraits/reference/is_const.html | 17 ++- .../reference/is_convertible.html | 22 ++-- .../boost_typetraits/reference/is_empty.html | 19 ++- .../boost_typetraits/reference/is_enum.html | 19 ++- .../reference/is_floating_point.html | 17 ++- .../reference/is_function.html | 28 ++-- .../reference/is_fundamental.html | 23 ++-- .../reference/is_integral.html | 17 ++- .../reference/is_member_function_pointer.html | 21 ++- .../reference/is_member_object_pointer.html | 21 ++- .../reference/is_member_pointer.html | 17 ++- .../boost_typetraits/reference/is_object.html | 17 ++- .../boost_typetraits/reference/is_pod.html | 17 ++- .../reference/is_pointer.html | 17 ++- .../reference/is_polymorphic.html | 17 ++- .../reference/is_reference.html | 17 ++- .../boost_typetraits/reference/is_same.html | 17 ++- .../boost_typetraits/reference/is_scalar.html | 17 ++- .../boost_typetraits/reference/is_signed.html | 17 ++- .../reference/is_stateless.html | 20 ++- .../boost_typetraits/reference/is_union.html | 21 ++- .../reference/is_unsigned.html | 17 ++- .../boost_typetraits/reference/is_void.html | 17 ++- .../reference/is_volatile.html | 17 ++- .../reference/make_signed.html | 9 +- .../reference/make_unsigned.html | 9 +- .../boost_typetraits/reference/promote.html | 13 +- doc/html/boost_typetraits/reference/rank.html | 15 +-- .../reference/remove_all_extents.html | 11 +- .../reference/remove_const.html | 11 +- .../boost_typetraits/reference/remove_cv.html | 11 +- .../reference/remove_extent.html | 11 +- .../reference/remove_pointer.html | 11 +- .../reference/remove_reference.html | 11 +- .../reference/remove_volatile.html | 11 +- .../reference/type_with_alignment.html | 7 +- doc/html/boost_typetraits/user_defined.html | 19 ++- doc/html/index.html | 6 +- doc/intrinsics.qbk | 3 +- include/boost/type_traits/intrinsics.hpp | 15 +++ include/boost/type_traits/is_convertible.hpp | 12 ++ 94 files changed, 747 insertions(+), 809 deletions(-) diff --git a/doc/has_virtual_destructor.qbk b/doc/has_virtual_destructor.qbk index a204922..018a5a5 100644 --- a/doc/has_virtual_destructor.qbk +++ b/doc/has_virtual_destructor.qbk @@ -18,7 +18,7 @@ way to portably implement this trait. The default version provided always inherits from __false_type, and has to be explicitly specialized for types with virtual destructors unless the compiler used has compiler __intrinsics that enable the trait to do the right thing: currently (May 2005) only Visual C++ -8 has the necessary __intrinsics. +8 and GCC-4.3 have the necessary __intrinsics. __std_ref 12.4. diff --git a/doc/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index 4beb97f..b17d516 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -3,7 +3,7 @@ Background and Tutorial - + @@ -24,7 +24,7 @@

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

- - Type Traits + + Type Traits

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

- - Implementation + + Implementation

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

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

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

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

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

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

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

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

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

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

- - Optimized copy + + Optimized copy

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

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

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

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

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..fd7037f 100644 --- a/doc/html/boost_typetraits/category.html +++ b/doc/html/boost_typetraits/category.html @@ -3,7 +3,7 @@ Type Traits by Category - + @@ -24,7 +24,7 @@

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

Synopsis

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

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

Synopsis

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

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

Synopsis:

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

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

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

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

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

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

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

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

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

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

Synopsis:

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

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

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

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

Synopsis:

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

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

Synopsis:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

-

Table 1.4. Macros for Compiler Intrinsics

+

Table 1.4. Macros for Compiler Intrinsics

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

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

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

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

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

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

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

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

-

Table 1.5. Examples

+

Table 1.5. Examples

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

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

-

Table 1.6. Examples

+

Table 1.6. Examples

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

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

-

Table 1.7. Examples

+

Table 1.7. Examples

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

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

-

Table 1.8. Examples

+

Table 1.8. Examples

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

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

-

Table 1.9. Examples

+

Table 1.9. Examples

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

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

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

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

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

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

-

Table 1.10. Examples

+

Table 1.10. Examples

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

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

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

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

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

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

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

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

-

Table 1.11. Examples

+

Table 1.11. Examples

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

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

-

Table 1.12. Function Traits Members

+

Table 1.12. Function Traits Members

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

-

Table 1.13. Examples

+

Table 1.13. Examples

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

-

Table 1.14. Examples

+

Table 1.14. Examples

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

diff --git a/doc/html/boost_typetraits/reference/is_complex.html b/doc/html/boost_typetraits/reference/is_complex.html index ed12a67..2f1ace1 100644 --- a/doc/html/boost_typetraits/reference/is_complex.html +++ b/doc/html/boost_typetraits/reference/is_complex.html @@ -3,7 +3,7 @@ is_complex - + @@ -24,11 +24,10 @@
-
-template <class T>
-struct is_complex : public true_type-or-false_type {};
+
template <class T>
+struct is_complex : public true_type-or-false_type {};
 

Inherits: If T diff --git a/doc/html/boost_typetraits/reference/is_compound.html b/doc/html/boost_typetraits/reference/is_compound.html index f3ea85e..5e4faaf 100644 --- a/doc/html/boost_typetraits/reference/is_compound.html +++ b/doc/html/boost_typetraits/reference/is_compound.html @@ -3,7 +3,7 @@ is_compound - + @@ -24,17 +24,16 @@

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

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

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

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

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

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

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

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

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

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

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

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

diff --git a/doc/html/boost_typetraits/reference/is_convertible.html b/doc/html/boost_typetraits/reference/is_convertible.html index 8ec8162..0a89de1 100644 --- a/doc/html/boost_typetraits/reference/is_convertible.html +++ b/doc/html/boost_typetraits/reference/is_convertible.html @@ -3,7 +3,7 @@ is_convertible - + @@ -24,17 +24,16 @@
-
-template <class From, class To>
-struct is_convertible : public true_type-or-false_type {};
+
template <class From, class To>
+struct is_convertible : public true_type-or-false_type {};
 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    diff --git a/doc/html/boost_typetraits/reference/is_function.html b/doc/html/boost_typetraits/reference/is_function.html index 0c2415a..c8f9f74 100644 --- a/doc/html/boost_typetraits/reference/is_function.html +++ b/doc/html/boost_typetraits/reference/is_function.html @@ -3,7 +3,7 @@ is_function - + @@ -24,21 +24,19 @@
    -
    -template <class T>
    -struct is_function : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_function : public true_type-or-false_type {};
     

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

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

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

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

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

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

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

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

    diff --git a/doc/html/boost_typetraits/reference/is_fundamental.html b/doc/html/boost_typetraits/reference/is_fundamental.html index 8798f8f..3107b1c 100644 --- a/doc/html/boost_typetraits/reference/is_fundamental.html +++ b/doc/html/boost_typetraits/reference/is_fundamental.html @@ -3,7 +3,7 @@ is_fundamental - + @@ -24,20 +24,19 @@
    -
    -template <class T>
    -struct is_fundamental : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_fundamental : public true_type-or-false_type {};
     

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

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

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

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

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

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

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

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

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

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

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

    diff --git a/doc/html/boost_typetraits/reference/is_member_function_pointer.html b/doc/html/boost_typetraits/reference/is_member_function_pointer.html index 287d907..27b52ff 100644 --- a/doc/html/boost_typetraits/reference/is_member_function_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_function_pointer.html @@ -3,7 +3,7 @@ is_member_function_pointer - + @@ -24,17 +24,16 @@
    -
    -template <class T>
    -struct is_member_function_pointer : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_member_function_pointer : public true_type-or-false_type {};
     

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

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

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

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

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

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

    diff --git a/doc/html/boost_typetraits/reference/is_member_object_pointer.html b/doc/html/boost_typetraits/reference/is_member_object_pointer.html index c95ff36..7fbb1e6 100644 --- a/doc/html/boost_typetraits/reference/is_member_object_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_object_pointer.html @@ -3,7 +3,7 @@ is_member_object_pointer - + @@ -24,17 +24,16 @@
    -
    -template <class T>
    -struct is_member_object_pointer : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_member_object_pointer : public true_type-or-false_type {};
     

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

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

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

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

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

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

    diff --git a/doc/html/boost_typetraits/reference/is_member_pointer.html b/doc/html/boost_typetraits/reference/is_member_pointer.html index fb3a329..2b05ea4 100644 --- a/doc/html/boost_typetraits/reference/is_member_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_pointer.html @@ -3,7 +3,7 @@ is_member_pointer - + @@ -24,17 +24,16 @@
    -
    -template <class T>
    -struct is_member_pointer : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_member_pointer : public true_type-or-false_type {};
     

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    diff --git a/doc/html/boost_typetraits/reference/is_pointer.html b/doc/html/boost_typetraits/reference/is_pointer.html index bfc5b0d..20c9967 100644 --- a/doc/html/boost_typetraits/reference/is_pointer.html +++ b/doc/html/boost_typetraits/reference/is_pointer.html @@ -3,7 +3,7 @@ is_pointer - + @@ -24,17 +24,16 @@
    -
    -template <class T>
    -struct is_pointer : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_pointer : public true_type-or-false_type {};
     

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

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

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

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

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

    diff --git a/doc/html/boost_typetraits/reference/is_polymorphic.html b/doc/html/boost_typetraits/reference/is_polymorphic.html index 377e12f..851df16 100644 --- a/doc/html/boost_typetraits/reference/is_polymorphic.html +++ b/doc/html/boost_typetraits/reference/is_polymorphic.html @@ -3,7 +3,7 @@ is_polymorphic - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_polymorphic : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_polymorphic : public true_type-or-false_type {};
     

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

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

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

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

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

    diff --git a/doc/html/boost_typetraits/reference/is_reference.html b/doc/html/boost_typetraits/reference/is_reference.html index 08d2f35..269c200 100644 --- a/doc/html/boost_typetraits/reference/is_reference.html +++ b/doc/html/boost_typetraits/reference/is_reference.html @@ -3,7 +3,7 @@ is_reference - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_reference : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_reference : public true_type-or-false_type {};
     

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

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

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

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

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

    diff --git a/doc/html/boost_typetraits/reference/is_same.html b/doc/html/boost_typetraits/reference/is_same.html index e532d42..5287f7d 100644 --- a/doc/html/boost_typetraits/reference/is_same.html +++ b/doc/html/boost_typetraits/reference/is_same.html @@ -3,7 +3,7 @@ is_same - + @@ -24,16 +24,15 @@
    -
    -template <class T, class U>
    -struct is_same : public true_type-or-false_type {};
    +
    template <class T, class U>
    +struct is_same : public true_type-or-false_type {};
     

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

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

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

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

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

    diff --git a/doc/html/boost_typetraits/reference/is_scalar.html b/doc/html/boost_typetraits/reference/is_scalar.html index 46cc185..73f94bf 100644 --- a/doc/html/boost_typetraits/reference/is_scalar.html +++ b/doc/html/boost_typetraits/reference/is_scalar.html @@ -3,7 +3,7 @@ is_scalar - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_scalar : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_scalar : public true_type-or-false_type {};
     

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    diff --git a/doc/html/boost_typetraits/reference/is_union.html b/doc/html/boost_typetraits/reference/is_union.html index 2efaaac..8e138d5 100644 --- a/doc/html/boost_typetraits/reference/is_union.html +++ b/doc/html/boost_typetraits/reference/is_union.html @@ -3,7 +3,7 @@ is_union - + @@ -24,16 +24,15 @@
    -
    -template <class T>
    -struct is_union : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_union : public true_type-or-false_type {};
     

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

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

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

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

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

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

    diff --git a/doc/html/boost_typetraits/reference/is_unsigned.html b/doc/html/boost_typetraits/reference/is_unsigned.html index 580243d..90fd7e8 100644 --- a/doc/html/boost_typetraits/reference/is_unsigned.html +++ b/doc/html/boost_typetraits/reference/is_unsigned.html @@ -3,7 +3,7 @@ is_unsigned - + @@ -24,17 +24,16 @@
    -
    -template <class T>
    -struct is_unsigned : public true_type-or-false_type {};
    +
    template <class T>
    +struct is_unsigned : public true_type-or-false_type {};
     

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    -

    Table 1.15. Examples

    +

    Table 1.15. Examples

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

    -

    Table 1.16. Examples

    +

    Table 1.16. Examples

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

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

    -

    Table 1.17. Examples

    +

    Table 1.17. Examples

    diff --git a/doc/html/boost_typetraits/reference/rank.html b/doc/html/boost_typetraits/reference/rank.html index 35b8c76..834e0fa 100644 --- a/doc/html/boost_typetraits/reference/rank.html +++ b/doc/html/boost_typetraits/reference/rank.html @@ -3,7 +3,7 @@ rank - + @@ -24,15 +24,14 @@
    -
    -template <class T>
    -struct rank : public integral_constant<std::size_t, RANK(T)> {};
    +
    template <class T>
    +struct rank : public integral_constant<std::size_t, RANK(T)> {};
     

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

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

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

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

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

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

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

    -

    Table 1.18. Examples

    +

    Table 1.18. Examples

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

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

    -

    Table 1.19. Examples

    +

    Table 1.19. Examples

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

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

    -

    Table 1.20. Examples

    +

    Table 1.20. Examples

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

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

    -

    Table 1.21. Examples

    +

    Table 1.21. Examples

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

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

    -

    Table 1.22. Examples

    +

    Table 1.22. Examples

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

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

    -

    Table 1.23. Examples

    +

    Table 1.23. Examples

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

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

    -

    Table 1.24. Examples

    +

    Table 1.24. Examples

    diff --git a/doc/html/boost_typetraits/reference/type_with_alignment.html b/doc/html/boost_typetraits/reference/type_with_alignment.html index 3e0068c..d589e9e 100644 --- a/doc/html/boost_typetraits/reference/type_with_alignment.html +++ b/doc/html/boost_typetraits/reference/type_with_alignment.html @@ -3,7 +3,7 @@ type_with_alignment - + @@ -24,10 +24,9 @@
    -
    -template <std::size_t Align>
    +
    template <std::size_t Align>
     struct type_with_alignment
     {
        typedef see-below type;
    diff --git a/doc/html/boost_typetraits/user_defined.html b/doc/html/boost_typetraits/user_defined.html
    index 6a03356..86abd4c 100644
    --- a/doc/html/boost_typetraits/user_defined.html
    +++ b/doc/html/boost_typetraits/user_defined.html
    @@ -3,7 +3,7 @@
     
     User Defined Specializations
     
    -
    +
     
     
     
    @@ -24,18 +24,17 @@
     

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

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

    -

    +

    Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

    @@ -161,7 +161,7 @@

    - +

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

    Last revised: February 21, 2008 at 13:51:18 +0000


    diff --git a/doc/intrinsics.qbk b/doc/intrinsics.qbk index d8a0734..4432772 100644 --- a/doc/intrinsics.qbk +++ b/doc/intrinsics.qbk @@ -9,7 +9,8 @@ There are some traits that can not be implemented within the current C++ language: to make these traits "just work" with user defined types, some kind of additional -help from the compiler is required. Currently (May 2005) MWCW 9 and Visual C++ 8 +help from the compiler is required. Currently (April 2008) Visual C++ 8 and 9, +GNU GCC 4.3 and MWCW 9 provide the necessary intrinsics, and other compilers will no doubt follow in due course. diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index a8cde36..6c285bf 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -39,6 +39,7 @@ // BOOST_IS_ABSTRACT(T) true if T is an abstract type // BOOST_IS_BASE_OF(T,U) true if T is a base class of U // BOOST_IS_CLASS(T) true if T is a class type +// BOOST_IS_CONVERTIBLE(T,U) true if T is convertible to U // BOOST_IS_ENUM(T) true is T is an enum // BOOST_IS_POLYMORPHIC(T) true if T is a polymorphic type @@ -81,6 +82,8 @@ #endif #if defined(BOOST_MSVC) && defined(_MSC_FULL_VER) && (_MSC_FULL_VER >=140050215) +# include + # define BOOST_IS_UNION(T) __is_union(T) # define BOOST_IS_POD(T) (__is_pod(T) && __has_trivial_constructor(T)) # define BOOST_IS_EMPTY(T) __is_empty(T) @@ -92,6 +95,16 @@ # define BOOST_HAS_NOTHROW_COPY(T) __has_nothrow_copy(T) # define BOOST_HAS_NOTHROW_ASSIGN(T) __has_nothrow_assign(T) # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) + +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# define BOOST_IS_CLASS(T) __is_class(T) +// This one doesn't quite always do the right thing: +// # define BOOST_IS_CONVERTIBLE(T,U) __is_convertible_to(T,U) +# define BOOST_IS_ENUM(T) __is_enum(T) +// This one doesn't quite always do the right thing: +// # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) + # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif @@ -133,6 +146,8 @@ # define BOOST_IS_CLASS(T) __is_class(T) # define BOOST_IS_ENUM(T) __is_enum(T) # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif #ifndef BOOST_IS_UNION diff --git a/include/boost/type_traits/is_convertible.hpp b/include/boost/type_traits/is_convertible.hpp index 10309ca..6652199 100644 --- a/include/boost/type_traits/is_convertible.hpp +++ b/include/boost/type_traits/is_convertible.hpp @@ -12,6 +12,8 @@ #ifndef BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED #define BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED +#include +#ifndef BOOST_IS_CONVERTIBLE #include #include #include @@ -28,11 +30,15 @@ #include #endif +#endif // BOOST_IS_CONVERTIBLE + // should be always the last #include directive #include namespace boost { +#ifndef BOOST_IS_CONVERTIBLE + // is one type convertable to another? // // there are multiple versions of the is_convertible @@ -411,6 +417,12 @@ BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,v BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,(::boost::detail::is_convertible_impl_dispatch::value)) +#else + +BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,BOOST_IS_CONVERTIBLE(From,To)) + +#endif + } // namespace boost #include