123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- <?xml version="1.0" encoding="utf-8"?>
- <!--
- Copyright 2012 Eric Niebler
- 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)
- -->
- <header name="boost/proto/functional/std/utility.hpp">
- <para>Defines Proto callables <computeroutput><classname>boost::proto::functional::make_pair</classname></computeroutput>,
- <computeroutput><classname>boost::proto::functional::first</classname></computeroutput> and
- <computeroutput><classname>boost::proto::functional::second</classname></computeroutput>.</para>
- <namespace name="boost">
- <namespace name="proto">
- <namespace name="functional">
- <!-- proto::functional::make_pair -->
- <struct name="make_pair">
- <purpose>A <conceptname>PolymorphicFunctionObject</conceptname> type that invokes
- <computeroutput>std::make_pair()</computeroutput> on its arguments.</purpose>
- <description>
- <para>
- A <conceptname>PolymorphicFunctionObject</conceptname> type that invokes
- <computeroutput>std::make_pair()</computeroutput> on its arguments.</para>
- </description>
- <inherit>
- <type><classname>proto::callable</classname></type>
- </inherit>
- <struct-specialization name="result">
- <template>
- <template-type-parameter name="This"/>
- <template-type-parameter name="First"/>
- <template-type-parameter name="Second"/>
- </template>
- <specialization>
- <template-arg>This(First, Second)</template-arg>
- </specialization>
- <typedef name="type">
- <type>std::pair<
- typename boost::remove_const<typename boost::remove_reference<First>::type>::type
- , typename boost::remove_const<typename boost::remove_reference<Second>::type>::type
- ></type>
- </typedef>
- </struct-specialization>
- <method-group name="public member functions">
- <method name="operator()" cv="const">
- <type>typename std::pair< First, Second ></type>
- <template>
- <template-type-parameter name="First"/>
- <template-type-parameter name="Second"/>
- </template>
- <parameter name="first">
- <paramtype>First const &</paramtype>
- </parameter>
- <parameter name="second">
- <paramtype>Second const &</paramtype>
- </parameter>
- <returns>
- <para><computeroutput>std::make_pair(first, second)</computeroutput></para>
- </returns>
- </method>
- </method-group>
- </struct>
- <!-- proto::functional::first -->
- <struct name="first">
- <purpose>
- A <conceptname>PolymorphicFunctionObject</conceptname> type that returns
- the first element of a <computeroutput>std::pair<></computeroutput>.
- </purpose>
- <description>
- <para>
- A <conceptname>PolymorphicFunctionObject</conceptname> type that returns
- the first element of a <computeroutput>std::pair<></computeroutput>.</para>
- </description>
- <inherit><type><classname>proto::callable</classname></type>
- </inherit>
- <struct-specialization name="result">
- <template>
- <template-type-parameter name="This"/>
- <template-type-parameter name="Pair"/>
- </template>
- <specialization>
- <template-arg>This(Pair)</template-arg>
- </specialization>
- <typedef name="type">
- <type>typename Pair::first_type</type>
- </typedef>
- </struct-specialization>
- <struct-specialization name="result">
- <template>
- <template-type-parameter name="This"/>
- <template-type-parameter name="Pair"/>
- </template>
- <specialization>
- <template-arg>This(Pair &)</template-arg>
- </specialization>
- <typedef name="type">
- <type>typename Pair::first_type &</type>
- </typedef>
- </struct-specialization>
- <struct-specialization name="result">
- <template>
- <template-type-parameter name="This"/>
- <template-type-parameter name="Pair"/>
- </template>
- <specialization>
- <template-arg>This(Pair const &)</template-arg>
- </specialization>
- <typedef name="type">
- <type>typename Pair::first_type const &</type>
- </typedef>
- </struct-specialization>
- <method-group name="public member functions">
- <method name="operator()" cv="const">
- <type>typename Pair::first_type &</type>
- <template>
- <template-type-parameter name="Pair"/>
- </template>
- <parameter name="pair">
- <paramtype>Pair &</paramtype>
- </parameter>
- <returns>
- <para>
- <computeroutput>pair.first</computeroutput>
- </para>
- </returns>
- </method>
- <method name="operator()" cv="const">
- <type>typename Pair::first_type const &</type>
- <template>
- <template-type-parameter name="Pair"/>
- </template>
- <parameter name="pair">
- <paramtype>Pair const &</paramtype>
- </parameter>
- <returns>
- <para>
- <computeroutput>pair.first</computeroutput>
- </para>
- </returns>
- </method>
- </method-group>
- </struct>
- <!-- proto::functional::second -->
- <struct name="second">
- <purpose>
- A <conceptname>PolymorphicFunctionObject</conceptname> type that returns
- the second element of a <computeroutput>std::pair<></computeroutput>.
- </purpose>
- <description>
- <para>
- A <conceptname>PolymorphicFunctionObject</conceptname> type that returns
- the second element of a <computeroutput>std::pair<></computeroutput>.
- </para>
- </description>
- <inherit><type><classname>proto::callable</classname></type></inherit>
- <struct-specialization name="result">
- <template>
- <template-type-parameter name="This"/>
- <template-type-parameter name="Pair"/>
- </template>
- <specialization>
- <template-arg>This(Pair)</template-arg>
- </specialization>
- <typedef name="type">
- <type>typename Pair::second_type</type>
- </typedef>
- </struct-specialization>
- <struct-specialization name="result">
- <template>
- <template-type-parameter name="This"/>
- <template-type-parameter name="Pair"/>
- </template>
- <specialization>
- <template-arg>This(Pair &)</template-arg>
- </specialization>
- <typedef name="type">
- <type>typename Pair::second_type &</type>
- </typedef>
- </struct-specialization>
- <struct-specialization name="result">
- <template>
- <template-type-parameter name="This"/>
- <template-type-parameter name="Pair"/>
- </template>
- <specialization>
- <template-arg>This(Pair const &)</template-arg>
- </specialization>
- <typedef name="type">
- <type>typename Pair::second_type const &</type>
- </typedef>
- </struct-specialization>
- <method-group name="public member functions">
- <method name="operator()" cv="const">
- <type>typename Pair::second_type &</type>
- <template>
- <template-type-parameter name="Pair"/>
- </template>
- <parameter name="pair">
- <paramtype>Pair &</paramtype>
- </parameter>
- <returns>
- <para>
- <computeroutput>pair.second</computeroutput>
- </para>
- </returns>
- </method>
- <method name="operator()" cv="const">
- <type>typename Pair::second_type const &</type>
- <template>
- <template-type-parameter name="Pair"/>
- </template>
- <parameter name="pair">
- <paramtype>Pair const &</paramtype>
- </parameter>
- <returns>
- <para>
- <computeroutput>pair.second</computeroutput>
- </para>
- </returns>
- </method>
- </method-group>
- </struct>
- </namespace>
- </namespace>
- </namespace>
- </header>
|