Wrong version. Should be 2.2 + fixed copyright notices and dates

[SVN r74886]
This commit is contained in:
Joel de Guzman
2011-10-10 10:37:53 +00:00
parent 24bca52c5e
commit fd82b51cec
19 changed files with 125 additions and 101 deletions

View File

@ -1,5 +1,6 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2001-2011 Joel de Guzman
Copyright (C) 2006 Dan Marsden
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,5 +1,6 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2001-2011 Joel de Guzman
Copyright (C) 2006 Dan Marsden
Copyright (C) 2010 Christopher Schmidt Copyright (C) 2010 Christopher Schmidt
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
@ -243,7 +244,7 @@ __random_access_sequence__.
[heading Semantics] [heading Semantics]
The above macro generates the necessary code to adapt `struct_name` or an The above macro generates the necessary code to adapt `struct_name` or an
arbitrary specialization of `struct_name` as a model of arbitrary specialization of `struct_name` as a model of
__random_access_sequence__. __random_access_sequence__.
The sequence `(template_param0)(template_param1)...` declares the names of The sequence `(template_param0)(template_param1)...` declares the names of
@ -286,9 +287,9 @@ namespace qualified name of the struct to be adapted.
[section:adapt_struct_named BOOST_FUSION_ADAPT_STRUCT_NAMED] [section:adapt_struct_named BOOST_FUSION_ADAPT_STRUCT_NAMED]
[heading Description] [heading Description]
BOOST_FUSION_ADAPT_STRUCT_NAMED and BOOST_FUSION_ADAPT_STRUCT_NAMED_NS are BOOST_FUSION_ADAPT_STRUCT_NAMED and BOOST_FUSION_ADAPT_STRUCT_NAMED_NS are
macros that can be used to generate all the necessary boilerplate to make an macros that can be used to generate all the necessary boilerplate to make an
arbitrary struct a model of __random_access_sequence__. The given struct is arbitrary struct a model of __random_access_sequence__. The given struct is
adapted using the given name. adapted using the given name.
[heading Synopsis] [heading Synopsis]
@ -311,7 +312,7 @@ adapted using the given name.
[heading Semantics] [heading Semantics]
The above macros generate the necessary code to adapt `struct_name` The above macros generate the necessary code to adapt `struct_name`
as a model of __random_access_sequence__ while using `adapted_name` as the as a model of __random_access_sequence__ while using `adapted_name` as the
name of the adapted struct. name of the adapted struct.
The sequence `(namespace0)(namespace1)...` declares the namespace The sequence `(namespace0)(namespace1)...` declares the namespace
for `adapted_name`. It yields to a fully qualified name for `adapted_name` of for `adapted_name`. It yields to a fully qualified name for `adapted_name` of
@ -426,7 +427,7 @@ __random_access_sequence__ and __associative_sequence__.
[heading Semantics] [heading Semantics]
The above macro generates the necessary code to adapt `struct_name` or an The above macro generates the necessary code to adapt `struct_name` or an
arbitrary specialization of `struct_name` as a model of arbitrary specialization of `struct_name` as a model of
__random_access_sequence__ and __associative_sequence__. __random_access_sequence__ and __associative_sequence__.
The sequence `(template_param0)(template_param1)...` declares the names of The sequence `(template_param0)(template_param1)...` declares the names of
@ -462,7 +463,7 @@ namespace qualified name of the struct to be adapted.
struct name; struct name;
struct age; struct age;
} }
// Any instantiated demo::employee is now a Fusion sequence. // Any instantiated demo::employee is now a Fusion sequence.
// It is also an associative sequence with // It is also an associative sequence with
// keys keys::name and keys::age present. // keys keys::name and keys::age present.
@ -477,8 +478,8 @@ namespace qualified name of the struct to be adapted.
[section:adapt_assoc_struct_named BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED] [section:adapt_assoc_struct_named BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED]
[heading Description] [heading Description]
BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED and BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_NS are BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED and BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_NS are
macros that can be used to generate all the necessary boilerplate to make an macros that can be used to generate all the necessary boilerplate to make an
arbitrary struct a model of __random_access_sequence__ and arbitrary struct a model of __random_access_sequence__ and
__associative_sequence__. The given struct is adapted using the given name. __associative_sequence__. The given struct is adapted using the given name.
@ -538,7 +539,7 @@ namespace qualified name of the struct to be converted.
struct name; struct name;
struct age; struct age;
} }
// boost::fusion::adapted::adapted_employee is now a Fusion sequence // boost::fusion::adapted::adapted_employee is now a Fusion sequence
// referring to demo::employee // referring to demo::employee
BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED( BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED(
@ -566,7 +567,7 @@ __random_access_sequence__.
[heading Expression Semantics] [heading Expression Semantics]
The above macro generates the necessary code to adapt `type_name` The above macro generates the necessary code to adapt `type_name`
as a model of __random_access_sequence__. as a model of __random_access_sequence__.
The sequence of The sequence of
[^(attribute_type['N], attribute_const_type['N], get_expr['N], set_expr['N])] [^(attribute_type['N], attribute_const_type['N], get_expr['N], set_expr['N])]
quadruples declares the types, const types, get-expressions and set-expressions quadruples declares the types, const types, get-expressions and set-expressions
@ -599,7 +600,7 @@ namespace qualified name of the class type to be adapted.
#include <boost/fusion/adapted/adt/adapt_adt.hpp> #include <boost/fusion/adapted/adt/adapt_adt.hpp>
#include <boost/fusion/include/adapt_adt.hpp> #include <boost/fusion/include/adapt_adt.hpp>
[heading Example] [heading Example]
namespace demo namespace demo
{ {
@ -608,41 +609,41 @@ namespace qualified name of the class type to be adapted.
private: private:
std::string name; std::string name;
int age; int age;
public: public:
void set_name(std::string const& n) void set_name(std::string const& n)
{ {
name=n; name=n;
} }
void set_age(int a) void set_age(int a)
{ {
age=a; age=a;
} }
std::string const& get_name()const std::string const& get_name()const
{ {
return name; return name;
} }
int get_age()const int get_age()const
{ {
return age; return age;
} }
}; };
} }
BOOST_FUSION_ADAPT_ADT( BOOST_FUSION_ADAPT_ADT(
demo::employee, demo::employee,
(std::string const&, std::string const&, obj.get_name(), obj.set_name(val)) (std::string const&, std::string const&, obj.get_name(), obj.set_name(val))
(int, int, obj.get_age(), obj.set_age(val))) (int, int, obj.get_age(), obj.set_age(val)))
demo::employee e; demo::employee e;
front(e)="Edward Norton"; front(e)="Edward Norton";
back(e)=41; back(e)=41;
//Prints 'Edward Norton is 41 years old' //Prints 'Edward Norton is 41 years old'
std::cout << e.get_name() << " is " << e.get_age() << " years old" << std::endl; std::cout << e.get_name() << " is " << e.get_age() << " years old" << std::endl;
[heading See also] [heading See also]
__adt_attribute_proxy__ __adt_attribute_proxy__
@ -669,7 +670,7 @@ __random_access_sequence__.
The above macro generates the necessary code to adapt `type_name` The above macro generates the necessary code to adapt `type_name`
or an arbitrary specialization of `type_name` or an arbitrary specialization of `type_name`
as a model of __random_access_sequence__. as a model of __random_access_sequence__.
The sequence `(template_param0)(template_param1)...` declares the names of The sequence `(template_param0)(template_param1)...` declares the names of
the template type parameters used. the template type parameters used.
The sequence `(specialization_param0)(specialization_param1)...` The sequence `(specialization_param0)(specialization_param1)...`
@ -707,40 +708,40 @@ namespace qualified name of the template class type to be adapted.
#include <boost/fusion/adapted/adt/adapt_adt.hpp> #include <boost/fusion/adapted/adt/adapt_adt.hpp>
#include <boost/fusion/include/adapt_adt.hpp> #include <boost/fusion/include/adapt_adt.hpp>
[heading Example] [heading Example]
namespace demo namespace demo
{ {
template<typename Name, typename Age> template<typename Name, typename Age>
struct employee struct employee
{ {
private: private:
Name name; Name name;
Age age; Age age;
public: public:
void set_name(Name const& n) void set_name(Name const& n)
{ {
name=n; name=n;
} }
void set_age(Age const& a) void set_age(Age const& a)
{ {
age=a; age=a;
} }
Name const& get_name()const Name const& get_name()const
{ {
return name; return name;
} }
Age const& get_age()const Age const& get_age()const
{ {
return age; return age;
} }
}; };
} }
BOOST_FUSION_ADAPT_TPL_ADT( BOOST_FUSION_ADAPT_TPL_ADT(
(Name)(Age), (Name)(Age),
(demo::employee) (Name)(Age), (demo::employee) (Name)(Age),
@ -752,7 +753,7 @@ namespace qualified name of the template class type to be adapted.
boost::fusion::back(e)=41; boost::fusion::back(e)=41;
//Prints 'Edward Norton is 41 years old' //Prints 'Edward Norton is 41 years old'
std::cout << e.get_name() << " is " << e.get_age() << " years old" << std::endl; std::cout << e.get_name() << " is " << e.get_age() << " years old" << std::endl;
[heading See also] [heading See also]
__adt_attribute_proxy__ __adt_attribute_proxy__
@ -777,7 +778,7 @@ __random_access_sequence__ and __associative_sequence__.
[heading Expression Semantics] [heading Expression Semantics]
The above macro generates the necessary code to adapt `type_name` The above macro generates the necessary code to adapt `type_name`
as a model of __random_access_sequence__ and __associative_sequence__. as a model of __random_access_sequence__ and __associative_sequence__.
The sequence of The sequence of
[^(attribute_type['N], attribute_const_type['N], get_expr['N], set_expr['N], key_type['N])] [^(attribute_type['N], attribute_const_type['N], get_expr['N], set_expr['N], key_type['N])]
5-tuples declares the types, const types, get-expressions, set-expressions and key types 5-tuples declares the types, const types, get-expressions, set-expressions and key types
@ -799,7 +800,7 @@ The actual return type of fusion's intrinsic sequence access (meta-)functions
when in invoked with (an instance of) `type_name` is a proxy type. when in invoked with (an instance of) `type_name` is a proxy type.
This type is implicitly convertible to the attribute type via [^get_expr['N]] and This type is implicitly convertible to the attribute type via [^get_expr['N]] and
forwards assignment to the underlying element via [^set_expr['N]]. forwards assignment to the underlying element via [^set_expr['N]].
The value type (that is the type returned by __result_of_value_of__, __result_of_value_of_data__, The value type (that is the type returned by __result_of_value_of__, __result_of_value_of_data__,
__result_of_value_at__, __result_of_value_at_c__ and __result_of_value_at_key__) of the ['N]th element __result_of_value_at__, __result_of_value_at_c__ and __result_of_value_at_key__) of the ['N]th element
is [^attribute_type['N]] with const-qualifier and reference removed. is [^attribute_type['N]] with const-qualifier and reference removed.
@ -810,7 +811,7 @@ namespace qualified name of the class type to be adapted.
#include <boost/fusion/adapted/adt/adapt_assoc_adt.hpp> #include <boost/fusion/adapted/adt/adapt_assoc_adt.hpp>
#include <boost/fusion/include/adapt_assoc_adt.hpp> #include <boost/fusion/include/adapt_assoc_adt.hpp>
[heading Example] [heading Example]
namespace demo namespace demo
{ {
@ -819,47 +820,47 @@ namespace qualified name of the class type to be adapted.
private: private:
std::string name; std::string name;
int age; int age;
public: public:
void set_name(std::string const& n) void set_name(std::string const& n)
{ {
name=n; name=n;
} }
void set_age(int a) void set_age(int a)
{ {
age=a; age=a;
} }
std::string const& get_name()const std::string const& get_name()const
{ {
return name; return name;
} }
int get_age()const int get_age()const
{ {
return age; return age;
} }
}; };
} }
namespace keys namespace keys
{ {
struct name; struct name;
struct age; struct age;
} }
BOOST_FUSION_ADAPT_ASSOC_ADT( BOOST_FUSION_ADAPT_ASSOC_ADT(
demo::employee, demo::employee,
(std::string const&, std::string const&, obj.get_name(), obj.set_name(val), keys::name) (std::string const&, std::string const&, obj.get_name(), obj.set_name(val), keys::name)
(int, int, obj.get_age(), obj.set_age(val), keys::age)) (int, int, obj.get_age(), obj.set_age(val), keys::age))
demo::employee e; demo::employee e;
at_key<keys::name>(e)="Edward Norton"; at_key<keys::name>(e)="Edward Norton";
at_key<keys::age>(e)=41; at_key<keys::age>(e)=41;
//Prints 'Edward Norton is 41 years old' //Prints 'Edward Norton is 41 years old'
std::cout << e.get_name() << " is " << e.get_age() << " years old" << std::endl; std::cout << e.get_name() << " is " << e.get_age() << " years old" << std::endl;
[heading See also] [heading See also]
__adt_attribute_proxy__ __adt_attribute_proxy__
@ -886,7 +887,7 @@ __random_access_sequence__ and __associative_sequence__.
The above macro generates the necessary code to adapt `type_name` The above macro generates the necessary code to adapt `type_name`
or an arbitrary specialization of `type_name` or an arbitrary specialization of `type_name`
as a model of __random_access_sequence__ and __associative_sequence__. as a model of __random_access_sequence__ and __associative_sequence__.
The sequence `(template_param0)(template_param1)...` declares the names of The sequence `(template_param0)(template_param1)...` declares the names of
the template type parameters used. the template type parameters used.
The sequence `(specialization_param0)(specialization_param1)...` The sequence `(specialization_param0)(specialization_param1)...`
@ -913,7 +914,7 @@ The actual return type of fusion's intrinsic sequence access (meta-)functions
when in invoked with (an instance of) `type_name` is a proxy type. when in invoked with (an instance of) `type_name` is a proxy type.
This type is implicitly convertible to the attribute type via [^get_expr['N]] and This type is implicitly convertible to the attribute type via [^get_expr['N]] and
forwards assignment to the underlying element via [^set_expr['N]]. forwards assignment to the underlying element via [^set_expr['N]].
The value type (that is the type returned by __result_of_value_of__, __result_of_value_of_data__, The value type (that is the type returned by __result_of_value_of__, __result_of_value_of_data__,
__result_of_value_at__, __result_of_value_at_c__ and __result_of_value_at_key__) of the ['N]th element __result_of_value_at__, __result_of_value_at_c__ and __result_of_value_at_key__) of the ['N]th element
is [^attribute_type['N]] with const-qualifier and reference removed. is [^attribute_type['N]] with const-qualifier and reference removed.
@ -924,7 +925,7 @@ namespace qualified name of the template class type to be adapted.
#include <boost/fusion/adapted/adt/adapt_assoc_adt.hpp> #include <boost/fusion/adapted/adt/adapt_assoc_adt.hpp>
#include <boost/fusion/include/adapt_assoc_adt.hpp> #include <boost/fusion/include/adapt_assoc_adt.hpp>
[heading Example] [heading Example]
namespace demo namespace demo
{ {
@ -934,48 +935,48 @@ namespace qualified name of the template class type to be adapted.
private: private:
Name name; Name name;
Age age; Age age;
public: public:
void set_name(Name const& n) void set_name(Name const& n)
{ {
name=n; name=n;
} }
void set_age(Age const& a) void set_age(Age const& a)
{ {
age=a; age=a;
} }
Name const& get_name()const Name const& get_name()const
{ {
return name; return name;
} }
Age const& get_age()const Age const& get_age()const
{ {
return age; return age;
} }
}; };
} }
namespace keys namespace keys
{ {
struct name; struct name;
struct age; struct age;
} }
BOOST_FUSION_ADAPT_ASSOC_TPL_ADT( BOOST_FUSION_ADAPT_ASSOC_TPL_ADT(
(Name)(Age), (Name)(Age),
(demo::employee) (Name)(Age), (demo::employee) (Name)(Age),
(Name const&, Name const&, obj.get_name(), obj.set_name(val), keys::name) (Name const&, Name const&, obj.get_name(), obj.set_name(val), keys::name)
(Age const&, Age const&, obj.get_age(), obj.set_age(val), keys::age)) (Age const&, Age const&, obj.get_age(), obj.set_age(val), keys::age))
demo::employee<std::string, int> e; demo::employee<std::string, int> e;
at_key<keys::name>(e)="Edward Norton"; at_key<keys::name>(e)="Edward Norton";
at_key<keys::age>(e)=41; at_key<keys::age>(e)=41;
//Prints 'Edward Norton is 41 years old' //Prints 'Edward Norton is 41 years old'
std::cout << e.get_name() << " is " << e.get_age() << " years old" << std::endl; std::cout << e.get_name() << " is " << e.get_age() << " years old" << std::endl;
[heading See also] [heading See also]
__adt_attribute_proxy__ __adt_attribute_proxy__
@ -1027,14 +1028,14 @@ defined in __random_access_sequence__.
[[`struct_name(e0, e1,... en)`] [Creates an instance of `struct_name` with elements `e0`...`en`.]] [[`struct_name(e0, e1,... en)`] [Creates an instance of `struct_name` with elements `e0`...`en`.]]
[[`struct_name(fs)`] [Copy constructs an instance of `struct_name` from a __forward_sequence__ `fs`.]] [[`struct_name(fs)`] [Copy constructs an instance of `struct_name` from a __forward_sequence__ `fs`.]]
[[`str = fs`] [Assigns from a __forward_sequence__ `fs`.]] [[`str = fs`] [Assigns from a __forward_sequence__ `fs`.]]
[[`str.member_nameN`] [Access of struct member `member_nameN`]] [[`str.member_nameN`] [Access of struct member `member_nameN`]]
] ]
[heading Header] [heading Header]
#include <boost/fusion/adapted/struct/define_struct.hpp> #include <boost/fusion/adapted/struct/define_struct.hpp>
#include <boost/fusion/include/define_struct.hpp> #include <boost/fusion/include/define_struct.hpp>
[heading Example] [heading Example]
// demo::employee is a Fusion sequence // demo::employee is a Fusion sequence
@ -1096,14 +1097,14 @@ defined in __random_access_sequence__.
[[`Str(e0, e1,... en)`] [Creates an instance of `Str` with elements `e0`...`en`.]] [[`Str(e0, e1,... en)`] [Creates an instance of `Str` with elements `e0`...`en`.]]
[[`Str(fs)`] [Copy constructs an instance of `Str` from a __forward_sequence__ `fs`.]] [[`Str(fs)`] [Copy constructs an instance of `Str` from a __forward_sequence__ `fs`.]]
[[`str = fs`] [Assigns from a __forward_sequence__ `fs`.]] [[`str = fs`] [Assigns from a __forward_sequence__ `fs`.]]
[[`str.member_nameN`] [Access of struct member `member_nameN`]] [[`str.member_nameN`] [Access of struct member `member_nameN`]]
] ]
[heading Header] [heading Header]
#include <boost/fusion/adapted/struct/define_struct.hpp> #include <boost/fusion/adapted/struct/define_struct.hpp>
#include <boost/fusion/include/define_struct.hpp> #include <boost/fusion/include/define_struct.hpp>
[heading Example] [heading Example]
// Any instantiated demo::employee is a Fusion sequence // Any instantiated demo::employee is a Fusion sequence
@ -1161,14 +1162,14 @@ defined in __random_access_sequence__ and __associative_sequence__.
[[`struct_name(e0, e1,... en)`] [Creates an instance of `struct_name` with elements `e0`...`en`.]] [[`struct_name(e0, e1,... en)`] [Creates an instance of `struct_name` with elements `e0`...`en`.]]
[[`struct_name(fs)`] [Copy constructs an instance of `struct_name` from a __forward_sequence__ `fs`.]] [[`struct_name(fs)`] [Copy constructs an instance of `struct_name` from a __forward_sequence__ `fs`.]]
[[`str = fs`] [Assigns from a __forward_sequence__ `fs`.]] [[`str = fs`] [Assigns from a __forward_sequence__ `fs`.]]
[[`str.member_nameN`] [Access of struct member `member_nameN`]] [[`str.member_nameN`] [Access of struct member `member_nameN`]]
] ]
[heading Header] [heading Header]
#include <boost/fusion/adapted/struct/define_assoc_struct.hpp> #include <boost/fusion/adapted/struct/define_assoc_struct.hpp>
#include <boost/fusion/include/define_assoc_struct.hpp> #include <boost/fusion/include/define_assoc_struct.hpp>
[heading Example] [heading Example]
namespace keys namespace keys
@ -1176,7 +1177,7 @@ defined in __random_access_sequence__ and __associative_sequence__.
struct name; struct name;
struct age; struct age;
} }
// demo::employee is a Fusion sequence // demo::employee is a Fusion sequence
BOOST_FUSION_DEFINE_ASSOC_STRUCT( BOOST_FUSION_DEFINE_ASSOC_STRUCT(
(demo), employee, (demo), employee,
@ -1237,14 +1238,14 @@ defined in __random_access_sequence__ and __associative_sequence__.
[[`Str(e0, e1,... en)`] [Creates an instance of `Str` with elements `e0`...`en`.]] [[`Str(e0, e1,... en)`] [Creates an instance of `Str` with elements `e0`...`en`.]]
[[`Str(fs)`] [Copy constructs an instance of `Str` from a __forward_sequence__ `fs`.]] [[`Str(fs)`] [Copy constructs an instance of `Str` from a __forward_sequence__ `fs`.]]
[[`str = fs`] [Assigns from a __forward_sequence__ `fs`.]] [[`str = fs`] [Assigns from a __forward_sequence__ `fs`.]]
[[`str.member_nameN`] [Access of struct member `member_nameN`]] [[`str.member_nameN`] [Access of struct member `member_nameN`]]
] ]
[heading Header] [heading Header]
#include <boost/fusion/adapted/struct/define_assoc_struct.hpp> #include <boost/fusion/adapted/struct/define_assoc_struct.hpp>
#include <boost/fusion/include/define_assoc_struct.hpp> #include <boost/fusion/include/define_assoc_struct.hpp>
[heading Example] [heading Example]
namespace keys namespace keys
@ -1252,7 +1253,7 @@ defined in __random_access_sequence__ and __associative_sequence__.
struct name; struct name;
struct age; struct age;
} }
// Any instantiated demo::employee is a Fusion sequence // Any instantiated demo::employee is a Fusion sequence
BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT( BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT(
(Name)(Age), (demo), employee, (Name)(Age), (demo), employee,

View File

@ -1,5 +1,6 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2001-2011 Joel de Guzman
Copyright (C) 2006 Dan Marsden
Copyright (C) 2010 Christopher Schmidt Copyright (C) 2010 Christopher Schmidt
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software

View File

@ -1,5 +1,7 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2001-2011 Joel de Guzman
Copyright (C) 2006 Dan Marsden
Copyright (C) 2006 Tobias Schwinger
Copyright (C) 2010 Christopher Schmidt Copyright (C) 2010 Christopher Schmidt
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
@ -12,10 +14,10 @@ This section summarizes significant changes to the Fusion library.
* Sep 27, 2006: Added `boost::tuple` support. (Joel de Guzman) * Sep 27, 2006: Added `boost::tuple` support. (Joel de Guzman)
* Nov 17, 2006: Added `boost::variant` support. (Joel de Guzman) * Nov 17, 2006: Added `boost::variant` support. (Joel de Guzman)
* Feb 15, 2011: Added functional module. (Tobias Schwinger) * Feb 15, 2007: Added functional module. (Tobias Schwinger)
* April 2, 2011: Added struct adapter. (Joel de Guzman) * April 2, 2007: Added struct adapter. (Joel de Guzman)
* May 8, 2011: Added associative struct adapter. (Dan Marsden) * May 8, 2007: Added associative struct adapter. (Dan Marsden)
* Dec 20, 2011: Removed `boost::variant` support. After thorough * Dec 20, 2007: Removed `boost::variant` support. After thorough
investigation, I think now that the move to make variant a investigation, I think now that the move to make variant a
fusion sequence is rather quirky. A variant will always fusion sequence is rather quirky. A variant will always
have a size==1 regardless of the number of types it can contain have a size==1 regardless of the number of types it can contain
@ -37,6 +39,11 @@ This section summarizes significant changes to the Fusion library.
(Christopher Schmidt) (Christopher Schmidt)
* October 7, 2010: Added __adapt_adt__, __adapt_tpl_adt__, * October 7, 2010: Added __adapt_adt__, __adapt_tpl_adt__,
__adapt_assoc_adt__ and __adapt_assoc_tpl_adt__ (Joel de Guzman, __adapt_assoc_adt__ and __adapt_assoc_tpl_adt__ (Joel de Guzman,
Hartmut Kaiser and Christopher Schmidt) Hartmut Kaiser and Christopher Schmidt)
* August 29, 2011: Added support for segmented sequences and iterators (Eric Niebler)
* September 16, 2011: Added preprocessed files (using wave) to speed up
compilation (Joel de Guzman)
* October 8, 2011: Added adaptor for std::tuple (Joel de Guzman)
* October 10, 2011: Made map random access (Brandon Kohn)
[endsect] [endsect]

View File

@ -1,5 +1,6 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2001-2011 Joel de Guzman
Copyright (C) 2006 Dan Marsden
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@ -681,7 +682,7 @@ Create a __map__ from one or more key/data pairs.
, typename T0, typename T1,... typename TN> , typename T0, typename T1,... typename TN>
typename __result_of_make_map__<K0, K0,... KN, T0, T1,... TN>::type typename __result_of_make_map__<K0, K0,... KN, T0, T1,... TN>::type
make_map(T0 const& x0, T1 const& x1... TN const& xN); make_map(T0 const& x0, T1 const& x1... TN const& xN);
The variadic function accepts `0` to `FUSION_MAX_MAP_SIZE` elements, The variadic function accepts `0` to `FUSION_MAX_MAP_SIZE` elements,
where `FUSION_MAX_MAP_SIZE` is a user definable predefined maximum that where `FUSION_MAX_MAP_SIZE` is a user definable predefined maximum that
defaults to `10`. You may define the preprocessor constant defaults to `10`. You may define the preprocessor constant

View File

@ -1,5 +1,6 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2001-2011 Joel de Guzman
Copyright (C) 2006 Dan Marsden
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,5 +1,5 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2006 Tobias Schwinger
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@ -66,9 +66,9 @@ function objects to accept arbitrary calls. In other words, an unary function
object can be implemented instead of (maybe heavily overloaded) function object can be implemented instead of (maybe heavily overloaded) function
templates or function call operators. templates or function call operators.
The library provides both a strictly typed and a generic variant for this The library provides both a strictly typed and a generic variant for this
transformation. The latter should be used in combination with transformation. The latter should be used in combination with
__boost_func_forward__ to attack __the_forwarding_problem__. __boost_func_forward__ to attack __the_forwarding_problem__.
Both variants have a corresponding generator function template that returns an Both variants have a corresponding generator function template that returns an
adapter instance for the given argument. adapter instance for the given argument.
@ -546,7 +546,7 @@ Returns the result type of __invoke_function_object__.
[heading Macros] [heading Macros]
The following macros can be defined to change the maximum arity. The following macros can be defined to change the maximum arity.
The default is 6. The default is 6.
* BOOST_FUSION_INVOKE_MAX_ARITY * BOOST_FUSION_INVOKE_MAX_ARITY
@ -1060,7 +1060,7 @@ signature is optimized automatically to avoid by-value parameters.]
[heading Macros] [heading Macros]
The following macros can be defined to change the maximum arity. The following macros can be defined to change the maximum arity.
The value used for these macros must not exceed `FUSION_MAX_VECTOR_SIZE`. The value used for these macros must not exceed `FUSION_MAX_VECTOR_SIZE`.
The default is 6. The default is 6.

View File

@ -1,5 +1,6 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2001-2011 Joel de Guzman
Copyright (C) 2006 Dan Marsden
Copyright (C) 2010 Christopher Schmidt Copyright (C) 2010 Christopher Schmidt
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software

View File

@ -1,5 +1,6 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2001-2011 Joel de Guzman
Copyright (C) 2006 Dan Marsden
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,5 +1,6 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2001-2011 Joel de Guzman
Copyright (C) 2006 Dan Marsden
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@ -994,9 +995,9 @@ Returns the key type associated with the element referenced by an associative it
[heading Example] [heading Example]
typedef __map__<__pair__<float,int> > vec; typedef __map__<__pair__<float,int> > vec;
typedef __result_of_begin__<vec>::type first; typedef __result_of_begin__<vec>::type first;
BOOST_MPL_ASSERT((boost::is_same<__result_of_key_of__<first>::type, float>)); BOOST_MPL_ASSERT((boost::is_same<__result_of_key_of__<first>::type, float>));
[endsect] [endsect]
[section value_of_data] [section value_of_data]
@ -1033,9 +1034,9 @@ Returns the type of the data property associated with the element referenced by
[heading Example] [heading Example]
typedef __map__<__pair__<float,int> > vec; typedef __map__<__pair__<float,int> > vec;
typedef __result_of_begin__<vec>::type first; typedef __result_of_begin__<vec>::type first;
BOOST_MPL_ASSERT((boost::is_same<__result_of_value_of_data__<first>::type, int>)); BOOST_MPL_ASSERT((boost::is_same<__result_of_value_of_data__<first>::type, int>));
[endsect] [endsect]
[section deref_data] [section deref_data]

View File

@ -1,5 +1,6 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2001-2011 Joel de Guzman
Copyright (C) 2006 Dan Marsden
Copyright (C) 2010 Christopher Schmidt Copyright (C) 2010 Christopher Schmidt
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
@ -167,7 +168,7 @@ and __deref_data__) is a proxy type, an instance of
has three template arguments: has three template arguments:
namespace boost { namespace fusion { namespace extension namespace boost { namespace fusion { namespace extension
{ {
template< template<
typename Type typename Type
, int Index , int Index
@ -175,14 +176,14 @@ has three template arguments:
> >
struct adt_attribute_proxy; struct adt_attribute_proxy;
}}} }}}
When adapting a class type, `adt_attribute_proxy` is specialized for every When adapting a class type, `adt_attribute_proxy` is specialized for every
element of the adapted sequence, with `Type` being the class type that is element of the adapted sequence, with `Type` being the class type that is
adapted, `Index` the 0-based indices of the elements, and `Const` both `true` adapted, `Index` the 0-based indices of the elements, and `Const` both `true`
and `false`. The return type of fusion's intrinsic sequence access functions and `false`. The return type of fusion's intrinsic sequence access functions
for the ['N]th element of an adapted class type `type_name` is for the ['N]th element of an adapted class type `type_name` is
[^adt_attribute_proxy<type_name, ['N], ['Const]>], with [^['Const]] being `true` [^adt_attribute_proxy<type_name, ['N], ['Const]>], with [^['Const]] being `true`
for constant instances of `type_name` and `false` for non-constant ones. for constant instances of `type_name` and `false` for non-constant ones.
[variablelist Notation [variablelist Notation
[[`type_name`] [[`type_name`]
@ -204,7 +205,7 @@ for constant instances of `type_name` and `false` for non-constant ones.
] ]
[*Expression Semantics] [*Expression Semantics]
[table [table
[[Expression] [Semantics]] [[Expression] [Semantics]]
[[[^proxy_type['N](inst)]] [Creates an instance of [^proxy_type['N]] with underlying object `inst`]] [[[^proxy_type['N](inst)]] [Creates an instance of [^proxy_type['N]] with underlying object `inst`]]

View File

@ -1,5 +1,6 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2001-2011 Joel de Guzman
Copyright (C) 2006 Dan Marsden
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,5 +1,6 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2001-2011 Joel de Guzman
Copyright (C) 2006 Dan Marsden
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,5 +1,6 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2001-2011 Joel de Guzman
Copyright (C) 2006 Dan Marsden
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,5 +1,6 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2001-2011 Joel de Guzman
Copyright (C) 2006 Dan Marsden
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,5 +1,6 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2001-2011 Joel de Guzman
Copyright (C) 2006 Dan Marsden
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,5 +1,6 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2001-2011 Joel de Guzman
Copyright (C) 2006 Dan Marsden
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,5 +1,6 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2001-2011 Joel de Guzman
Copyright (C) 2006 Dan Marsden
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at

View File

@ -1,5 +1,6 @@
[/============================================================================== [/==============================================================================
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger Copyright (C) 2001-2011 Joel de Guzman
Copyright (C) 2006 Dan Marsden
Use, modification and distribution is subject to the Boost Software Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@ -482,7 +483,7 @@ defined in the implemented models.
[heading Description] [heading Description]
`nview` presents a view which iterates over a given __sequence__ in a specified order. `nview` presents a view which iterates over a given __sequence__ in a specified order.
An `nview` is constructed from an arbitrary __sequence__ and a list of indicies specifying An `nview` is constructed from an arbitrary __sequence__ and a list of indicies specifying
the elements to iterate over. the elements to iterate over.
@ -506,15 +507,15 @@ the elements to iterate over.
[[Parameter] [Description] [Default]] [[Parameter] [Description] [Default]]
[[`Sequence`] [An arbitrary Fusion __forward_sequence__] [[`Sequence`] [An arbitrary Fusion __forward_sequence__]
[]] []]
[[`Indicies`] [A `mpl::vector_c<int, ...>` holding the indicies defining [[`Indicies`] [A `mpl::vector_c<int, ...>` holding the indicies defining
the required iteration order.] []] the required iteration order.] []]
[[`I1`, `I2`, `I3`...] [A list of integers specifying the required [[`I1`, `I2`, `I3`...] [A list of integers specifying the required
iteration order.] [`INT_MAX` for `I2`, `I3`...]] iteration order.] [`INT_MAX` for `I2`, `I3`...]]
] ]
[heading Model of] [heading Model of]
* __random_access_sequence__ (see __traversal_concept__) * __random_access_sequence__ (see __traversal_concept__)
[variablelist Notation [variablelist Notation
[[`NV`] [A `nview` type]] [[`NV`] [A `nview` type]]