From 3d325c73334d9dc9656e2405d9de515a483ea677 Mon Sep 17 00:00:00 2001 From: nobody Date: Wed, 12 Mar 2003 13:29:13 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'RC_1_30_0'. [SVN r17837] --- doc/ref/Integral_constant_classes.html | 19 ++++++++ doc/ref/Metafunction_Class.html | 67 ++++++++++++++++++++++++++ doc/ref/Reference/and.html | 62 ++++++++++++++++++++++++ doc/ref/Reference/deref.html | 56 +++++++++++++++++++++ doc/ref/Reference/joint_view.html | 61 +++++++++++++++++++++++ doc/ref/Reference/max_element.html | 62 ++++++++++++++++++++++++ doc/ref/Reference/min_element.html | 62 ++++++++++++++++++++++++ doc/ref/Reference/not.html | 51 ++++++++++++++++++++ doc/ref/Reference/or.html | 62 ++++++++++++++++++++++++ doc/ref/Reference/single_view.html | 62 ++++++++++++++++++++++++ doc/ref/Reference/zip_view.html | 66 +++++++++++++++++++++++++ doc/ref/Table_of_Contents.html | 15 ++++++ 12 files changed, 645 insertions(+) create mode 100644 doc/ref/Integral_constant_classes.html create mode 100644 doc/ref/Metafunction_Class.html create mode 100644 doc/ref/Reference/and.html create mode 100644 doc/ref/Reference/deref.html create mode 100644 doc/ref/Reference/joint_view.html create mode 100644 doc/ref/Reference/max_element.html create mode 100644 doc/ref/Reference/min_element.html create mode 100644 doc/ref/Reference/not.html create mode 100644 doc/ref/Reference/or.html create mode 100644 doc/ref/Reference/single_view.html create mode 100644 doc/ref/Reference/zip_view.html create mode 100644 doc/ref/Table_of_Contents.html diff --git a/doc/ref/Integral_constant_classes.html b/doc/ref/Integral_constant_classes.html new file mode 100644 index 0000000..fdc082b --- /dev/null +++ b/doc/ref/Integral_constant_classes.html @@ -0,0 +1,19 @@ + +boost::mpl::Integral constant classes + + +

[Home]Integral constant classes

Concepts

+ +

+

Types

+ +


+Table of Contents
Last edited March 10, 2003 1:34 am \ No newline at end of file diff --git a/doc/ref/Metafunction_Class.html b/doc/ref/Metafunction_Class.html new file mode 100644 index 0000000..b06ef4a --- /dev/null +++ b/doc/ref/Metafunction_Class.html @@ -0,0 +1,67 @@ + +boost::mpl::Metafunction Class + + +

[Home]Metafunction Class

Description

+

+A metafunction class is a certain form of metafunction representation that enables higher-order metaprogramming. In particular, a non-nullary metafunction class is a type with a nested class template member apply. A nullary metafunction class has the form of a nullary metafunction. A metafunction class invocation is defined as invocation of its nested apply metafunction. +

+

Valid expressions

+

+ + + + +
 Expression  Expression type  
typename f::typeA type
typename f::template apply<a1,..,an>::typeA type
+

+

Expression semantics

+

+ + + + +
 Expression  Complexity  Precondition  Semantics  Postcondition 
typename f::typeunspecifiedf is a nullary metafunction class; f::type is a type-namef::type is the result of the metafunction class invocation
typename f::template apply<a1,..,an>::typeunspecifiedf is an n-ary metafunction class; apply is a metafunctiontypename f::template apply<a1,..,an>::type is the result of the metafunction class invocation with the actual arguments a1,..,an
+

+

+

Example

+

+

+// nullary metafunction class
+struct always_true { typedef true_ type; };
+

+template< long N > struct le +{ + template< typename M > struct apply + { + typedef bool_< (M::value < N) > type; + }; +}; +

+// unary metafunction class +typedef le<5> less_than_5; +

+// binary metafunction class +struct less_than +{ + template< typename N1, typename N2 > struct apply + { + typedef bool_< (N1::value < N2::value) > type; + }; +}; +

+// invocations +typedef always_true::type t1; +typedef less_than_5::apply< int_<7> >::type t2; +typedef less_than::apply< int_<5>,int_<7> >::type t3; +

+// results checks +BOOST_STATIC_ASSERT(t1::value); +BOOST_STATIC_ASSERT(!t2::value); +BOOST_STATIC_ASSERT(t3::value); +

+

+

See also

+

+Metafunctions, Metafunction +


+Table of Contents
Last edited March 10, 2003 4:16 am \ No newline at end of file diff --git a/doc/ref/Reference/and.html b/doc/ref/Reference/and.html new file mode 100644 index 0000000..c407989 --- /dev/null +++ b/doc/ref/Reference/and.html @@ -0,0 +1,62 @@ + +boost::mpl::and_ + + +

[Home]and_

Synopsis

+

+

+template< 
+      typename F1
+    , typename F2
+    , typename F3 = true_
+    ...
+    , typename Fn = true_
+    >
+struct and_
+{
+    typedef unspecified type;
+};
+
+

+

Description

+

+Returns the result of short-circuit logical and (&&) operation on its arguments. +

+

Definition

+

+

+#include "boost/mpl/and.hpp"
+
+

+

Parameters

+ + + +
 Parameter  Requirement  Description  
F1, F2, .., FnA model of nullary Metafunction
+

+

Expression semantics

+

+ + + +
 Expression  Expression type  Precondition  Semantics  Postcondition 
typedef and_<f1,f2,..,fn>::type c;A model of bool Integral ConstantReturns false_ if either of f1::type::value, f2::type::value, .., fn::type::value expressions evaluates to false, and true_ otherwise; guarantees left-to-right evaluation; moreover, the operands subsequent to the first fi metafunction that evaluates to false are not evaluated.
+

+

Example

+

+

+// will generate compile-time error if invoked with T == any fundamental type
+template< typename T > struct fail
+{
+   typedef typename T::nonexistent type;
+};
+

+BOOST_STATIC_ASSERT((and_< true_,false_ >::type::value == false)); +BOOST_STATIC_ASSERT((and_< false_,fail<int> >::type::value == false)); // OK, fail<int> is never invoked +BOOST_STATIC_ASSERT((and_< true_,false_,fail<int> >::type::value == false)); // OK too +

+

+

See also

+

+Metafunctions, or_, not_ +


+Table of Contents
Last edited March 10, 2003 1:21 am \ No newline at end of file diff --git a/doc/ref/Reference/deref.html b/doc/ref/Reference/deref.html new file mode 100644 index 0000000..4709b0f --- /dev/null +++ b/doc/ref/Reference/deref.html @@ -0,0 +1,56 @@ + +boost::mpl::deref + + +

[Home]deref

Synopsis

+

+

+template<
+      typename Iterator
+    >
+struct deref
+{
+    typedef typename Iterator::type type;
+};
+
+

+

Description

+

+Dereferences an iterator. +

+

Definition

+

+

+#include "boost/mpl/deref.hpp"
+
+

+

Parameters

+ + + +
 Parameter  Requirement  Description  
IteratorA model of Trivial IteratorAn iterator to be dereferenced.
+

+

Expression semantics

+

+ + + +
 Expression  Expression type  Precondition  Semantics  Postcondition 
typedef deref<Iterator>::type t;A typeEquivalent to typedef Iterator::type t;.Iterator is dereferenceable
+

+

Complexity

+

+Amortized constant time. +

+

Example

+

+

+typedef list<char,short,int,long> types;
+typedef begin<types>::type iter;
+BOOST_STATIC_ASSERT(boost::is_same< deref<iter>::type,char >::value));
+
+

+

See also

+

+Iterators, begin/end +


+Table of Contents
Last edited March 10, 2003 5:30 am \ No newline at end of file diff --git a/doc/ref/Reference/joint_view.html b/doc/ref/Reference/joint_view.html new file mode 100644 index 0000000..48f66fd --- /dev/null +++ b/doc/ref/Reference/joint_view.html @@ -0,0 +1,61 @@ + +boost::mpl::joint_view + + +

[Home]joint_view

Synopsis

+

+

+template<
+      typename Sequence1
+    , typename Sequence2
+    >
+struct joint_view
+{
+    // unspecified
+};
+
+

+

Description

+

+joint_view is a two-sequence view that allows one to operate on a sequence of concatenated elements of sequences Sequence1 and Sequence2 without actually creating one. +

+

Definition

+

+

+#include "boost/mpl/joint_view.hpp"
+
+

+

Parameters

+ + + +
 Parameter  Requirement  Description  
Sequence1, Sequence2A model of SequenceSequences to concatenate.
+

+

Expression semantics

+

+ + + +
 Expression  Expression type  Precondition  Semantics  Postcondition 
typedef joint_view<Sequence1,Sequence2> s;A model of Sequences prodives iterators to all the elements in the ranges [begin<Sequence1>::type,end<Sequence1>::type), [begin<Sequence2>::type,end<Sequence2>::type).size<s>::type::value == size< Sequence1 >::type::value + size< Sequence2 >::type::value.
+

+

Complexity

+

+Amortized constant time. +

+

Example

+

+

+typedef joint_view<
+      range_c<int,0,10>
+    , range_c<int,10,15>
+    > numbers;
+

+typedef range_c<int,0,15> answer; +BOOST_STATIC_ASSERT((equal<numbers,answer>::type::value)); +

+

+

See also

+

+Sequences, transform_view, filter_view, zip_view +


+Table of Contents
Last edited March 10, 2003 5:42 am \ No newline at end of file diff --git a/doc/ref/Reference/max_element.html b/doc/ref/Reference/max_element.html new file mode 100644 index 0000000..3ff39c4 --- /dev/null +++ b/doc/ref/Reference/max_element.html @@ -0,0 +1,62 @@ + +boost::mpl::max_element + + +

[Home]max_element

Synopsis

+

+

+template<
+      typename Sequence
+    , typename Pred = less<_1,_2>
+    >
+struct max_element
+{
+    typedef unspecified type;
+};
+
+

+

Description

+

+Finds the largest element in the Sequence. +

+

Definition

+

+

+#include "boost/mpl/max_element.hpp"
+
+

+

Parameters

+ + + + +
 Parameter  Requirement  Description  
SequenceA model of Forward SequenceA sequence to be searched.
PredA model of binary Predicate [Lambda Expression]A comparison criteria.
+

+

Expression semantics

+

+ + + +
 Expression  Expression type  Precondition  Semantics  Postcondition 
typedef max_element< Sequence,Pred >::type i;A model of Forward Iteratori is the first iterator in [begin<Sequence>::type, end<Sequence>::type) such that for every iterator j in [begin<Sequence>::type, end<Sequence>::type), apply< lambda<Pred>::type, i::type, j::type >::type::value == false.
+

+

Complexity

+

+Linear. Zero comparisons if Sequence is empty, otherwise exactly size<Sequence>::value - 1 comparisons. +

+

Example

+

+

+typedef vector<int,char[50],long,double> types;
+typedef max_element<
+      transform_view< types,sizeof_<_1> >
+    >::type iter;
+

+BOOST_STATIC_ASSERT((distance< begin<types>::type,iter >::type::value == 1)); +BOOST_STATIC_ASSERT(sizeof(deref<iter>::type) == 50); +

+

+

See also

+

+Algorithms, min_element, upper_bound, lower_bound +


+Table of Contents
Last edited March 10, 2003 6:01 am \ No newline at end of file diff --git a/doc/ref/Reference/min_element.html b/doc/ref/Reference/min_element.html new file mode 100644 index 0000000..466fa70 --- /dev/null +++ b/doc/ref/Reference/min_element.html @@ -0,0 +1,62 @@ + +boost::mpl::min_element + + +

[Home]min_element

Synopsis

+

+

+template<
+      typename Sequence
+    , typename Pred = less<_1,_2>
+    >
+struct min_element
+{
+    typedef unspecified type;
+};
+
+

+

Description

+

+Finds the smallest element in the Sequence. +

+

Definition

+

+

+#include "boost/mpl/min_element.hpp"
+
+

+

Parameters

+ + + + +
 Parameter  Requirement  Description  
SequenceA model of Forward SequenceA sequence to be searched.
PredA model of binary Predicate [Lambda Expression]A comparison criteria.
+

+

Expression semantics

+

+ + + +
 Expression  Expression type  Precondition  Semantics  Postcondition 
typedef min_element< Sequence,Pred >::type i;A model of Forward Iteratori is the first iterator in [begin<Sequence>::type, end<Sequence>::type) such that for every iterator j in [begin<Sequence>::type, end<Sequence>::type), apply< lambda<Pred>::type, j::type, i::type >::type::value == false.
+

+

Complexity

+

+Linear. Zero comparisons if Sequence is empty, otherwise exactly size<Sequence>::value - 1 comparisons. +

+

Example

+

+

+typedef vector<bool,char[50],long,double> types;
+typedef min_element<
+      transform_view< types,sizeof_<_1> >
+    >::type iter;
+

+BOOST_STATIC_ASSERT((distance< begin<types>::type,iter >::type::value == 0)); +BOOST_STATIC_ASSERT(sizeof(deref<iter>::type) == sizeof(bool)); +

+

+

See also

+

+Algorithms, max_element, upper_bound, lower_bound +


+Table of Contents
Last edited March 10, 2003 6:05 am \ No newline at end of file diff --git a/doc/ref/Reference/not.html b/doc/ref/Reference/not.html new file mode 100644 index 0000000..f16ccbf --- /dev/null +++ b/doc/ref/Reference/not.html @@ -0,0 +1,51 @@ + +boost::mpl::not_ + + +

[Home]not_

Synopsis

+

+

+template< 
+      typename F
+    >
+struct not_
+{
+    typedef unspecified type;
+};
+
+

+

Description

+

+Returns the result of logical not (!) operation on its argument. +

+

Definition

+

+

+#include "boost/mpl/not.hpp"
+
+

+

Parameters

+ + + +
 Parameter  Requirement  Description  
FA model of nullary Metafunction
+

+

Expression semantics

+

+ + + +
 Expression  Expression type  Precondition  Semantics  Postcondition 
typedef not_<f>::type c;A model of bool Integral ConstantEquivalent to typedef bool_<(!f::type::value)> c;
+

+

Example

+

+

+BOOST_STATIC_ASSERT(not_<true_>::type::value == false);
+BOOST_STATIC_ASSERT(not_<false_>::type::value == true);
+
+

+

See also

+

+Metafunctions, and_, or_ +


+Table of Contents
Last edited March 10, 2003 1:19 am \ No newline at end of file diff --git a/doc/ref/Reference/or.html b/doc/ref/Reference/or.html new file mode 100644 index 0000000..1cdfc1e --- /dev/null +++ b/doc/ref/Reference/or.html @@ -0,0 +1,62 @@ + +boost::mpl::or_ + + +

[Home]or_

Synopsis

+

+

+template< 
+      typename F1
+    , typename F2
+    , typename F3 = false_
+    ...
+    , typename Fn = false_
+    >
+struct or_
+{
+    typedef unspecified type;
+};
+
+

+

Description

+

+Returns the result of short-circuit logical or (||) operation on its arguments. +

+

Definition

+

+

+#include "boost/mpl/or.hpp"
+
+

+

Parameters

+ + + +
 Parameter  Requirement  Description  
F1, F2, .., FnA model of nullary Metafunction
+

+

Expression semantics

+

+ + + +
 Expression  Expression type  Precondition  Semantics  Postcondition 
typedef or_<f1,f2,..,fn>::type c;A model of bool Integral ConstantReturns true_ if either of f1::type::value, f2::type::value, .., fn::type::value expressions evaluates to true, and false_ otherwise; guarantees left-to-right evaluation; moreover, the operands subsequent to the first fi metafunction that evaluates to true are not evaluated.
+

+

Example

+

+

+// will generate compile-time error if invoked with T == any fundamental type
+template< typename T > struct fail
+{
+   typedef typename T::nonexistent type;
+};
+

+BOOST_STATIC_ASSERT((or_< false_,true_ >::type::value == true)); +BOOST_STATIC_ASSERT((or_< true_,fail<int> >::type::value == true)); // OK, fail<int> is never invoked +BOOST_STATIC_ASSERT((or_< false_,true_,fail<int> >::type::value == true)); // OK too +

+

+

See also

+

+Metafunctions, and_, not_ +


+Table of Contents
Last edited March 10, 2003 1:18 am \ No newline at end of file diff --git a/doc/ref/Reference/single_view.html b/doc/ref/Reference/single_view.html new file mode 100644 index 0000000..f859110 --- /dev/null +++ b/doc/ref/Reference/single_view.html @@ -0,0 +1,62 @@ + +boost::mpl::single_view + + +

[Home]single_view

Synopsis

+

+

+template<
+      typename T
+    >
+struct single_view
+{
+    // unspecified
+};
+
+

+

Description

+

+Allows one to represent an arbitrary type T as a single-element sequence. +

+

Definition

+

+

+#include "boost/mpl/single_view.hpp"
+
+

+

Parameters

+ + + +
 Parameter  Requirement  Description  
TA typeThe type to be wrapped in a sequence.
+

+

Expression semantics

+

+ + + +
 Expression  Expression type  Precondition  Semantics  Postcondition 
typedef single_view<T> s;A model of Sequences is a random-access, single-element sequence such as front<s>::type is identical to Tsize<s>::type::value == 1, boost::same_as<front<s>::type,T>::value == true.
+

+

Complexity

+

+Amortized constant time. +

+

Example

+

+

+typedef single_view<int> view;
+typedef begin<view>::type first;
+typedef end<view>::type last;
+

+BOOST_MPL_ASSERT_IS_SAME(first::type,int); +BOOST_MPL_ASSERT_IS_SAME(first::next,last); +BOOST_MPL_ASSERT_IS_SAME(last::prior,first); +

+BOOST_STATIC_ASSERT(size<view>::type::value == 1); +

+

+

See also

+

+Sequences, transform_view, filter_view, joint_view, zip_view +


+Table of Contents
Last edited March 10, 2003 5:19 am \ No newline at end of file diff --git a/doc/ref/Reference/zip_view.html b/doc/ref/Reference/zip_view.html new file mode 100644 index 0000000..bf15463 --- /dev/null +++ b/doc/ref/Reference/zip_view.html @@ -0,0 +1,66 @@ + +boost::mpl::zip_view + + +

[Home]zip_view

Synopsis

+

+

+template<
+      typename Sequences
+    >
+struct zip_view
+{
+    // unspecified
+};
+
+

+

Description

+

+zip_view provides a "zipped" view onto several sequences; that is, it allows to represent several sequences as a single sequence of elements each of those, in its turn, is a sequence of the corresponding Sequences elements. +

+

Definition

+

+

+#include "boost/mpl/zip_view.hpp"
+
+

+

Parameters

+ + + +
 Parameter  Requirement  Description  
SequencesA Sequence of SequencesSequences to be "zipped".
+

+

Expression semantics

+

+ + + +
 Expression  Expression type  Precondition  Semantics  Postcondition 
typedef zip_view<Sequences> s;A model of Sequences is a sequence such that for each i in [begin<s>::type, end<s>::type) and for each j in [begin<Sequences>::type, end<Sequences>::type) i::type is identical to transform<j::type, deref<_1> >::type .
+

+

Complexity

+

+Amortized constant time. +

+

Example

+

+

+typedef range_c<int,0,10> s1;
+typedef range_c<int,10,20> s2;
+

+typedef transform_view< + zip_view< list<s1,s2> > + , apply_seq< plus<_1,_2> > + > result; +

+BOOST_STATIC_ASSERT((equal< + result + , filter_view< range_c<int,10,30>, math::is_even<_1> > + , equal_to<_1,_2> + >::type::value)); +

+

+

See also

+

+Sequences, transform_view, filter_view, joint_view, equal +


+Table of Contents
Last edited March 10, 2003 5:04 am \ No newline at end of file diff --git a/doc/ref/Table_of_Contents.html b/doc/ref/Table_of_Contents.html new file mode 100644 index 0000000..0bf95ab --- /dev/null +++ b/doc/ref/Table_of_Contents.html @@ -0,0 +1,15 @@ + +boost::mpl::Table of Contents + + +

[Home]Table of Contents

    +
  1. Sequences +
  2. Iterators +
  3. Algorithms +
  4. Metafunctions +
  5. Integral constant classes +
  6. Categorized index +
  7. Acknowledgements +
+


+Table of Contents
Last edited March 10, 2003 1:32 am \ No newline at end of file