mirror of
https://github.com/boostorg/boost.git
synced 2025-04-07 22:39:25 +00:00
added a note about type generators being a workaround for no templated
typedefs [SVN r9185]
This commit is contained in:
parent
aa83d91940
commit
edfc1409f1
1 changed files with 12 additions and 5 deletions
|
@ -157,11 +157,11 @@ namespace std {
|
|||
<h2><a name="type_generator">Type Generators</a></h2>
|
||||
|
||||
<p>A <i>type generator</i> is a template whose only purpose is to
|
||||
synthesize a single new type based on its template argument(s). The
|
||||
generated type is usually expressed as a nested typedef named,
|
||||
appropriately <tt>type</tt>. A type generator is usually used to
|
||||
consolidate a complicated type expression into a simple one, as in
|
||||
<tt>boost::<a href=
|
||||
synthesize a single new type based on its template argument(s)<a
|
||||
href="#1">[1]</a>. The generated type is usually expressed as a
|
||||
nested typedef named, appropriately <tt>type</tt>. A type
|
||||
generator is usually used to consolidate a complicated type
|
||||
expression into a simple one, as in <tt>boost::<a href=
|
||||
"../libs/utility/filter_iterator.hpp">filter_iterator_generator</a></tt>,
|
||||
which looks something like this:
|
||||
|
||||
|
@ -191,6 +191,7 @@ boost::filter_iterator_generator<my_predicate,my_base_iterator>::type
|
|||
</pre>
|
||||
</blockquote>
|
||||
|
||||
|
||||
<h2><a name="object_generator">Object Generators</a></h2>
|
||||
|
||||
<p>An <i>object generator</i> is a function template whose only purpose is
|
||||
|
@ -286,6 +287,12 @@ void append_sequence(Container& c, Iterator start, Iterator finish)
|
|||
<a href=
|
||||
"http://www.cs.rpi.edu/~wiseb/xrds/ovp2-3b.html#SECTION00015000000000000000">
|
||||
here</a>.
|
||||
|
||||
<h2>Notes</h2>
|
||||
|
||||
<a name="1">[1]</a> Type generators are a workaround for the lack
|
||||
of ``templated typedefs'' in C++.
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Revised
|
||||
|
|
Loading…
Add table
Reference in a new issue