From 3c402d13770726d9f97eb797994fe33d8a92ac01 Mon Sep 17 00:00:00 2001
From: John Maddock
- The following is an updated version of the article "C++ Type traits"
- by John Maddock and Steve Cleary that appeared in the October 2000 issue
- of Dr Dobb's Journal.
-
- Generic programming (writing code which works with any data type meeting
- a set of requirements) has become the method of choice for providing reusable
- code. However, there are times in generic programming when "generic"
- just isn't good enough - sometimes the differences between types are too
- large for an efficient generic implementation. This is when the traits technique
- becomes important - by encapsulating those properties that need to be considered
- on a type by type basis inside a traits class, we can minimize the amount
- of code that has to differ from one type to another, and maximize the amount
- of generic code.
-
- Consider an example: when working with character strings, one common operation
- is to determine the length of a null terminated string. Clearly it's possible
- to write generic code that can do this, but it turns out that there are much
- more efficient methods available: for example, the C library functions
- Class
- The type-traits library also contains a set of classes that perform a specific
- transformation on a type; for example, they can remove a top-level const
- or volatile qualifier from a type. Each class that performs a transformation
- defines a single typedef-member
- There are far too many separate classes contained in the type-traits library
- to give a full implementation here - see the source code in the Boost library
- for the full details - however, most of the implementation is fairly repetitive
- anyway, so here we will just give you a flavor for how some of the classes
- are implemented. Beginning with possibly the simplest class in the library,
-
- Here we define a primary version of the template class
- The syntax for partial specialization is somewhat arcane and could easily
- occupy an article in its own right; like full specialization, in order to
- write a partial specialization for a class, you must first declare the primary
- template. The partial specialization contains an extra <...> after
- the class name that contains the partial specialization parameters; these
- define the types that will bind to that partial specialization rather than
- the default template. The rules for what can appear in a partial specialization
- are somewhat convoluted, but as a rule of thumb if you can legally write
- two function overloads of the form:
-
- Then you can also write a partial specialization of the form:
-
- This rule is by no means foolproof, but it is reasonably simple to remember
- and close enough to the actual rule to be useful for everyday use.
-
- As a more complex example of partial specialization consider the class
- The aim of
- As an example of how the type traits classes can be used, consider the standard
- library algorithm copy:
-
- Obviously, there's no problem writing a generic version of copy that works
- for all iterator types
- 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
- The code for an optimized version of copy that uses
- It has often been repeated in these columns that "premature optimization
- is the root of all evil" [4].
- So the question must be asked: was our optimization premature? To put this
- in perspective the timings for our version of copy compared a conventional
- generic copy[5] are shown in
- table 1.
-
- Clearly the optimization makes a difference in this case; but, to be fair,
- the timings are loaded to exclude cache miss effects - without this accurate
- comparison between algorithms becomes difficult. However, perhaps we can
- add a couple of caveats to the premature optimization rule:
- Table 1.1. Time taken to copy 1000 elements using `copy<const
- T*, T*>` (times in micro-seconds)
- Version
-
- T
-
- Time
-
- "Optimized" copy
-
- char
-
- 0.99
-
- Conventional copy
-
- char
-
- 8.07
-
- "Optimized" copy
-
- int
-
- 2.52
-
- Conventional copy
-
- int
-
- 8.02
-
- The optimized copy example shows how type traits may be used to perform optimization
- decisions at compile-time. Another important usage of type traits is to allow
- code to compile that otherwise would not do so unless excessive partial specialization
- is used. This is possible by delegating partial specialization to the type
- traits classes. Our example for this form of usage is a pair that can hold
- references [6].
-
- First, let us examine the definition of
- Now, this "pair" cannot hold references as it currently stands,
- because the constructor would require taking a reference to a reference,
- which is currently illegal [7].
- Let us consider what the constructor's parameters would have to be in order
- to allow "pair" to hold non-reference types, references, and constant
- references:
- Table 1.2. Required Constructor Argument Types
- Type of
- Type of parameter to initializing constructor
-
- T
-
- const T &
-
- T &
-
- T &
-
- const T &
-
- const T &
-
- A little familiarity with the type traits classes allows us to construct
- a single mapping that allows us to determine the type of parameter from the
- type of the contained class. The type traits classes provide a transformation
- add_reference,
- which adds a reference to its type, unless it is already a reference.
- Table 1.3. Using add_reference to synthesize the correct constructor
- type
- Type of
- Type of
- Type of
- T
-
- const T
-
- const T &
-
- T &
-
- T & [8]
-
- T &
-
- const T &
-
- const T &
-
- const T &
-
- This allows us to build a primary template definition for
- Add back in the standard comparison operators, default constructor, and template
- copy constructor (which are all the same), and you have a
- This same extension could have been done using partial template specialization
- of
- We hope that in this article we have been able to give you some idea of what
- type-traits are all about. A more complete listing of the available classes
- are in the boost documentation, along with further examples using type traits.
- Templates have enabled C++ uses to take the advantage of the code reuse that
- generic programming brings; hopefully this article has shown that generic
- programming does not have to sink to the lowest common denominator, and that
- templates can be optimal as well as generic.
-
- The authors would like to thank Beman Dawes and Howard Hinnant for their
- helpful comments when preparing this article.
-
Automatic redirection failed, please go to
doc/html/boost_typetraits/background.html.
-
-
-Home
-Libraries
-People
-FAQ
-More
-
-
-strlen
and wcslen
- are usually written in assembler, and with suitable hardware support can
- be considerably faster than a generic version written in C++. The authors
- of the C++ standard library realized this, and abstracted the properties
- of char
and wchar_t
- into the class char_traits
.
- Generic code that works with character strings can simply use char_traits<>::length
to determine the length of a null
- terminated string, safe in the knowledge that specializations of char_traits
will use the most appropriate
- method available to them.
-
-
- Type Traits
-
-char_traits
is a classic
- example of a collection of type specific properties wrapped up in a single
- class - what Nathan Myers termed a baggage class[1]. In the Boost type-traits library,
- we[2] have written a set of
- very specific traits classes, each of which encapsulate a single trait from
- the C++ type system; for example, is a type a pointer or a reference type?
- Or does a type have a trivial constructor, or a const-qualifier? The type-traits
- classes share a unified design: each class inherits from a the type true_type if
- the type has the specified property and inherits from false_type
- otherwise. As we will show, these classes can be used in generic programming
- to determine the properties of a given type and introduce optimizations that
- are appropriate for that case.
- type
- that is the result of the transformation. All of the type-traits classes
- are defined inside namespace boost
;
- for brevity, namespace-qualification is omitted in most of the code samples
- given.
-
-
- Implementation
-
-is_void<T>
inherits
- from true_type
- only if T
is void
.
-
-template <typename T>
-struct is_void : public false_type{};
-
-template <>
-struct is_void<void> : public true_type{};
-
-is_void
,
- and provide a full-specialization when T
- is void
. While full specialization
- of a template class is an important technique, sometimes we need a solution
- that is halfway between a fully generic solution, and a full specialization.
- This is exactly the situation for which the standards committee defined partial
- template-class specialization. As an example, consider the class boost::is_pointer<T>
:
- here we needed a primary version that handles all the cases where T is not
- a pointer, and a partial specialization to handle all the cases where T is
- a pointer:
-
-template <typename T>
-struct is_pointer : public false_type{};
-
-template <typename T>
-struct is_pointer<T*> : public true_type{};
-
-
-void foo(T);
-void foo(U);
-
-
-template <typename T>
-class c{ /*details*/ };
-
-template <typename T>
-class c<U>{ /*details*/ };
-
-remove_extent<T>
.
- This class defines a single typedef-member type
- that is the same type as T but with any top-level array bounds removed; this
- is an example of a traits class that performs a transformation on a type:
-
-template <typename T>
-struct remove_extent
-{ typedef T type; };
-
-template <typename T, std::size_t N>
-struct remove_extent<T[N]>
-{ typedef T type; };
-
-remove_extent
- is this: imagine a generic algorithm that is passed an array type as a template
- parameter, remove_extent
- provides a means of determining the underlying type of the array. For example
- remove_extent<int[4][5]>::type
would evaluate to the type int[5]
. This example also shows that the number
- of template parameters in a partial specialization does not have to match
- the number in the default template. However, the number of parameters that
- appear after the class name do have to match the number and type of the parameters
- in the default template.
-
-
- Optimized
- copy
-
-
-template<typename Iter1, typename Iter2>
-Iter2 copy(Iter1 first, Iter1 last, Iter2 out);
-
-Iter1
- and Iter2
; however, there
- are some circumstances when the copy operation can best be performed by a
- call to memcpy
. In order
- to implement copy in terms of memcpy
- all of the following conditions need to be met:
-
-
Iter1
- and Iter2
must be pointers.
- Iter1
and Iter2
must point to the same type - excluding
- const and volatile-qualifiers.
- Iter1
- must have a trivial assignment operator.
-
-
memcpy
rather than using a compiler generated
- assignment operator. The type-traits library provides a class has_trivial_assign
,
- such that has_trivial_assign<T>::value
is true only if T has a trivial assignment
- operator. This class "just works" for scalar types, but has to
- be explicitly specialised for class/struct types that also happen to have
- a trivial assignment operator. In other words if has_trivial_assign
- gives the wrong answer, it will give the "safe" wrong answer -
- that trivial assignment is not allowable.
- memcpy
- where appropriate is given in the examples.
- The code begins by defining a template function do_copy
- that performs a "slow but safe" copy. The last parameter passed
- to this function may be either a true_type
- or a false_type
.
- Following that there is an overload of docopy
- that uses `memcpy`: this time the iterators are required to actually be pointers
- to the same type, and the final parameter must be a `_true_type. Finally, the version of
-
copy calls
docopy`, passing `_has_trivial_assign<value_type>()`
- as the final parameter: this will dispatch to the optimized version where
- appropriate, otherwise it will call the "slow but safe version".
-
-
- Was
- it worth it?
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Pair
- of References
-
-std::pair
,
- omitting the comparison operators, default constructor, and template copy
- constructor for simplicity:
-
-template <typename T1, typename T2>
-struct pair
-{
-typedef T1 first_type;
-typedef T2 second_type;
-
-T1 first;
-T2 second;
-
-pair(const T1 & nfirst, const T2 & nsecond)
-:first(nfirst), second(nsecond) { }
-};
-
-
-
-
-
-
-
-T1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-T1
-
-
-const T1
-
-
-add_reference<const
- T1>::type
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-pair
- that can contain non-reference types, reference types, and constant reference
- types:
-
-template <typename T1, typename T2>
-struct pair
-{
-typedef T1 first_type;
-typedef T2 second_type;
-
-T1 first;
-T2 second;
-
-pair(boost::add_reference<const T1>::type nfirst,
- boost::add_reference<const T2>::type nsecond)
-:first(nfirst), second(nsecond) { }
-};
-
-std::pair
- that can hold reference types!
- pair
, but to specialize
- pair
in this way would require
- three partial specializations, plus the primary template. Type traits allows
- us to define a single primary template that adjusts itself auto-magically
- to any of these partial specializations, instead of a brute-force partial
- specialization approach. Using type traits in this fashion allows programmers
- to delegate partial specialization to the type traits classes, resulting
- in code that is easier to maintain and easier to understand.
-
-
- Conclusion
-
-
-
- Acknowledgements
-
-
-
- References
-
-
-
-
-
- Copyright © 2000, 2006 Adobe Systems Inc, David Abrahams,
- Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant, Jesse Jones, Mat
- Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert
- Ramey and Jeremy Siek
-
-
-
-
From 00b86fc75cfa38331c4d3f5c2b75eaab571778c9 Mon Sep 17 00:00:00 2001
From: John Maddock Home
Libraries
-People
-FAQ
+People
+FAQ
More
@@ -56,7 +56,7 @@
method available to them.
@@ -84,7 +84,7 @@ given.
@@ -97,8 +97,7 @@
from true_type
only if T
is void
.
-template <typename T> +template <typename T> struct is_void : public false_type{}; template <> @@ -116,8 +115,7 @@ a pointer, and a partial specialization to handle all the cases where T is a pointer: --template <typename T> +template <typename T> struct is_pointer : public false_type{}; template <typename T> @@ -134,15 +132,13 @@ but as a rule of thumb if you can legally write two function overloads of the form: --void foo(T); +void foo(T); void foo(U);Then you can also write a partial specialization of the form:
--template <typename T> +template <typename T> class c{ /*details*/ }; template <typename T> @@ -158,8 +154,7 @@ that is the same type as T but with any top-level array bounds removed; this is an example of a traits class that performs a transformation on a type: --template <typename T> +template <typename T> struct remove_extent { typedef T type; }; @@ -179,15 +174,14 @@ in the default template.- + Optimized copy
As an example of how the type traits classes can be used, consider the standard library algorithm copy:
--template<typename Iter1, typename Iter2> +template<typename Iter1, typename Iter2> Iter2 copy(Iter1 first, Iter1 last, Iter2 out);@@ -253,7 +247,7 @@ otherwise it will call the "slow but safe version".
- + Was it worth it?
@@ -286,7 +280,7 @@
-Table 1.1. Time taken to copy 1000 elements using `copy<const +
Table 1.1. Time taken to copy 1000 elements using `copy<const T*, T*>` (times in micro-seconds)
@@ -385,7 +379,7 @@
- + Pair of References
@@ -401,8 +395,7 @@ the comparison operators, default constructor, and template copy constructor for simplicity:
--template <typename T1, typename T2> +template <typename T1, typename T2> struct pair { typedef T1 first_type; @@ -423,7 +416,7 @@ to hold non-reference types, references, and constant references:-Table 1.2. Required Constructor Argument Types
+Table 1.2. Required Constructor Argument Types
@@ -488,7 +481,7 @@ adds a reference to its type, unless it is already a reference. -Table 1.3. Using add_reference to synthesize the correct constructor +
Table 1.3. Using add_reference to synthesize the correct constructor type
@@ -574,8 +567,7 @@ that can contain non-reference types, reference types, and constant reference types: -
-template <typename T1, typename T2> +template <typename T1, typename T2> struct pair { typedef T1 first_type; @@ -606,7 +598,7 @@ easier to maintain and easier to understand.- + Conclusion
@@ -619,7 +611,7 @@ can be optimal as well as generic.
- + Acknowledgements
@@ -627,7 +619,7 @@ comments when preparing this article.
- + References
@@ -677,13 +669,14 @@
-
@@ -47,13 +47,14 @@
-
diff --git a/doc/html/boost_typetraits/category/alignment.html b/doc/html/boost_typetraits/category/alignment.html index 93ee9ed..6d5ea02 100644 --- a/doc/html/boost_typetraits/category/alignment.html +++ b/doc/html/boost_typetraits/category/alignment.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -36,8 +36,7 @@Synopsis
--template <std::size_t Align> +template <std::size_t Align> struct type_with_alignment; template <std::size_t Size, std::size_t Align> @@ -46,13 +45,14 @@
-
diff --git a/doc/html/boost_typetraits/category/function.html b/doc/html/boost_typetraits/category/function.html index 9c601a6..b32289e 100644 --- a/doc/html/boost_typetraits/category/function.html +++ b/doc/html/boost_typetraits/category/function.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -36,20 +36,20 @@Synopsis
--template <std::size_t Align> +template <std::size_t Align> struct function_traits;
-
diff --git a/doc/html/boost_typetraits/category/transform.html b/doc/html/boost_typetraits/category/transform.html index f4805fc..a91fa23 100644 --- a/doc/html/boost_typetraits/category/transform.html +++ b/doc/html/boost_typetraits/category/transform.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -36,8 +36,7 @@Synopsis:
--template <class T> +template <class T> struct add_const; template <class T> @@ -92,7 +91,7 @@ struct remove_volatile;- + Broken Compiler Workarounds:
@@ -117,8 +116,7 @@The first part guarantees the successful compilation of something like this:
--BOOST_STATIC_ASSERT((is_same<char, remove_reference<char&>::type>::value)); +BOOST_STATIC_ASSERT((is_same<char, remove_reference<char&>::type>::value)); BOOST_STATIC_ASSERT((is_same<char const, remove_reference<char const&>::type>::value)); BOOST_STATIC_ASSERT((is_same<char volatile, remove_reference<char volatile&>::type>::value)); BOOST_STATIC_ASSERT((is_same<char const volatile, remove_reference<char const volatile&>::type>::value)); @@ -133,8 +131,7 @@int
or other built-in type, but for their own types as well: --namespace myspace{ +namespace myspace{ struct MyClass {}; } // declare this at global scope: @@ -152,13 +149,14 @@
-
diff --git a/doc/html/boost_typetraits/category/value_traits.html b/doc/html/boost_typetraits/category/value_traits.html index 2be34d3..9a9f27c 100644 --- a/doc/html/boost_typetraits/category/value_traits.html +++ b/doc/html/boost_typetraits/category/value_traits.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -48,13 +48,14 @@
-
diff --git a/doc/html/boost_typetraits/category/value_traits/primary.html b/doc/html/boost_typetraits/category/value_traits/primary.html index bb82e5f..bd026c2 100644 --- a/doc/html/boost_typetraits/category/value_traits/primary.html +++ b/doc/html/boost_typetraits/category/value_traits/primary.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -48,8 +48,7 @@Synopsis:
--template <class T> +template <class T> struct is_array<T>; template <class T> @@ -93,8 +92,7 @@ A type may belong to more than one of these categories, in addition to one of the primary categories. --template <class T> +template <class T> struct is_arithmetic; template <class T> @@ -115,13 +113,14 @@
-
diff --git a/doc/html/boost_typetraits/category/value_traits/properties.html b/doc/html/boost_typetraits/category/value_traits/properties.html index cbe6c24..bf034ae 100644 --- a/doc/html/boost_typetraits/category/value_traits/properties.html +++ b/doc/html/boost_typetraits/category/value_traits/properties.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -33,8 +33,7 @@Synopsis:
--template <class T> +template <class T> struct alignment_of; template <class T> @@ -109,13 +108,14 @@
-
diff --git a/doc/html/boost_typetraits/category/value_traits/relate.html b/doc/html/boost_typetraits/category/value_traits/relate.html index 2ec8d13..938f763 100644 --- a/doc/html/boost_typetraits/category/value_traits/relate.html +++ b/doc/html/boost_typetraits/category/value_traits/relate.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -34,8 +34,7 @@Synopsis:
--template <class Base, class Derived> +template <class Base, class Derived> struct is_base_of; template <class From, class To> @@ -47,13 +46,14 @@
-
diff --git a/doc/html/boost_typetraits/credits.html b/doc/html/boost_typetraits/credits.html index 954bff6..69085e0 100644 --- a/doc/html/boost_typetraits/credits.html +++ b/doc/html/boost_typetraits/credits.html @@ -13,8 +13,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -61,13 +61,14 @@
-
diff --git a/doc/html/boost_typetraits/examples.html b/doc/html/boost_typetraits/examples.html index f3966c9..afa695d 100644 --- a/doc/html/boost_typetraits/examples.html +++ b/doc/html/boost_typetraits/examples.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -41,13 +41,14 @@
-
diff --git a/doc/html/boost_typetraits/examples/copy.html b/doc/html/boost_typetraits/examples/copy.html index bc55a07..e7cc4d1 100644 --- a/doc/html/boost_typetraits/examples/copy.html +++ b/doc/html/boost_typetraits/examples/copy.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -33,8 +33,7 @@ to determine whether to usememcpy
to optimise the copy operation (see copy_example.cpp): --// +
// // opt::copy // same semantics as std::copy // calls memcpy where appropriate. @@ -79,13 +78,14 @@
-
diff --git a/doc/html/boost_typetraits/examples/destruct.html b/doc/html/boost_typetraits/examples/destruct.html index de97cb2..4545f5e 100644 --- a/doc/html/boost_typetraits/examples/destruct.html +++ b/doc/html/boost_typetraits/examples/destruct.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -31,8 +31,7 @@ Demonstrates a simple algorithm that uses__has_trivial_destruct
to determine whether to destructors need to be called (see trivial_destructor_example.cpp): --// +
// // algorithm destroy_array: // The reverse of std::unitialized_copy, takes a block of // initialized memory and calls destructors on all objects therein. @@ -66,13 +65,14 @@
-
diff --git a/doc/html/boost_typetraits/examples/fill.html b/doc/html/boost_typetraits/examples/fill.html index d371390..9e75407 100644 --- a/doc/html/boost_typetraits/examples/fill.html +++ b/doc/html/boost_typetraits/examples/fill.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -33,8 +33,7 @@ to determine whether to usememset
to optimise the fill operation (see fill_example.cpp): --// +
// // fill // same as std::fill, but uses memset where appropriate // @@ -73,13 +72,14 @@
-
diff --git a/doc/html/boost_typetraits/examples/iter.html b/doc/html/boost_typetraits/examples/iter.html index f3c1318..3c8f937 100644 --- a/doc/html/boost_typetraits/examples/iter.html +++ b/doc/html/boost_typetraits/examples/iter.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -36,8 +36,7 @@ the swap to ensure that the algorithm works correctly for both proxying iterators, and even iterators of different types (see iter_swap_example.cpp): --// +
// // iter_swap: // tests whether iterator is a proxying iterator or not, and // uses optimal form accordingly: @@ -82,13 +81,14 @@
-
diff --git a/doc/html/boost_typetraits/examples/to_double.html b/doc/html/boost_typetraits/examples/to_double.html index c1a59f0..fa515ea 100644 --- a/doc/html/boost_typetraits/examples/to_double.html +++ b/doc/html/boost_typetraits/examples/to_double.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -31,8 +31,7 @@ Demonstrates a conversion of Numeric Types and enum types to double: --template<class T> +template<class T> inline double to_double(T const& value) { typedef typename boost::promote<T>::type promoted; @@ -42,13 +41,14 @@
-
diff --git a/doc/html/boost_typetraits/intrinsics.html b/doc/html/boost_typetraits/intrinsics.html index 8c40bbe..8a27fdc 100644 --- a/doc/html/boost_typetraits/intrinsics.html +++ b/doc/html/boost_typetraits/intrinsics.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -71,7 +71,7 @@ of the following macros:-Table 1.4. Macros for Compiler Intrinsics
+Table 1.4. Macros for Compiler Intrinsics
@@ -227,13 +227,14 @@
-
@@ -48,13 +48,14 @@
-
diff --git a/doc/html/boost_typetraits/mpl.html b/doc/html/boost_typetraits/mpl.html index 3eddb4a..063944a 100644 --- a/doc/html/boost_typetraits/mpl.html +++ b/doc/html/boost_typetraits/mpl.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -45,13 +45,14 @@
-
diff --git a/doc/html/boost_typetraits/reference.html b/doc/html/boost_typetraits/reference.html index e0200a3..9638957 100644 --- a/doc/html/boost_typetraits/reference.html +++ b/doc/html/boost_typetraits/reference.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -104,13 +104,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/add_const.html b/doc/html/boost_typetraits/reference/add_const.html index 90feb0b..dd4bcd4 100644 --- a/doc/html/boost_typetraits/reference/add_const.html +++ b/doc/html/boost_typetraits/reference/add_const.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct add_const { typedefsee-below
type; @@ -54,7 +53,7 @@ or#include <boost/type_traits.hpp>
-Table 1.5. Examples
+Table 1.5. Examples
@@ -129,13 +128,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/add_cv.html b/doc/html/boost_typetraits/reference/add_cv.html index 81da4df..8fe48aa 100644 --- a/doc/html/boost_typetraits/reference/add_cv.html +++ b/doc/html/boost_typetraits/reference/add_cv.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct add_cv { typedefsee-below
type; @@ -55,7 +54,7 @@ or#include <boost/type_traits.hpp>
--Table 1.6. Examples
+Table 1.6. Examples
@@ -132,13 +131,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/add_pointer.html b/doc/html/boost_typetraits/reference/add_pointer.html index b6588e1..c4e9c66 100644 --- a/doc/html/boost_typetraits/reference/add_pointer.html +++ b/doc/html/boost_typetraits/reference/add_pointer.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct add_pointer { typedefsee-below
type; @@ -57,7 +56,7 @@ or#include <boost/type_traits.hpp>
-Table 1.7. Examples
+Table 1.7. Examples
@@ -131,13 +130,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/add_reference.html b/doc/html/boost_typetraits/reference/add_reference.html index 15fd08a..b14b4e4 100644 --- a/doc/html/boost_typetraits/reference/add_reference.html +++ b/doc/html/boost_typetraits/reference/add_reference.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct add_reference { typedefsee-below
type; @@ -54,7 +53,7 @@ or#include <boost/type_traits.hpp>
--Table 1.8. Examples
+Table 1.8. Examples
@@ -128,13 +127,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/add_volatile.html b/doc/html/boost_typetraits/reference/add_volatile.html index 0dd76f7..15e8d78 100644 --- a/doc/html/boost_typetraits/reference/add_volatile.html +++ b/doc/html/boost_typetraits/reference/add_volatile.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct add_volatile { typedefsee-below
type; @@ -54,7 +53,7 @@ or#include <boost/type_traits.hpp>
-Table 1.9. Examples
+Table 1.9. Examples
@@ -130,13 +129,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/aligned_storage.html b/doc/html/boost_typetraits/reference/aligned_storage.html index 5c2ee56..286cde6 100644 --- a/doc/html/boost_typetraits/reference/aligned_storage.html +++ b/doc/html/boost_typetraits/reference/aligned_storage.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <std::size_t Size, std::size_t Align> +template <std::size_t Size, std::size_t Align> struct aligned_storage { typedefsee-below
type; @@ -46,13 +45,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/alignment_of.html b/doc/html/boost_typetraits/reference/alignment_of.html index 1759dc0..1b364b6 100644 --- a/doc/html/boost_typetraits/reference/alignment_of.html +++ b/doc/html/boost_typetraits/reference/alignment_of.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct alignment_of : public integral_constant<std::size_t, ALIGNOF(T)> {};@@ -89,13 +88,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/decay.html b/doc/html/boost_typetraits/reference/decay.html index c3f7d2e..d59b743 100644 --- a/doc/html/boost_typetraits/reference/decay.html +++ b/doc/html/boost_typetraits/reference/decay.html @@ -14,8 +14,8 @@-Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct decay { typedefsee-below
type; @@ -49,7 +48,7 @@ or#include <boost/type_traits.hpp>
-Table 1.10. Examples
+Table 1.10. Examples
@@ -135,13 +134,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/extent.html b/doc/html/boost_typetraits/reference/extent.html index caa6195..5680d42 100644 --- a/doc/html/boost_typetraits/reference/extent.html +++ b/doc/html/boost_typetraits/reference/extent.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T, std::size_t N = 0> +template <class T, std::size_t N = 0> struct extent : public integral_constant<std::size_t, EXTENT(T,N)> {};@@ -121,13 +120,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/floating_point_promotion.html b/doc/html/boost_typetraits/reference/floating_point_promotion.html index b1dbd38..58dd94f 100644 --- a/doc/html/boost_typetraits/reference/floating_point_promotion.html +++ b/doc/html/boost_typetraits/reference/floating_point_promotion.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -27,8 +27,7 @@ floating_point_promotion-template <class T> +template <class T> struct floating_point_promotion { typedefsee-below
type; @@ -50,7 +49,7 @@ or#include <boost/type_traits.hpp>
--Table 1.11. Examples
+Table 1.11. Examples
@@ -113,13 +112,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/function_traits.html b/doc/html/boost_typetraits/reference/function_traits.html index 3ca347b..d05e611 100644 --- a/doc/html/boost_typetraits/reference/function_traits.html +++ b/doc/html/boost_typetraits/reference/function_traits.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct function_traits { static const std::size_t arity =see-below
; @@ -60,7 +59,7 @@-Table 1.13. Examples
+Table 1.13. Examples
@@ -259,13 +258,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html b/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html index b71350d..5fc5eee 100644 --- a/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html +++ b/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -32,13 +32,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/has_nothrow_assign.html b/doc/html/boost_typetraits/reference/has_nothrow_assign.html index 669a827..838e62b 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_assign.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_assign.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct has_nothrow_assign : publictrue_type-or-false_type
{};@@ -57,13 +56,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html index 1406f0f..7762bb1 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -27,8 +27,7 @@ has_nothrow_constructor-template <class T> +template <class T> struct has_nothrow_constructor : publictrue_type-or-false_type
{}; template <class T> @@ -64,13 +63,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/has_nothrow_copy.html b/doc/html/boost_typetraits/reference/has_nothrow_copy.html index 20b5fd7..3e8046c 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_copy.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_copy.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct has_nothrow_copy : publictrue_type-or-false_type
{}; template <class T> @@ -63,13 +62,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html b/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html index 1ef91c3..501c597 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -32,13 +32,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/has_trivial_assign.html b/doc/html/boost_typetraits/reference/has_trivial_assign.html index 968064d..956cf55 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_assign.html +++ b/doc/html/boost_typetraits/reference/has_trivial_assign.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct has_trivial_assign : publictrue_type-or-false_type
{};@@ -114,13 +113,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/has_trivial_constructor.html b/doc/html/boost_typetraits/reference/has_trivial_constructor.html index 0960f00..ac29da3 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_constructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_constructor.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -27,8 +27,7 @@ has_trivial_constructor-template <class T> +template <class T> struct has_trivial_constructor : publictrue_type-or-false_type
{}; template <class T> @@ -124,13 +123,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/has_trivial_copy.html b/doc/html/boost_typetraits/reference/has_trivial_copy.html index 124a2e7..f1fa15b 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_copy.html +++ b/doc/html/boost_typetraits/reference/has_trivial_copy.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct has_trivial_copy : publictrue_type-or-false_type
{}; template <class T> @@ -120,13 +119,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html b/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html index 2cc9178..df8099e 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -32,13 +32,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/has_trivial_def_cons.html b/doc/html/boost_typetraits/reference/has_trivial_def_cons.html index 5af22bb..3704060 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_def_cons.html +++ b/doc/html/boost_typetraits/reference/has_trivial_def_cons.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -32,13 +32,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/has_trivial_destructor.html b/doc/html/boost_typetraits/reference/has_trivial_destructor.html index 740179f..cf77ae8 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_destructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_destructor.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct has_trivial_destructor : publictrue_type-or-false_type
{};@@ -117,13 +116,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/has_virtual_destructor.html b/doc/html/boost_typetraits/reference/has_virtual_destructor.html index 43810e2..0509149 100644 --- a/doc/html/boost_typetraits/reference/has_virtual_destructor.html +++ b/doc/html/boost_typetraits/reference/has_virtual_destructor.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct has_virtual_destructor : publictrue_type-or-false_type
{};@@ -56,13 +55,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/integral_constant.html b/doc/html/boost_typetraits/reference/integral_constant.html index e6384e8..1a5cd28 100644 --- a/doc/html/boost_typetraits/reference/integral_constant.html +++ b/doc/html/boost_typetraits/reference/integral_constant.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T, T val> +template <class T, T val> struct integral_constant { typedef integral_constant<T, val> type; @@ -48,13 +47,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/integral_promotion.html b/doc/html/boost_typetraits/reference/integral_promotion.html index 908a74e..a02f240 100644 --- a/doc/html/boost_typetraits/reference/integral_promotion.html +++ b/doc/html/boost_typetraits/reference/integral_promotion.html @@ -14,8 +14,8 @@-Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct integral_promotion { typedefsee-below
type; @@ -50,7 +49,7 @@ or#include <boost/type_traits.hpp>
-Table 1.14. Examples
+Table 1.14. Examples
@@ -113,13 +112,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_abstract.html b/doc/html/boost_typetraits/reference/is_abstract.html index 79c4770..bb9494a 100644 --- a/doc/html/boost_typetraits/reference/is_abstract.html +++ b/doc/html/boost_typetraits/reference/is_abstract.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_abstract : publictrue_type-or-false_type
{};@@ -106,13 +105,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_arithmetic.html b/doc/html/boost_typetraits/reference/is_arithmetic.html index 757785a..8e2b695 100644 --- a/doc/html/boost_typetraits/reference/is_arithmetic.html +++ b/doc/html/boost_typetraits/reference/is_arithmetic.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_arithmetic : publictrue_type-or-false_type
{};@@ -89,13 +88,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_array.html b/doc/html/boost_typetraits/reference/is_array.html index 1862cd6..8a1be84 100644 --- a/doc/html/boost_typetraits/reference/is_array.html +++ b/doc/html/boost_typetraits/reference/is_array.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_array : publictrue_type-or-false_type
{};@@ -92,13 +91,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_base_of.html b/doc/html/boost_typetraits/reference/is_base_of.html index b64c5fa..fe814bf 100644 --- a/doc/html/boost_typetraits/reference/is_base_of.html +++ b/doc/html/boost_typetraits/reference/is_base_of.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class Base, class Derived> +template <class Base, class Derived> struct is_base_of : publictrue_type-or-false_type
{};@@ -141,13 +140,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_class.html b/doc/html/boost_typetraits/reference/is_class.html index ee73ee6..caddc27 100644 --- a/doc/html/boost_typetraits/reference/is_class.html +++ b/doc/html/boost_typetraits/reference/is_class.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_class : publictrue_type-or-false_type
{};@@ -125,13 +124,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_complex.html b/doc/html/boost_typetraits/reference/is_complex.html index 7b51fbf..97338b4 100644 --- a/doc/html/boost_typetraits/reference/is_complex.html +++ b/doc/html/boost_typetraits/reference/is_complex.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_complex : publictrue_type-or-false_type
{};@@ -47,13 +46,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_compound.html b/doc/html/boost_typetraits/reference/is_compound.html index d23e651..4c6569a 100644 --- a/doc/html/boost_typetraits/reference/is_compound.html +++ b/doc/html/boost_typetraits/reference/is_compound.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_compound : publictrue_type-or-false_type
{};@@ -108,13 +107,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_const.html b/doc/html/boost_typetraits/reference/is_const.html index b774a2d..79975cd 100644 --- a/doc/html/boost_typetraits/reference/is_const.html +++ b/doc/html/boost_typetraits/reference/is_const.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_const : publictrue_type-or-false_type
{};@@ -118,13 +117,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_convertible.html b/doc/html/boost_typetraits/reference/is_convertible.html index 363adc2..aae4b1a 100644 --- a/doc/html/boost_typetraits/reference/is_convertible.html +++ b/doc/html/boost_typetraits/reference/is_convertible.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class From, class To> +template <class From, class To> struct is_convertible : publictrue_type-or-false_type
{};@@ -59,8 +58,7 @@ This template will also produce compiler errors if the conversion is ambiguous, for example:
--struct A {}; +struct A {}; struct B : A {}; struct C : A {}; struct D : B, C {}; @@ -159,13 +157,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_empty.html b/doc/html/boost_typetraits/reference/is_empty.html index 17cf607..5016b46 100644 --- a/doc/html/boost_typetraits/reference/is_empty.html +++ b/doc/html/boost_typetraits/reference/is_empty.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_empty : publictrue_type-or-false_type
{};@@ -121,13 +120,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_enum.html b/doc/html/boost_typetraits/reference/is_enum.html index 081eb22..c7198f1 100644 --- a/doc/html/boost_typetraits/reference/is_enum.html +++ b/doc/html/boost_typetraits/reference/is_enum.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_enum : publictrue_type-or-false_type
{};@@ -125,13 +124,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_floating_point.html b/doc/html/boost_typetraits/reference/is_floating_point.html index e839de5..a3a8b89 100644 --- a/doc/html/boost_typetraits/reference/is_floating_point.html +++ b/doc/html/boost_typetraits/reference/is_floating_point.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_floating_point : publictrue_type-or-false_type
{};@@ -87,13 +86,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_function.html b/doc/html/boost_typetraits/reference/is_function.html index 79c3b36..95c036c 100644 --- a/doc/html/boost_typetraits/reference/is_function.html +++ b/doc/html/boost_typetraits/reference/is_function.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_function : publictrue_type-or-false_type
{};@@ -37,8 +36,7 @@ Note that this template does not detect pointers to functions, or references to functions, these are detected by is_pointer and is_reference respectively:
--typedef int f1(); // f1 is of function type. +typedef int f1(); // f1 is of function type. typedef int (f2*)(); // f2 is a pointer to a function. typedef int (f3&)(); // f3 is a reference to a function.@@ -175,13 +173,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_fundamental.html b/doc/html/boost_typetraits/reference/is_fundamental.html index 9f78751..ca29d1b 100644 --- a/doc/html/boost_typetraits/reference/is_fundamental.html +++ b/doc/html/boost_typetraits/reference/is_fundamental.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_fundamental : publictrue_type-or-false_type
{};@@ -92,13 +91,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_integral.html b/doc/html/boost_typetraits/reference/is_integral.html index e4dbb1e..ec8986f 100644 --- a/doc/html/boost_typetraits/reference/is_integral.html +++ b/doc/html/boost_typetraits/reference/is_integral.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_integral : publictrue_type-or-false_type
{};@@ -88,13 +87,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_member_function_pointer.html b/doc/html/boost_typetraits/reference/is_member_function_pointer.html index d658c82..2d3ae1e 100644 --- a/doc/html/boost_typetraits/reference/is_member_function_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_function_pointer.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -27,8 +27,7 @@ is_member_function_pointer-template <class T> +template <class T> struct is_member_function_pointer : publictrue_type-or-false_type
{};@@ -102,13 +101,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_member_object_pointer.html b/doc/html/boost_typetraits/reference/is_member_object_pointer.html index 47affae..8a41d11 100644 --- a/doc/html/boost_typetraits/reference/is_member_object_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_object_pointer.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -27,8 +27,7 @@ is_member_object_pointer-template <class T> +template <class T> struct is_member_object_pointer : publictrue_type-or-false_type
{};@@ -102,13 +101,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_member_pointer.html b/doc/html/boost_typetraits/reference/is_member_pointer.html index 8af5ac9..91ce7dc 100644 --- a/doc/html/boost_typetraits/reference/is_member_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_pointer.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_member_pointer : publictrue_type-or-false_type
{};@@ -88,13 +87,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_object.html b/doc/html/boost_typetraits/reference/is_object.html index 4db0775..1adf00b 100644 --- a/doc/html/boost_typetraits/reference/is_object.html +++ b/doc/html/boost_typetraits/reference/is_object.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_object : publictrue_type-or-false_type
{};@@ -131,13 +130,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_pod.html b/doc/html/boost_typetraits/reference/is_pod.html index 848267b..1ed071a 100644 --- a/doc/html/boost_typetraits/reference/is_pod.html +++ b/doc/html/boost_typetraits/reference/is_pod.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_pod : publictrue_type-or-false_type
{};@@ -118,13 +117,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_pointer.html b/doc/html/boost_typetraits/reference/is_pointer.html index 9f1fa46..8958a5c 100644 --- a/doc/html/boost_typetraits/reference/is_pointer.html +++ b/doc/html/boost_typetraits/reference/is_pointer.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_pointer : publictrue_type-or-false_type
{};@@ -124,13 +123,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_polymorphic.html b/doc/html/boost_typetraits/reference/is_polymorphic.html index 5f48303..a5b4fbc 100644 --- a/doc/html/boost_typetraits/reference/is_polymorphic.html +++ b/doc/html/boost_typetraits/reference/is_polymorphic.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_polymorphic : publictrue_type-or-false_type
{};@@ -104,13 +103,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_reference.html b/doc/html/boost_typetraits/reference/is_reference.html index c4e4b58..32fe6fa 100644 --- a/doc/html/boost_typetraits/reference/is_reference.html +++ b/doc/html/boost_typetraits/reference/is_reference.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_reference : publictrue_type-or-false_type
{};@@ -95,13 +94,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_same.html b/doc/html/boost_typetraits/reference/is_same.html index efda38a..59452c6 100644 --- a/doc/html/boost_typetraits/reference/is_same.html +++ b/doc/html/boost_typetraits/reference/is_same.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T, class U> +template <class T, class U> struct is_same : publictrue_type-or-false_type
{};@@ -109,13 +108,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_scalar.html b/doc/html/boost_typetraits/reference/is_scalar.html index b791cbc..c895870 100644 --- a/doc/html/boost_typetraits/reference/is_scalar.html +++ b/doc/html/boost_typetraits/reference/is_scalar.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_scalar : publictrue_type-or-false_type
{};@@ -124,13 +123,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_signed.html b/doc/html/boost_typetraits/reference/is_signed.html index ee0a985..d248dad 100644 --- a/doc/html/boost_typetraits/reference/is_signed.html +++ b/doc/html/boost_typetraits/reference/is_signed.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_signed : publictrue_type-or-false_type
{};@@ -118,13 +117,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_stateless.html b/doc/html/boost_typetraits/reference/is_stateless.html index a81c185..f4472d4 100644 --- a/doc/html/boost_typetraits/reference/is_stateless.html +++ b/doc/html/boost_typetraits/reference/is_stateless.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_stateless : publictrue_type-or-false_type
{};@@ -44,8 +43,7 @@ only inherits from true_type if the following expression is
-true
:-::boost::has_trivial_constructor<T>::value +::boost::has_trivial_constructor<T>::value && ::boost::has_trivial_copy<T>::value && ::boost::has_trivial_destructor<T>::value && ::boost::is_class<T>::value @@ -74,13 +72,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_union.html b/doc/html/boost_typetraits/reference/is_union.html index e74b394..ea59e84 100644 --- a/doc/html/boost_typetraits/reference/is_union.html +++ b/doc/html/boost_typetraits/reference/is_union.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_union : publictrue_type-or-false_type
{};@@ -111,13 +110,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_unsigned.html b/doc/html/boost_typetraits/reference/is_unsigned.html index a8f3121..59004b0 100644 --- a/doc/html/boost_typetraits/reference/is_unsigned.html +++ b/doc/html/boost_typetraits/reference/is_unsigned.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_unsigned : publictrue_type-or-false_type
{};@@ -120,13 +119,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_void.html b/doc/html/boost_typetraits/reference/is_void.html index 4e06720..516e4f7 100644 --- a/doc/html/boost_typetraits/reference/is_void.html +++ b/doc/html/boost_typetraits/reference/is_void.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_void : publictrue_type-or-false_type
{};@@ -98,13 +97,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/is_volatile.html b/doc/html/boost_typetraits/reference/is_volatile.html index 450a824..d66ddbc 100644 --- a/doc/html/boost_typetraits/reference/is_volatile.html +++ b/doc/html/boost_typetraits/reference/is_volatile.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct is_volatile : publictrue_type-or-false_type
{};@@ -98,13 +97,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/make_signed.html b/doc/html/boost_typetraits/reference/make_signed.html index d7ee39c..1a7aecb 100644 --- a/doc/html/boost_typetraits/reference/make_signed.html +++ b/doc/html/boost_typetraits/reference/make_signed.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct make_signed { typedefsee-below
type; @@ -55,7 +54,7 @@ or#include <boost/type_traits.hpp>
-Table 1.15. Examples
+Table 1.15. Examples
@@ -144,13 +143,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/make_unsigned.html b/doc/html/boost_typetraits/reference/make_unsigned.html index 18eb27f..e1ce164 100644 --- a/doc/html/boost_typetraits/reference/make_unsigned.html +++ b/doc/html/boost_typetraits/reference/make_unsigned.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct make_unsigned { typedefsee-below
type; @@ -55,7 +54,7 @@ or#include <boost/type_traits.hpp>
-Table 1.16. Examples
+Table 1.16. Examples
@@ -145,13 +144,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/promote.html b/doc/html/boost_typetraits/reference/promote.html index 7e8a7ed..088369c 100644 --- a/doc/html/boost_typetraits/reference/promote.html +++ b/doc/html/boost_typetraits/reference/promote.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct promote { typedefsee-below
type; @@ -52,7 +51,7 @@ or#include <boost/type_traits.hpp>
-Table 1.17. Examples
+Table 1.17. Examples
@@ -114,13 +113,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/rank.html b/doc/html/boost_typetraits/reference/rank.html index 177322f..11535db 100644 --- a/doc/html/boost_typetraits/reference/rank.html +++ b/doc/html/boost_typetraits/reference/rank.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct rank : public integral_constant<std::size_t, RANK(T)> {};@@ -109,13 +108,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/remove_all_extents.html b/doc/html/boost_typetraits/reference/remove_all_extents.html index 0c578e3..a77101e 100644 --- a/doc/html/boost_typetraits/reference/remove_all_extents.html +++ b/doc/html/boost_typetraits/reference/remove_all_extents.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct remove_all_extents { typedefsee-below
type; @@ -55,7 +54,7 @@ or#include <boost/type_traits.hpp>
-Table 1.18. Examples
+Table 1.18. Examples
@@ -141,13 +140,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/remove_const.html b/doc/html/boost_typetraits/reference/remove_const.html index d9701f5..c42c2ca 100644 --- a/doc/html/boost_typetraits/reference/remove_const.html +++ b/doc/html/boost_typetraits/reference/remove_const.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct remove_const { typedefsee-below
type; @@ -54,7 +53,7 @@ or#include <boost/type_traits.hpp>
-Table 1.19. Examples
+Table 1.19. Examples
@@ -141,13 +140,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/remove_cv.html b/doc/html/boost_typetraits/reference/remove_cv.html index 5ddec45..e7fc15e 100644 --- a/doc/html/boost_typetraits/reference/remove_cv.html +++ b/doc/html/boost_typetraits/reference/remove_cv.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct remove_cv { typedefsee-below
type; @@ -54,7 +53,7 @@ or#include <boost/type_traits.hpp>
-Table 1.20. Examples
+Table 1.20. Examples
@@ -141,13 +140,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/remove_extent.html b/doc/html/boost_typetraits/reference/remove_extent.html index 1d79cf4..5a277db 100644 --- a/doc/html/boost_typetraits/reference/remove_extent.html +++ b/doc/html/boost_typetraits/reference/remove_extent.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct remove_extent { typedefsee-below
type; @@ -55,7 +54,7 @@ or#include <boost/type_traits.hpp>
-Table 1.21. Examples
+Table 1.21. Examples
@@ -141,13 +140,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/remove_pointer.html b/doc/html/boost_typetraits/reference/remove_pointer.html index f651a79..3fd04e5 100644 --- a/doc/html/boost_typetraits/reference/remove_pointer.html +++ b/doc/html/boost_typetraits/reference/remove_pointer.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct remove_pointer { typedefsee-below
type; @@ -54,7 +53,7 @@ or#include <boost/type_traits.hpp>
-Table 1.22. Examples
+Table 1.22. Examples
@@ -140,13 +139,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/remove_reference.html b/doc/html/boost_typetraits/reference/remove_reference.html index 4aa377e..c67ee77 100644 --- a/doc/html/boost_typetraits/reference/remove_reference.html +++ b/doc/html/boost_typetraits/reference/remove_reference.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct remove_reference { typedefsee-below
type; @@ -54,7 +53,7 @@ or#include <boost/type_traits.hpp>
-Table 1.23. Examples
+Table 1.23. Examples
@@ -128,13 +127,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/remove_volatile.html b/doc/html/boost_typetraits/reference/remove_volatile.html index 333f9d3..8c3bbdc 100644 --- a/doc/html/boost_typetraits/reference/remove_volatile.html +++ b/doc/html/boost_typetraits/reference/remove_volatile.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <class T> +template <class T> struct remove_volatile { typedefsee-below
type; @@ -54,7 +53,7 @@ or#include <boost/type_traits.hpp>
-Table 1.24. Examples
+Table 1.24. Examples
@@ -141,13 +140,14 @@
-
diff --git a/doc/html/boost_typetraits/reference/type_with_alignment.html b/doc/html/boost_typetraits/reference/type_with_alignment.html index c0cabeb..3c8b133 100644 --- a/doc/html/boost_typetraits/reference/type_with_alignment.html +++ b/doc/html/boost_typetraits/reference/type_with_alignment.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -26,8 +26,7 @@ --template <std::size_t Align> +template <std::size_t Align> struct type_with_alignment { typedefsee-below
type; @@ -45,13 +44,14 @@
-
diff --git a/doc/html/boost_typetraits/user_defined.html b/doc/html/boost_typetraits/user_defined.html index aaa5add..31ce7b1 100644 --- a/doc/html/boost_typetraits/user_defined.html +++ b/doc/html/boost_typetraits/user_defined.html @@ -14,8 +14,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -34,8 +34,7 @@ or boost::false_type as appropriate: --#include <boost/type_traits/is_pod.hpp> +#include <boost/type_traits/is_pod.hpp> #include <boost/type_traits/is_class.hpp> #include <boost/type_traits/is_union.hpp> @@ -64,13 +63,14 @@
-
diff --git a/doc/html/index.html b/doc/html/index.html index 09c933a..39b19c2 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -12,8 +12,8 @@Home Libraries -People -FAQ +People +FAQ More
@@ -30,7 +30,7 @@ Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert Ramey and Jeremy Siek-+Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -155,10 +155,14 @@Credits + A printer-friendly PDF + version of this manual is also available. +
- - Last revised: November 07, 2007 at 18:38:23 +0000
+ + Last revised: November 08, 2007 at 09:38:22 +0000
diff --git a/doc/type_traits.qbk b/doc/type_traits.qbk index e53adaf..9bf50f8 100644 --- a/doc/type_traits.qbk +++ b/doc/type_traits.qbk @@ -116,6 +116,9 @@ [def __decay [link boost_typetraits.reference.decay decay]] [def __is_complex [link boost_typetraits.reference.is_complex is_complex]] +A printer-friendly [@http://svn.boost.org/svn/boost/sandbox/pdf/type_traits/release/type_traits.pdf + PDF version of this manual is also available]. + [section:intro Introduction] The Boost type-traits library contains a From 78eba00f6bbadca6ef87975d4535e70e0eae087e Mon Sep 17 00:00:00 2001 From: Daniel JamesDate: Sat, 15 Mar 2008 12:59:21 +0000 Subject: [PATCH 07/92] Update type traits links for new location. [SVN r43621] --- doc/credits.qbk | 4 ++-- doc/examples.qbk | 11 ++++++----- doc/intrinsics.qbk | 2 +- doc/mpl.qbk | 8 ++++---- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/doc/credits.qbk b/doc/credits.qbk index f8aab31..2c6c2cd 100644 --- a/doc/credits.qbk +++ b/doc/credits.qbk @@ -8,8 +8,8 @@ [section:credits Credits] This documentation was pulled together by John Maddock, using -[@../../tools/quickbook/doc/html/index.html Boost.Quickbook] -and [@boostbook.html Boost.DocBook]. +[@../../../../tools/quickbook/doc/html/index.html Boost.Quickbook] +and [@../../../../doc/html/boostbook.html Boost.DocBook]. The original version of this library was created by Steve Cleary, Beman Dawes, Howard Hinnant, and John Maddock. John Maddock is the diff --git a/doc/examples.qbk b/doc/examples.qbk index 386571c..32729d9 100644 --- a/doc/examples.qbk +++ b/doc/examples.qbk @@ -11,7 +11,7 @@ Demonstrates a version of `std::copy` that uses `__has_trivial_assign` to determine whether to use `memcpy` to optimise the copy operation -(see [@../../libs/type_traits/examples/copy_example.cpp copy_example.cpp]): +(see [@../../examples/copy_example.cpp copy_example.cpp]): // // opt::copy @@ -62,7 +62,7 @@ determine whether to use `memcpy` to optimise the copy operation Demonstrates a version of `std::fill` that uses `__has_trivial_assign` to determine whether to use `memset` to optimise the fill operation -(see [@../../libs/type_traits/examples/fill_example.cpp fill_example.cpp]): +(see [@../../examples/fill_example.cpp fill_example.cpp]): // // fill @@ -107,7 +107,7 @@ determine whether to use `memset` to optimise the fill operation Demonstrates a simple algorithm that uses `__has_trivial_destruct` to determine whether to destructors need to be called -(see [@../../libs/type_traits/examples/trivial_destructor_example.cpp trivial_destructor_example.cpp]): +(see [@../../examples/trivial_destructor_example.cpp trivial_destructor_example.cpp]): // // algorithm destroy_array: @@ -153,7 +153,7 @@ same as `std::iter_swap` does), however if they are proxying iterators then takes special care over the swap to ensure that the algorithm works correctly for both proxying iterators, and even iterators of different types -(see [@../../libs/type_traits/examples/iter_swap_example.cpp iter_swap_example.cpp]): +(see [@../../examples/iter_swap_example.cpp iter_swap_example.cpp]): // // iter_swap: @@ -203,7 +203,8 @@ different types [section:to_double Convert Numeric Types and Enums to double] Demonstrates a conversion of -[@../../libs/numeric/conversion/doc/definitions.html#numtypes Numeric Types] +[@../../../../libs/numeric/conversion/doc/html/boost_numericconversion/definitions.html#boost_numericconversion.definitions.numeric_types +Numeric Types] and enum types to double: template diff --git a/doc/intrinsics.qbk b/doc/intrinsics.qbk index 12f20e1..d8a0734 100644 --- a/doc/intrinsics.qbk +++ b/doc/intrinsics.qbk @@ -41,7 +41,7 @@ The following traits classes are dependent on one or more of the above: * __is_stateless The hooks for compiler-intrinsic support are defined in -[@../../boost/type_traits/intrinsics.hpp boost/type_traits/intrinsics.hpp], adding support for new compilers is simply +[@../../../../boost/type_traits/intrinsics.hpp boost/type_traits/intrinsics.hpp], adding support for new compilers is simply a matter of defining one of more of the following macros: [table Macros for Compiler Intrinsics diff --git a/doc/mpl.qbk b/doc/mpl.qbk index a9255c8..cc023d6 100644 --- a/doc/mpl.qbk +++ b/doc/mpl.qbk @@ -8,13 +8,13 @@ [section:mpl MPL Interoperability] All the value based traits in this library conform to MPL's requirements -for an [@../../libs/mpl/doc/refmanual/integral-constant.html Integral Constant type]: that includes a number of rather intrusive +for an [@../../../../libs/mpl/doc/refmanual/integral-constant.html Integral Constant type]: that includes a number of rather intrusive workarounds for broken compilers. Purely as an implementation detail, this -means that `__true_type` inherits from [@../../libs/mpl/doc/refmanual/bool.html `boost::mpl::true_`], `__false_type` inherits -from [@../../libs/mpl/doc/refmanual/bool.html `boost::mpl::false_`], and `__integral_constant ` inherits from -[@../../libs/mpl/doc/refmanual/integral-c.html `boost::mpl::integral_c `] (provided `T` is not `bool`) +means that `__true_type` inherits from [@../../../../libs/mpl/doc/refmanual/bool.html `boost::mpl::true_`], `__false_type` inherits +from [@../../../../libs/mpl/doc/refmanual/bool.html `boost::mpl::false_`], and `__integral_constant ` inherits from +[@../../../../libs/mpl/doc/refmanual/integral-c.html `boost::mpl::integral_c `] (provided `T` is not `bool`) [endsect] From 8fa9c7e6a709d6b91830339b891e52e77e8fff5e Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 15 Mar 2008 13:04:57 +0000 Subject: [PATCH 08/92] Regenerate the type traits docs, to get changes from [43621]. Refs #1686. [SVN r43622] --- doc/html/boost_typetraits/background.html | 122 ++++++++++-------- doc/html/boost_typetraits/category.html | 6 +- .../boost_typetraits/category/alignment.html | 17 +-- .../boost_typetraits/category/function.html | 15 ++- .../boost_typetraits/category/transform.html | 55 ++++---- .../category/value_traits.html | 14 +- .../category/value_traits/primary.html | 58 +++++---- .../category/value_traits/properties.html | 57 ++++---- .../category/value_traits/relate.html | 15 ++- doc/html/boost_typetraits/credits.html | 12 +- doc/html/boost_typetraits/examples.html | 6 +- doc/html/boost_typetraits/examples/copy.html | 19 +-- .../boost_typetraits/examples/destruct.html | 17 +-- doc/html/boost_typetraits/examples/fill.html | 21 +-- doc/html/boost_typetraits/examples/iter.html | 23 ++-- .../boost_typetraits/examples/to_double.html | 11 +- doc/html/boost_typetraits/intrinsics.html | 38 +++--- doc/html/boost_typetraits/intro.html | 10 +- doc/html/boost_typetraits/mpl.html | 20 +-- doc/html/boost_typetraits/reference.html | 6 +- .../boost_typetraits/reference/add_const.html | 13 +- .../boost_typetraits/reference/add_cv.html | 13 +- .../reference/add_pointer.html | 13 +- .../reference/add_reference.html | 13 +- .../reference/add_volatile.html | 13 +- .../reference/aligned_storage.html | 9 +- .../reference/alignment_of.html | 15 ++- .../boost_typetraits/reference/decay.html | 11 +- .../boost_typetraits/reference/extent.html | 19 +-- .../reference/floating_point_promotion.html | 11 +- .../reference/function_traits.html | 15 ++- .../reference/has_no_throw_def_cons.html | 8 +- .../reference/has_nothrow_assign.html | 15 ++- .../reference/has_nothrow_constructor.html | 19 +-- .../reference/has_nothrow_copy.html | 19 +-- .../reference/has_nothrow_cp_cons.html | 8 +- .../reference/has_trivial_assign.html | 21 +-- .../reference/has_trivial_constructor.html | 23 ++-- .../reference/has_trivial_copy.html | 23 ++-- .../reference/has_trivial_cp_cons.html | 8 +- .../reference/has_trivial_def_cons.html | 8 +- .../reference/has_trivial_destructor.html | 21 +-- .../reference/has_virtual_destructor.html | 21 +-- .../reference/integral_constant.html | 9 +- .../reference/integral_promotion.html | 11 +- .../reference/is_abstract.html | 21 +-- .../reference/is_arithmetic.html | 23 ++-- .../boost_typetraits/reference/is_array.html | 19 +-- .../reference/is_base_of.html | 21 +-- .../boost_typetraits/reference/is_class.html | 25 ++-- .../reference/is_complex.html | 11 +- .../reference/is_compound.html | 21 +-- .../boost_typetraits/reference/is_const.html | 19 +-- .../reference/is_convertible.html | 24 ++-- .../boost_typetraits/reference/is_empty.html | 21 +-- .../boost_typetraits/reference/is_enum.html | 21 +-- .../reference/is_floating_point.html | 19 +-- .../reference/is_function.html | 30 +++-- .../reference/is_fundamental.html | 25 ++-- .../reference/is_integral.html | 19 +-- .../reference/is_member_function_pointer.html | 23 ++-- .../reference/is_member_object_pointer.html | 23 ++-- .../reference/is_member_pointer.html | 19 +-- .../boost_typetraits/reference/is_object.html | 19 +-- .../boost_typetraits/reference/is_pod.html | 19 +-- .../reference/is_pointer.html | 19 +-- .../reference/is_polymorphic.html | 19 +-- .../reference/is_reference.html | 19 +-- .../boost_typetraits/reference/is_same.html | 19 +-- .../boost_typetraits/reference/is_scalar.html | 19 +-- .../boost_typetraits/reference/is_signed.html | 19 +-- .../reference/is_stateless.html | 22 ++-- .../boost_typetraits/reference/is_union.html | 23 ++-- .../reference/is_unsigned.html | 19 +-- .../boost_typetraits/reference/is_void.html | 19 +-- .../reference/is_volatile.html | 19 +-- .../reference/make_signed.html | 11 +- .../reference/make_unsigned.html | 11 +- .../boost_typetraits/reference/promote.html | 15 ++- doc/html/boost_typetraits/reference/rank.html | 17 +-- .../reference/remove_all_extents.html | 13 +- .../reference/remove_const.html | 13 +- .../boost_typetraits/reference/remove_cv.html | 13 +- .../reference/remove_extent.html | 13 +- .../reference/remove_pointer.html | 13 +- .../reference/remove_reference.html | 13 +- .../reference/remove_volatile.html | 13 +- .../reference/type_with_alignment.html | 9 +- doc/html/boost_typetraits/user_defined.html | 21 +-- doc/html/index.html | 6 +- 90 files changed, 905 insertions(+), 815 deletions(-) diff --git a/doc/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index 6d49b8e..4beb97f 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -3,7 +3,7 @@ Background and Tutorial - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,7 +24,7 @@The following is an updated version of the article "C++ Type traits" @@ -56,19 +56,19 @@ method available to them.
- - Type Traits + + Type Traits
Class
char_traits
is a classic example of a collection of type specific properties wrapped up in a single - class - what Nathan Myers termed a baggage class[1]. In the Boost type-traits library, - we[2] have written a set of very + class - what Nathan Myers termed a baggage class[1]. In the Boost type-traits library, + we[2] have written a set of very specific traits classes, each of which encapsulate a single trait from the C++ type system; for example, is a type a pointer or a reference type? Or does a type have a trivial constructor, or a const-qualifier? The type-traits classes - share a unified design: each class inherits from a the type true_type - if the type has the specified property and inherits from false_type + share a unified design: each class inherits from a the type true_type + if the type has the specified property and inherits from false_type otherwise. As we will show, these classes can be used in generic programming to determine the properties of a given type and introduce optimizations that are appropriate for that case. @@ -84,8 +84,8 @@ given.- - Implementation + + Implementation
There are far too many separate classes contained in the type-traits library @@ -94,17 +94,18 @@ anyway, so here we will just give you a flavor for how some of the classes are implemented. Beginning with possibly the simplest class in the library,
-is_void<T>
inherits - fromtrue_type
+ fromtrue_type
only ifT
isvoid
.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 classis_void
, and provide a full-specialization whenT
isvoid
. While full specialization of a template class is an important technique, sometimes we need a solution @@ -115,11 +116,12 @@ a pointer, and a partial specialization to handle all the cases where T is a pointer:template <typename T> -struct is_pointer : public false_type{}; ++template <typename T> +struct is_pointer : public false_type{}; template <typename T> -struct is_pointer<T*> : public true_type{}; +struct is_pointer<T*> : public true_type{};The syntax for partial specialization is somewhat arcane and could easily occupy @@ -132,13 +134,15 @@ but as a rule of thumb if you can legally write two function overloads of the form:
-void foo(T); ++void foo(T); void foo(U);Then you can also write a partial specialization of the form:
-template <typename T> ++template <typename T> class c{ /*details*/ }; template <typename T> @@ -154,18 +158,19 @@ that is the same type as T but with any top-level array bounds removed; this is an example of a traits class that performs a transformation on a type: -template <typename T> -struct remove_extent ++template <typename T> +struct remove_extent { typedef T type; }; template <typename T, std::size_t N> -struct remove_extent<T[N]> +struct remove_extent<T[N]> { typedef T type; };- The aim of
remove_extent
+ The aim ofremove_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 exampleremove_extent<int[4][5]>::type
would evaluate to the typeint[5]
. This example also shows that the number of template parameters in a partial specialization does not have to match the @@ -174,14 +179,15 @@ in the default template.- - Optimized copy + + Optimized copy
As an example of how the type traits classes can be used, consider the standard library algorithm copy:
-template<typename Iter1, typename Iter2> ++template<typename Iter1, typename Iter2> Iter2 copy(Iter1 first, Iter1 last, Iter2 out);@@ -208,7 +214,7 @@
- By trivial assignment operator we mean that the type is either a scalar type[3] or: + By trivial assignment operator we mean that the type is either a scalar type[3] or:
- @@ -224,20 +230,20 @@
If all these conditions are met then a type can be copied using
memcpy
rather than using a compiler generated - assignment operator. The type-traits library provides a classhas_trivial_assign
, + assignment operator. The type-traits library provides a classhas_trivial_assign
, such thathas_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 functiondo_copy
that performs a "slow but safe" - copy. The last parameter passed to this function may be either atrue_type
- or afalse_type
. + copy. The last parameter passed to this function may be either atrue_type
+ or afalse_type
. Following that there is an overload of docopy that uses `memcpy`: this time the iterators are required to actually be pointers to the same type, and the final parameter must be a `_true_type. Finally, the version @@ -247,15 +253,15 @@ otherwise it will call the "slow but safe version".
- - Was it worth it? + + Was it worth it?
It has often been repeated in these columns that "premature optimization - is the root of all evil" [4]. + is the root of all evil" [4]. So the question must be asked: was our optimization premature? To put this in perspective the timings for our version of copy compared a conventional - generic copy[5] are shown in table + generic copy[5] are shown in table 1.
@@ -280,7 +286,7 @@
-Table 1.1. Time taken to copy 1000 elements using `copy<const +
Table 1.1. Time taken to copy 1000 elements using `copy<const T*, T*>` (times in micro-seconds)
@@ -379,8 +385,8 @@
- - Pair of References + + Pair of References
The optimized copy example shows how type traits may be used to perform optimization @@ -388,14 +394,15 @@ code to compile that otherwise would not do so unless excessive partial specialization is used. This is possible by delegating partial specialization to the type traits classes. Our example for this form of usage is a pair that can hold - references [6]. + references [6].
First, let us examine the definition of
-std::pair
, omitting the comparison operators, default constructor, and template copy constructor for simplicity:template <typename T1, typename T2> ++template <typename T1, typename T2> struct pair { typedef T1 first_type; @@ -411,12 +418,12 @@Now, this "pair" cannot hold references as it currently stands, because the constructor would require taking a reference to a reference, which is currently - illegal [7]. Let us consider what + illegal [7]. Let us consider what the constructor's parameters would have to be in order to allow "pair" to hold non-reference types, references, and constant references:
-Table 1.2. Required Constructor Argument Types
+Table 1.2. Required Constructor Argument Types
@@ -477,11 +484,11 @@ A little familiarity with the type traits classes allows us to construct a single mapping that allows us to determine the type of parameter from the type - of the contained class. The type traits classes provide a transformation add_reference, which + of the contained class. The type traits classes provide a transformation add_reference, which adds a reference to its type, unless it is already a reference.
-Table 1.3. Using add_reference to synthesize the correct constructor +
Table 1.3. Using add_reference to synthesize the correct constructor type
@@ -567,7 +574,8 @@ that can contain non-reference types, reference types, and constant reference types: -
template <typename T1, typename T2> ++template <typename T1, typename T2> struct pair { typedef T1 first_type; @@ -576,8 +584,8 @@ T1 first; T2 second; -pair(boost::add_reference<const T1>::type nfirst, - boost::add_reference<const T2>::type nsecond) +pair(boost::add_reference<const T1>::type nfirst, + boost::add_reference<const T2>::type nsecond) :first(nfirst), second(nsecond) { } };@@ -598,8 +606,8 @@ easier to maintain and easier to understand.- - Conclusion + + Conclusion
We hope that in this article we have been able to give you some idea of what @@ -611,16 +619,16 @@ can be optimal as well as generic.
- - Acknowledgements + + Acknowledgements
The authors would like to thank Beman Dawes and Howard Hinnant for their helpful comments when preparing this article.
- - References + + References
- diff --git a/doc/html/boost_typetraits/category.html b/doc/html/boost_typetraits/category.html index cdf6353..fb652db 100644 --- a/doc/html/boost_typetraits/category.html +++ b/doc/html/boost_typetraits/category.html @@ -3,7 +3,7 @@
Type Traits by Category - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,7 +24,7 @@
- Type Traits diff --git a/doc/html/boost_typetraits/category/alignment.html b/doc/html/boost_typetraits/category/alignment.html index 6d5ea02..e58ff17 100644 --- a/doc/html/boost_typetraits/category/alignment.html +++ b/doc/html/boost_typetraits/category/alignment.html @@ -3,7 +3,7 @@
Synthesizing Types with Specific Alignments - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,23 +24,24 @@Some low level memory management routines need to synthesize a POD type with - specific alignment properties. The template
type_with_alignment
- finds the smallest type with a specified alignment, while templatealigned_storage
+ specific alignment properties. The templatetype_with_alignment
+ finds the smallest type with a specified alignment, while templatealigned_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 b32289e..52e18cd 100644 --- a/doc/html/boost_typetraits/category/function.html +++ b/doc/html/boost_typetraits/category/function.html @@ -3,7 +3,7 @@ Decomposing Function Types - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,20 +24,21 @@- The class template function_traits - extracts information from function types (see also is_function). + The class template function_traits + extracts information from function types (see also is_function). This traits class allows you to tell how many arguments a function takes, what those argument types are, and what the return type is.
Synopsis
-template <std::size_t Align> -struct function_traits; ++template <std::size_t Align> +struct function_traits;
diff --git a/doc/html/boost_typetraits/category/transform.html b/doc/html/boost_typetraits/category/transform.html index a91fa23..df430ca 100644 --- a/doc/html/boost_typetraits/category/transform.html +++ b/doc/html/boost_typetraits/category/transform.html @@ -3,7 +3,7 @@ Type Traits that Transform One Type to Another - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,7 +24,7 @@@@ -36,63 +36,64 @@
Synopsis:
-template <class T> -struct add_const; ++template <class T> +struct add_const; template <class T> -struct add_cv; +struct add_cv; template <class T> -struct add_pointer; +struct add_pointer; template <class T> -struct add_reference; +struct add_reference; template <class T> -struct add_volatile; +struct add_volatile; template <class T> -struct decay; +struct decay; template <class T> -struct floating_point_promotion; +struct floating_point_promotion; template <class T> -struct integral_promotion; +struct integral_promotion; template <class T> -struct make_signed; +struct make_signed; template <class T> -struct make_unsigned; +struct make_unsigned; template <class T> -struct promote; +struct promote; template <class T> -struct remove_all_extents; +struct remove_all_extents; template <class T> -struct remove_const; +struct remove_const; template <class T> -struct remove_cv; +struct remove_cv; template <class T> -struct remove_extent; +struct remove_extent; template <class T> -struct remove_pointer; +struct remove_pointer; template <class T> -struct remove_reference; +struct remove_reference; template <class T> -struct remove_volatile; +struct remove_volatile;- - Broken + + Broken Compiler Workarounds:
@@ -116,7 +117,8 @@
The first part guarantees the successful compilation of something like this:
-BOOST_STATIC_ASSERT((is_same<char, remove_reference<char&>::type>::value)); ++BOOST_STATIC_ASSERT((is_same<char, remove_reference<char&>::type>::value)); BOOST_STATIC_ASSERT((is_same<char const, remove_reference<char const&>::type>::value)); BOOST_STATIC_ASSERT((is_same<char volatile, remove_reference<char volatile&>::type>::value)); BOOST_STATIC_ASSERT((is_same<char const volatile, remove_reference<char const volatile&>::type>::value)); @@ -131,7 +133,8 @@int
or other built-in type, but for their own types as well: -namespace myspace{ ++namespace myspace{ struct MyClass {}; } // declare this at global scope: diff --git a/doc/html/boost_typetraits/category/value_traits.html b/doc/html/boost_typetraits/category/value_traits.html index 9a9f27c..c2795f5 100644 --- a/doc/html/boost_typetraits/category/value_traits.html +++ b/doc/html/boost_typetraits/category/value_traits.html @@ -3,7 +3,7 @@Type Traits that Describe the Properties of a Type - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,7 +24,7 @@@@ -37,13 +37,13 @@
These traits are all value traits, which is to say the - traits classes all inherit from integral_constant, + traits classes all inherit from integral_constant, and are used to access some numerical property of a type. Often this is a simple true or false Boolean value, but in a few cases may be some other integer value (for example when dealing with type alignments, or array bounds: - see
alignment_of
, -rank
- andextent
). + seealignment_of
, +rank
+ andextent
).
diff --git a/doc/html/boost_typetraits/category/value_traits/primary.html b/doc/html/boost_typetraits/category/value_traits/primary.html index bd026c2..5799c9b 100644 --- a/doc/html/boost_typetraits/category/value_traits/primary.html +++ b/doc/html/boost_typetraits/category/value_traits/primary.html @@ -3,7 +3,7 @@ Categorizing a Type - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -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
- andis_floating_point<T>::value
+ This means thatis_integral<T>::value
+ andis_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 thestd::numeric_limits @@ -48,67 +48,69 @@
Synopsis:
-template <class T> -struct is_array<T>; ++template <class T> +struct is_array<T>; template <class T> -struct is_class<T>; +struct is_class<T>; template <class T> -struct is_complex<T>; +struct is_complex<T>; template <class T> -struct is_enum<T>; +struct is_enum<T>; template <class T> -struct is_floating_point<T>; +struct is_floating_point<T>; template <class T> -struct is_function<T>; +struct is_function<T>; template <class T> -struct is_integral<T>; +struct is_integral<T>; template <class T> -struct is_member_function_pointer<T>; +struct is_member_function_pointer<T>; template <class T> -struct is_member_object_pointer<T>; +struct is_member_object_pointer<T>; template <class T> -struct is_pointer<T>; +struct is_pointer<T>; template <class T> -struct is_reference<T>; +struct is_reference<T>; template <class T> -struct is_union<T>; +struct is_union<T>; template <class T> -struct is_void<T>; +struct is_void<T>;The following traits are made up of the union of one or more type categorizations. A type may belong to more than one of these categories, in addition to one of the primary categories.
-template <class T> -struct is_arithmetic; ++template <class T> +struct is_arithmetic; template <class T> -struct is_compound; +struct is_compound; template <class T> -struct is_fundamental; +struct is_fundamental; template <class T> -struct is_member_pointer; +struct is_member_pointer; template <class T> -struct is_object; +struct is_object; template <class T> -struct is_scalar; +struct is_scalar;
diff --git a/doc/html/boost_typetraits/category/value_traits/properties.html b/doc/html/boost_typetraits/category/value_traits/properties.html index bf034ae..b1a3a5d 100644 --- a/doc/html/boost_typetraits/category/value_traits/properties.html +++ b/doc/html/boost_typetraits/category/value_traits/properties.html @@ -3,7 +3,7 @@ General Type Properties - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,7 +24,7 @@@@ -33,77 +33,78 @@
Synopsis:
-template <class T> -struct alignment_of; ++template <class T> +struct alignment_of; template <class T> -struct has_nothrow_assign; +struct has_nothrow_assign; template <class T> -struct has_nothrow_constructor; +struct has_nothrow_constructor; template <class T> -struct has_nothrow_default_constructor; +struct has_nothrow_default_constructor; template <class T> -struct has_nothrow_copy; +struct has_nothrow_copy; template <class T> -struct has_nothrow_copy_constructor; +struct has_nothrow_copy_constructor; template <class T> -struct has_trivial_assign; +struct has_trivial_assign; template <class T> -struct has_trivial_constructor; +struct has_trivial_constructor; template <class T> -struct has_trivial_default_constructor; +struct has_trivial_default_constructor; template <class T> -struct has_trivial_copy; +struct has_trivial_copy; template <class T> -struct has_trivial_copy_constructor; +struct has_trivial_copy_constructor; template <class T> -struct has_trivial_destructor; +struct has_trivial_destructor; template <class T> -struct has_virtual_destructor; +struct has_virtual_destructor; template <class T> -struct is_abstract; +struct is_abstract; template <class T> -struct is_const; +struct is_const; template <class T> -struct is_empty; +struct is_empty; template <class T> -struct is_stateless; +struct is_stateless; template <class T> -struct is_pod; +struct is_pod; template <class T> -struct is_polymorphic; +struct is_polymorphic; template <class T> -struct is_signed; +struct is_signed; template <class T> -struct is_unsigned; +struct is_unsigned; template <class T> -struct is_volatile; +struct is_volatile; template <class T, std::size_t N = 0> -struct extent; +struct extent; template <class T> -struct rank; +struct rank;
diff --git a/doc/html/boost_typetraits/category/value_traits/relate.html b/doc/html/boost_typetraits/category/value_traits/relate.html index 938f763..09db8ea 100644 --- a/doc/html/boost_typetraits/category/value_traits/relate.html +++ b/doc/html/boost_typetraits/category/value_traits/relate.html @@ -3,7 +3,7 @@ Relationships Between Two Types - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,7 +24,7 @@@@ -34,14 +34,15 @@
Synopsis:
-template <class Base, class Derived> -struct is_base_of; ++template <class Base, class Derived> +struct is_base_of; template <class From, class To> -struct is_convertible; +struct is_convertible; template <class T, class U> -struct is_same; +struct is_same;
diff --git a/doc/html/boost_typetraits/credits.html b/doc/html/boost_typetraits/credits.html index 69085e0..5ba3552 100644 --- a/doc/html/boost_typetraits/credits.html +++ b/doc/html/boost_typetraits/credits.html @@ -3,7 +3,7 @@ Credits - + @@ -11,7 +11,7 @@
- Home +Home Libraries People FAQ @@ -23,11 +23,11 @@- This documentation was pulled together by John Maddock, using Boost.Quickbook - and Boost.DocBook. + This documentation was pulled together by John Maddock, using Boost.Quickbook + and Boost.DocBook.
The original version of this library was created by Steve Cleary, Beman Dawes, @@ -49,7 +49,7 @@ Aleksey Gurtovoy added MPL integration to the library.
- The is_convertible + The is_convertible template is based on code originally devised by Andrei Alexandrescu, see "Generic<Programming>: Mappings between Types and Values".
diff --git a/doc/html/boost_typetraits/examples.html b/doc/html/boost_typetraits/examples.html index afa695d..3003c46 100644 --- a/doc/html/boost_typetraits/examples.html +++ b/doc/html/boost_typetraits/examples.html @@ -3,7 +3,7 @@Examples - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,7 +24,7 @@
- An Optimized Version diff --git a/doc/html/boost_typetraits/examples/copy.html b/doc/html/boost_typetraits/examples/copy.html index e7cc4d1..5de05ee 100644 --- a/doc/html/boost_typetraits/examples/copy.html +++ b/doc/html/boost_typetraits/examples/copy.html @@ -3,7 +3,7 @@
An Optimized Version of std::copy - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,16 +24,17 @@diff --git a/doc/html/boost_typetraits/examples/destruct.html b/doc/html/boost_typetraits/examples/destruct.html index 4545f5e..1f26bb7 100644 --- a/doc/html/boost_typetraits/examples/destruct.html +++ b/doc/html/boost_typetraits/examples/destruct.html @@ -3,7 +3,7 @@Demonstrates a version of
-std::copy
- that useshas_trivial_assign
+ that useshas_trivial_assign
to determine whether to usememcpy
- to optimise the copy operation (see copy_example.cpp): + to optimise the copy operation (see copy_example.cpp):// +
+// // opt::copy // same semantics as std::copy // calls memcpy where appropriate. @@ -42,7 +43,7 @@ namespace detail{ template<typename I1, typename I2, bool b> -I2 copy_imp(I1 first, I1 last, I2 out, const boost::integral_constant<bool, b>&) +I2 copy_imp(I1 first, I1 last, I2 out, const boost::integral_constant<bool, b>&) { while(first != last) { @@ -54,7 +55,7 @@ } template<typename T> -T* copy_imp(const T* first, const T* last, T* out, const boost::true_type&) +T* copy_imp(const T* first, const T* last, T* out, const boost::true_type&) { memcpy(out, first, (last-first)*sizeof(T)); return out+(last-first); @@ -72,7 +73,7 @@ // requirement we detect with overload resolution): // typedef typename std::iterator_traits<I1>::value_type value_type; - return detail::copy_imp(first, last, out, boost::has_trivial_assign<value_type>()); + return detail::copy_imp(first, last, out, boost::has_trivial_assign<value_type>()); }An Example that Omits Destructor Calls For Types with Trivial Destructors - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,14 +24,15 @@diff --git a/doc/html/boost_typetraits/examples/fill.html b/doc/html/boost_typetraits/examples/fill.html index 9e75407..4ad227f 100644 --- a/doc/html/boost_typetraits/examples/fill.html +++ b/doc/html/boost_typetraits/examples/fill.html @@ -3,7 +3,7 @@Demonstrates a simple algorithm that uses
-__has_trivial_destruct
- to determine whether to destructors need to be called (see trivial_destructor_example.cpp): + to determine whether to destructors need to be called (see trivial_destructor_example.cpp):// +
+// // algorithm destroy_array: // The reverse of std::unitialized_copy, takes a block of // initialized memory and calls destructors on all objects therein. @@ -40,7 +41,7 @@ namespace detail{ template <class T> -void do_destroy_array(T* first, T* last, const boost::false_type&) +void do_destroy_array(T* first, T* last, const boost::false_type&) { while(first != last) { @@ -50,7 +51,7 @@ } template <class T> -inline void do_destroy_array(T* first, T* last, const boost::true_type&) +inline void do_destroy_array(T* first, T* last, const boost::true_type&) { } @@ -59,7 +60,7 @@ template <class T> inline void destroy_array(T* p1, T* p2) { - detail::do_destroy_array(p1, p2, ::boost::has_trivial_destructor<T>()); + detail::do_destroy_array(p1, p2, ::boost::has_trivial_destructor<T>()); }An Optimised Version of std::fill - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,23 +24,24 @@Demonstrates a version of
-std::fill
- that useshas_trivial_assign
+ that useshas_trivial_assign
to determine whether to usememset
- to optimise the fill operation (see fill_example.cpp): + to optimise the fill operation (see fill_example.cpp):// +diff --git a/doc/html/boost_typetraits/examples/iter.html b/doc/html/boost_typetraits/examples/iter.html index 3c8f937..ec04c97 100644 --- a/doc/html/boost_typetraits/examples/iter.html +++ b/doc/html/boost_typetraits/examples/iter.html @@ -3,7 +3,7 @@+// // fill // same as std::fill, but uses memset where appropriate // namespace detail{ template <typename I, typename T, bool b> -void do_fill(I first, I last, const T& val, const boost::integral_constant<bool, b>&) +void do_fill(I first, I last, const T& val, const boost::integral_constant<bool, b>&) { while(first != last) { @@ -50,7 +51,7 @@ } template <typename T> -void do_fill(T* first, T* last, const T& val, const boost::true_type&) +void do_fill(T* first, T* last, const T& val, const boost::true_type&) { std::memset(first, val, last-first); } @@ -64,8 +65,8 @@// We can do an optimised fill if T has a trivial assignment // operator and if it's size is one: // - typedef boost::integral_constant<bool, - ::boost::has_trivial_assign<T>::value && (sizeof(T) == 1)> truth_type; + typedef boost::integral_constant<bool, + ::boost::has_trivial_assign<T>::value && (sizeof(T) == 1)> truth_type; detail::do_fill(first, last, val, truth_type()); }An improved Version of std::iter_swap - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,7 +24,7 @@@@ -34,9 +34,10 @@ of it's dereferenced arguments (the same as
-std::iter_swap
does), however if they are proxying iterators then takes special care over the swap to ensure that the algorithm works correctly for both proxying iterators, - and even iterators of different types (see iter_swap_example.cpp): + and even iterators of different types (see iter_swap_example.cpp):// ++// // iter_swap: // tests whether iterator is a proxying iterator or not, and // uses optimal form accordingly: @@ -44,7 +45,7 @@ namespace detail{ template <typename I> -static void do_swap(I one, I two, const boost::false_type&) +static void do_swap(I one, I two, const boost::false_type&) { typedef typename std::iterator_traits<I>::value_type v_t; v_t v = *one; @@ -52,7 +53,7 @@ *two = v; } template <typename I> -static void do_swap(I one, I two, const boost::true_type&) +static void do_swap(I one, I two, const boost::true_type&) { using std::swap; swap(*one, *two); @@ -70,10 +71,10 @@typedef typename std::iterator_traits<I1>::reference r1_t; typedef typename std::iterator_traits<I2>::reference r2_t; - typedef boost::integral_constant<bool, - ::boost::is_reference<r1_t>::value - && ::boost::is_reference<r2_t>::value - && ::boost::is_same<r1_t, r2_t>::value> truth_type; + typedef boost::integral_constant<bool, + ::boost::is_reference<r1_t>::value + && ::boost::is_reference<r2_t>::value + && ::boost::is_same<r1_t, r2_t>::value> truth_type; detail::do_swap(one, two, truth_type()); } diff --git a/doc/html/boost_typetraits/examples/to_double.html b/doc/html/boost_typetraits/examples/to_double.html index fa515ea..976d4a9 100644 --- a/doc/html/boost_typetraits/examples/to_double.html +++ b/doc/html/boost_typetraits/examples/to_double.html @@ -3,7 +3,7 @@Convert Numeric Types and Enums to double - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,14 +24,15 @@- Demonstrates a conversion of Numeric + Demonstrates a conversion of Numeric Types and enum types to double:
-template<class T> ++template<class T> inline double to_double(T const& value) { typedef typename boost::promote<T>::type promoted; diff --git a/doc/html/boost_typetraits/intrinsics.html b/doc/html/boost_typetraits/intrinsics.html index 8a27fdc..2ac02bc 100644 --- a/doc/html/boost_typetraits/intrinsics.html +++ b/doc/html/boost_typetraits/intrinsics.html @@ -3,7 +3,7 @@Support for Compiler Intrinsics - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,7 +24,7 @@There are some traits that can not be implemented within the current C++ language: @@ -38,16 +38,16 @@ for all types (but all have safe fallback positions if this support is unavailable):
-
- is_union
-- is_pod
-- has_trivial_constructor
-- has_trivial_copy
-- has_trivial_assign
-- has_trivial_destructor
-- has_nothrow_constructor
-- has_nothrow_copy
-- has_nothrow_assign
-- has_virtual_destructor
+- is_union
+- is_pod
+- has_trivial_constructor
+- has_trivial_copy
+- has_trivial_assign
+- has_trivial_destructor
+- has_nothrow_constructor
+- has_nothrow_copy
+- has_nothrow_assign
+- has_virtual_destructor
The following traits classes can't be portably implemented in the C++ language, @@ -55,23 +55,23 @@ all the compilers we know about:
The following traits classes are dependent on one or more of the above:
- The hooks for compiler-intrinsic support are defined in boost/type_traits/intrinsics.hpp, + The hooks for compiler-intrinsic support are defined in boost/type_traits/intrinsics.hpp, adding support for new compilers is simply a matter of defining one of more of the following macros:
-Table 1.4. Macros for Compiler Intrinsics
+Table 1.4. Macros for Compiler Intrinsics
diff --git a/doc/html/boost_typetraits/intro.html b/doc/html/boost_typetraits/intro.html index ba07a52..01a84d8 100644 --- a/doc/html/boost_typetraits/intro.html +++ b/doc/html/boost_typetraits/intro.html @@ -3,7 +3,7 @@ Introduction - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,7 +24,7 @@The Boost type-traits library contains a set of very specific traits classes, @@ -34,8 +34,8 @@
The type-traits classes share a unified design: each class inherits from a - the type true_type - if the type has the specified property and inherits from false_type + the type true_type + if the type has the specified property and inherits from false_type otherwise.
diff --git a/doc/html/boost_typetraits/mpl.html b/doc/html/boost_typetraits/mpl.html index 063944a..8338fdd 100644 --- a/doc/html/boost_typetraits/mpl.html +++ b/doc/html/boost_typetraits/mpl.html @@ -3,7 +3,7 @@
MPL Interoperability - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,22 +24,22 @@diff --git a/doc/html/boost_typetraits/reference.html b/doc/html/boost_typetraits/reference.html index 9638957..26d6dfe 100644 --- a/doc/html/boost_typetraits/reference.html +++ b/doc/html/boost_typetraits/reference.html @@ -3,7 +3,7 @@All the value based traits in this library conform to MPL's requirements for - an Integral + an Integral Constant type: that includes a number of rather intrusive workarounds for broken compilers.
- Purely as an implementation detail, this means that
true_type
- inherits fromboost::mpl::true_
, -false_type
- inherits fromboost::mpl::false_
, - andintegral_constant<T, + Purely as an implementation detail, this means that
true_type
+ inherits fromboost::mpl::true_
, +false_type
+ inherits fromboost::mpl::false_
, + andintegral_constant<T, v>
- inherits fromboost::mpl::integral_c<T,v>
+ inherits fromboost::mpl::integral_c<T,v>
(providedT
is notbool
)Alphabetical Reference - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,7 +24,7 @@
- add_const
diff --git a/doc/html/boost_typetraits/reference/add_const.html b/doc/html/boost_typetraits/reference/add_const.html index dd4bcd4..033e2c0 100644 --- a/doc/html/boost_typetraits/reference/add_const.html +++ b/doc/html/boost_typetraits/reference/add_const.html @@ -3,7 +3,7 @@add_const - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,9 +24,10 @@-template <class T> ++template <class T> struct add_const { typedefsee-below
type; @@ -44,7 +45,7 @@ does not support partial specialization of class-templates then this template will compile, but the membertype
will always be the same as typeT
- except where compiler + except where compiler workarounds have been applied.@@ -53,7 +54,7 @@ or
#include <boost/type_traits.hpp>
-Table 1.5. Examples
+Table 1.5. Examples
diff --git a/doc/html/boost_typetraits/reference/add_cv.html b/doc/html/boost_typetraits/reference/add_cv.html index 8fe48aa..f1c5667 100644 --- a/doc/html/boost_typetraits/reference/add_cv.html +++ b/doc/html/boost_typetraits/reference/add_cv.html @@ -3,7 +3,7 @@ add_cv - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,9 +24,10 @@-template <class T> ++template <class T> struct add_cv { typedefsee-below
type; @@ -45,7 +46,7 @@ does not support partial specialization of class-templates then this template will compile, but the membertype
will always be the same as typeT
- except where compiler + except where compiler workarounds have been applied.@@ -54,7 +55,7 @@ or
#include <boost/type_traits.hpp>
-Table 1.6. Examples
+Table 1.6. Examples
diff --git a/doc/html/boost_typetraits/reference/add_pointer.html b/doc/html/boost_typetraits/reference/add_pointer.html index c4e9c66..d17fb2b 100644 --- a/doc/html/boost_typetraits/reference/add_pointer.html +++ b/doc/html/boost_typetraits/reference/add_pointer.html @@ -3,7 +3,7 @@ add_pointer - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,9 +24,10 @@-template <class T> ++template <class T> struct add_pointer { typedefsee-below
type; @@ -47,7 +48,7 @@ does not support partial specialization of class-templates then this template will compile, but the membertype
will always be the same as typeT
- except where compiler + except where compiler workarounds have been applied.@@ -56,7 +57,7 @@ or
#include <boost/type_traits.hpp>
-Table 1.7. Examples
+Table 1.7. Examples
diff --git a/doc/html/boost_typetraits/reference/add_reference.html b/doc/html/boost_typetraits/reference/add_reference.html index b14b4e4..63f7027 100644 --- a/doc/html/boost_typetraits/reference/add_reference.html +++ b/doc/html/boost_typetraits/reference/add_reference.html @@ -3,7 +3,7 @@ add_reference - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,9 +24,10 @@-template <class T> ++template <class T> struct add_reference { typedefsee-below
type; @@ -44,7 +45,7 @@ does not support partial specialization of class-templates then this template will compile, but the membertype
will always be the same as typeT
- except where compiler + except where compiler workarounds have been applied.@@ -53,7 +54,7 @@ or
#include <boost/type_traits.hpp>
-Table 1.8. Examples
+Table 1.8. Examples
diff --git a/doc/html/boost_typetraits/reference/add_volatile.html b/doc/html/boost_typetraits/reference/add_volatile.html index 15e8d78..63f57b7 100644 --- a/doc/html/boost_typetraits/reference/add_volatile.html +++ b/doc/html/boost_typetraits/reference/add_volatile.html @@ -3,7 +3,7 @@ add_volatile - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,9 +24,10 @@-template <class T> ++template <class T> struct add_volatile { typedefsee-below
type; @@ -44,7 +45,7 @@ does not support partial specialization of class-templates then this template will compile, but the membertype
will always be the same as typeT
- except where compiler + except where compiler workarounds have been applied.@@ -53,7 +54,7 @@ or
#include <boost/type_traits.hpp>
-Table 1.9. Examples
+Table 1.9. Examples
diff --git a/doc/html/boost_typetraits/reference/aligned_storage.html b/doc/html/boost_typetraits/reference/aligned_storage.html index 286cde6..4ad8c7c 100644 --- a/doc/html/boost_typetraits/reference/aligned_storage.html +++ b/doc/html/boost_typetraits/reference/aligned_storage.html @@ -3,7 +3,7 @@ aligned_storage - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,9 +24,10 @@-template <std::size_t Size, std::size_t Align> ++template <std::size_t Size, std::size_t Align> struct aligned_storage { typedefsee-below
type; diff --git a/doc/html/boost_typetraits/reference/alignment_of.html b/doc/html/boost_typetraits/reference/alignment_of.html index 1b364b6..c79cca8 100644 --- a/doc/html/boost_typetraits/reference/alignment_of.html +++ b/doc/html/boost_typetraits/reference/alignment_of.html @@ -3,7 +3,7 @@alignment_of - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,10 +24,11 @@-template <class T> -struct alignment_of : public integral_constant<std::size_t, ALIGNOF(T)> {}; ++template <class T> +struct alignment_of : public integral_constant<std::size_t, ALIGNOF(T)> {};Inherits: Class template alignmentof inherits from `_integral_constant<std::size_t, @@ -52,7 +53,7 @@
alignment_of<int>
- inherits fromintegral_constant<std::size_t, ALIGNOF(int)>
. + inherits fromintegral_constant<std::size_t, ALIGNOF(int)>
.@@ -61,7 +62,7 @@
-
alignment_of<char>::type
is the typeintegral_constant<std::size_t, ALIGNOF(char)>
. +alignment_of<char>::type
is the typeintegral_constant<std::size_t, ALIGNOF(char)>
.diff --git a/doc/html/boost_typetraits/reference/decay.html b/doc/html/boost_typetraits/reference/decay.html index d59b743..149f124 100644 --- a/doc/html/boost_typetraits/reference/decay.html +++ b/doc/html/boost_typetraits/reference/decay.html @@ -3,7 +3,7 @@
decay - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,9 +24,10 @@-template <class T> ++template <class T> struct decay { typedefsee-below
type; @@ -48,7 +49,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 5680d42..310fb41 100644 --- a/doc/html/boost_typetraits/reference/extent.html +++ b/doc/html/boost_typetraits/reference/extent.html @@ -3,7 +3,7 @@ extent - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,21 +24,22 @@-template <class T, std::size_t N = 0> -struct extent : public integral_constant<std::size_t, EXTENT(T,N)> {}; ++template <class T, std::size_t N = 0> +struct extent : public integral_constant<std::size_t, EXTENT(T,N)> {};Inherits: Class template extent inherits - from
integral_constant<std::size_t, EXTENT(T,N)>
, + fromintegral_constant<std::size_t, EXTENT(T,N)>
, whereEXTENT(T,N)
is the number of elements in the N'th array dimention of typeT
.If
T
is not an array type, or ifN > - rank<T>::value
, or if the N'th array bound is incomplete, + rank<T>::value, or if the N'th array bound is incomplete, thenEXTENT(T,N)
is zero.@@ -53,7 +54,7 @@
-
extent<int[1]>
inherits fromintegral_constant<std::size_t, 1>
. +extent<int[1]>
inherits fromintegral_constant<std::size_t, 1>
.@@ -63,7 +64,7 @@
extent<double[2][3][4], - 1>::type
is the typeintegral_constant<std::size_t, 3>
. + 1>::type is the typeintegral_constant<std::size_t, 3>
.diff --git a/doc/html/boost_typetraits/reference/floating_point_promotion.html b/doc/html/boost_typetraits/reference/floating_point_promotion.html index 58dd94f..6637972 100644 --- a/doc/html/boost_typetraits/reference/floating_point_promotion.html +++ b/doc/html/boost_typetraits/reference/floating_point_promotion.html @@ -3,7 +3,7 @@
floating_point_promotion - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,10 +24,11 @@-template <class T> ++template <class T> struct floating_point_promotion { typedefsee-below
type; @@ -49,7 +50,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 d05e611..a343b6d 100644 --- a/doc/html/boost_typetraits/reference/function_traits.html +++ b/doc/html/boost_typetraits/reference/function_traits.html @@ -3,7 +3,7 @@ function_traits - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,9 +24,10 @@-template <class T> ++template <class T> struct function_traits { static const std::size_t arity =see-below
; @@ -55,11 +56,11 @@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.13. Examples
+Table 1.13. Examples
diff --git a/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html b/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html index 5fc5eee..669d9d1 100644 --- a/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html +++ b/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html @@ -3,7 +3,7 @@ has_nothrow_default_constructor - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,10 +24,10 @@- See has_nothrow_constructor. + See has_nothrow_constructor.
diff --git a/doc/html/boost_typetraits/reference/has_nothrow_assign.html b/doc/html/boost_typetraits/reference/has_nothrow_assign.html index 838e62b..56de2ff 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_assign.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_assign.html @@ -3,7 +3,7 @@ has_nothrow_assign - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,15 +24,16 @@-template <class T> -struct has_nothrow_assign : publictrue_type-or-false_type
{}; ++template <class T> +struct has_nothrow_assign : publictrue_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
diff --git a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html index 7762bb1..26f3c17 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html @@ -3,7 +3,7 @@T
must be a complete type.has_nothrow_constructor - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,19 +24,20 @@-template <class T> -struct has_nothrow_constructor : publictrue_type-or-false_type
{}; ++template <class T> +struct has_nothrow_constructor : publictrue_type-or-false_type
{}; template <class T> -struct has_nothrow_default_constructor : publictrue_type-or-false_type
{}; +struct has_nothrow_default_constructor : publictrue_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
@@ -52,7 +53,7 @@ Without some (as yet unspecified) help from the compiler,T
must be a complete type.has_nothrow_constructor
will never report that a class or struct has a non-throwing default-constructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual - C++ 8 has the necessary compiler intrinsics + C++ 8 has the necessary compiler intrinsics to ensure that this trait "just works".diff --git a/doc/html/boost_typetraits/reference/has_nothrow_copy.html b/doc/html/boost_typetraits/reference/has_nothrow_copy.html index 3e8046c..56a9b5f 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_copy.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_copy.html @@ -3,7 +3,7 @@
has_nothrow_copy - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,18 +24,19 @@-template <class T> -struct has_nothrow_copy : publictrue_type-or-false_type
{}; ++template <class T> +struct has_nothrow_copy : publictrue_type-or-false_type
{}; template <class T> -struct has_nothrow_copy_constructor : publictrue_type-or-false_type
{}; +struct has_nothrow_copy_constructor : publictrue_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
@@ -51,7 +52,7 @@ Without some (as yet unspecified) help from the compiler,T
must be a complete type.has_nothrow_copy
will never report that a class or struct has a non-throwing copy-constructor; this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual - C++ 8 has the necessary compiler intrinsics + C++ 8 has the necessary compiler intrinsics to ensure that this trait "just works".diff --git a/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html b/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html index 501c597..0625fed 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html @@ -3,7 +3,7 @@
has_nothrow_copy_constructor - + @@ -12,7 +12,7 @@
- Home +Home Libraries People FAQ @@ -24,10 +24,10 @@