forked from boostorg/mpl
31 lines
645 B
Plaintext
31 lines
645 B
Plaintext
<!-- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| section -->
|
|
<section id="sequences">
|
|
<title>Working with type sequences</>
|
|
|
|
<para>
|
|
If we were to design a generative container library, our first attempt could be something like this:
|
|
</>
|
|
|
|
<programlisting>
|
|
<![CDATA[
|
|
namespace ctl { // Container Template Library
|
|
|
|
template<
|
|
typename T
|
|
, typename Features
|
|
>
|
|
class container
|
|
{
|
|
// ...
|
|
};
|
|
|
|
} // namespace ctl
|
|
]]>
|
|
</>
|
|
|
|
<para>
|
|
Here, <literal>container</> template is a single generative interface to all the , and we would like to pass to a possibly numerous features of a container as a single type.
|
|
</>
|
|
|
|
</section>
|