mirror of
https://github.com/boostorg/bind.git
synced 2026-04-19 07:58:53 +02:00
Compare commits
1 Commits
boost-1.57
...
boost-1.54
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f64f050d07 |
12
bind.html
12
bind.html
@@ -147,8 +147,8 @@ bind(g, _1, _1, _1)(x, y, z); // g(x, x, x)
|
|||||||
|
|
||||||
bind(f, i, _1);
|
bind(f, i, _1);
|
||||||
</pre>
|
</pre>
|
||||||
<p>a copy of the value of <b>i</b> is stored into the function object. <A href="../core/doc/html/core/ref.html">
|
<p>a copy of the value of <b>i</b> is stored into the function object. <A href="ref.html">
|
||||||
boost::ref</A> and <A href="../core/doc/html/core/ref.html">boost::cref</A> can be used to make
|
boost::ref</A> and <A href="ref.html">boost::cref</A> can be used to make
|
||||||
the function object store a reference to an object, rather than a copy:
|
the function object store a reference to an object, rather than a copy:
|
||||||
</p>
|
</p>
|
||||||
<pre>int i = 5;
|
<pre>int i = 5;
|
||||||
@@ -272,7 +272,7 @@ bind(&X::f, p, _1)(i); // (<i>internal copy of p</i>)->f(i)
|
|||||||
</p>
|
</p>
|
||||||
<P>This feature of <b>bind</b> can be used to perform function composition. See <A href="bind_as_compose.cpp">
|
<P>This feature of <b>bind</b> can be used to perform function composition. See <A href="bind_as_compose.cpp">
|
||||||
bind_as_compose.cpp</A> for an example that demonstrates how to use <b>bind</b>
|
bind_as_compose.cpp</A> for an example that demonstrates how to use <b>bind</b>
|
||||||
to achieve similar functionality to <A href="http://www.boost.org/doc/libs/1_31_0/libs/compose/index.htm">Boost.Compose</A>.
|
to achieve similar functionality to <A href="../compose/index.htm">Boost.Compose</A>.
|
||||||
</P>
|
</P>
|
||||||
<p>Note that the first argument - the bound function object - is not evaluated,
|
<p>Note that the first argument - the bound function object - is not evaluated,
|
||||||
even when it's a function object that is produced by <STRONG>bind</STRONG> or a
|
even when it's a function object that is produced by <STRONG>bind</STRONG> or a
|
||||||
@@ -390,7 +390,7 @@ void connect()
|
|||||||
<p>As a general rule, the function objects generated by <b>bind</b> take their
|
<p>As a general rule, the function objects generated by <b>bind</b> take their
|
||||||
arguments by reference and cannot, therefore, accept non-const temporaries or
|
arguments by reference and cannot, therefore, accept non-const temporaries or
|
||||||
literal constants. This is an inherent limitation of the C++ language in its
|
literal constants. This is an inherent limitation of the C++ language in its
|
||||||
current (2003) incarnation, known as <A href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm">
|
current (2003) incarnation, known as <A href="http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1385.htm">
|
||||||
the forwarding problem</A>. (It will be fixed in the next standard, usually
|
the forwarding problem</A>. (It will be fixed in the next standard, usually
|
||||||
called C++0x.)</p>
|
called C++0x.)</p>
|
||||||
<p>The library uses signatures of the form
|
<p>The library uses signatures of the form
|
||||||
@@ -737,7 +737,7 @@ namespace
|
|||||||
a nonnegative integer, is defined as:</p>
|
a nonnegative integer, is defined as:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<tt>x.get()</tt>, when <tt>x</tt> is of type <tt><A href="../core/doc/html/core/ref.html">boost::reference_wrapper</A><T></tt>
|
<tt>x.get()</tt>, when <tt>x</tt> is of type <tt><A href="ref.html">boost::reference_wrapper</A><T></tt>
|
||||||
for some type <tt>T</tt>;
|
for some type <tt>T</tt>;
|
||||||
<li>
|
<li>
|
||||||
v<sub>k</sub>, when <tt>x</tt>
|
v<sub>k</sub>, when <tt>x</tt>
|
||||||
@@ -912,7 +912,7 @@ namespace
|
|||||||
<li>
|
<li>
|
||||||
<A href="../config/config.htm">Boost.Config</A>
|
<A href="../config/config.htm">Boost.Config</A>
|
||||||
<li>
|
<li>
|
||||||
<A href="../core/doc/html/core/ref.html">boost/ref.hpp</A>
|
<A href="ref.html">boost/ref.hpp</A>
|
||||||
<li>
|
<li>
|
||||||
<A href="mem_fn.html">boost/mem_fn.hpp</A>
|
<A href="mem_fn.html">boost/mem_fn.hpp</A>
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
14
doc/Jamfile.v2
Normal file
14
doc/Jamfile.v2
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
project boost/doc ;
|
||||||
|
import boostbook : boostbook ;
|
||||||
|
|
||||||
|
boostbook ref-doc : ref.xml
|
||||||
|
:
|
||||||
|
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
|
||||||
|
<xsl:param>boost.root=../../../..
|
||||||
|
;
|
||||||
|
|
||||||
262
doc/ref.xml
Normal file
262
doc/ref.xml
Normal file
@@ -0,0 +1,262 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
|
||||||
|
"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
|
||||||
|
<library name="Ref" dirname="ref" id="ref" last-revision="$Date$">
|
||||||
|
<libraryinfo>
|
||||||
|
<author>
|
||||||
|
<firstname>Jaakko</firstname>
|
||||||
|
<surname>Järvi</surname>
|
||||||
|
</author>
|
||||||
|
<author>
|
||||||
|
<firstname>Peter</firstname>
|
||||||
|
<surname>Dimov</surname>
|
||||||
|
</author>
|
||||||
|
<author>
|
||||||
|
<firstname>Douglas</firstname>
|
||||||
|
<surname>Gregor</surname>
|
||||||
|
</author>
|
||||||
|
<author>
|
||||||
|
<firstname>Dave</firstname>
|
||||||
|
<surname>Abrahams</surname>
|
||||||
|
</author>
|
||||||
|
|
||||||
|
<copyright>
|
||||||
|
<year>1999</year>
|
||||||
|
<year>2000</year>
|
||||||
|
<holder>Jaakko Järvi</holder>
|
||||||
|
</copyright>
|
||||||
|
|
||||||
|
<copyright>
|
||||||
|
<year>2001</year>
|
||||||
|
<year>2002</year>
|
||||||
|
<holder>Peter Dimov</holder>
|
||||||
|
</copyright>
|
||||||
|
|
||||||
|
<copyright>
|
||||||
|
<year>2002</year>
|
||||||
|
<holder>David Abrahams</holder>
|
||||||
|
</copyright>
|
||||||
|
|
||||||
|
<legalnotice>
|
||||||
|
<para>Subject to the Boost Software License, Version 1.0. See
|
||||||
|
accompanying file <filename>LICENSE_1_0.txt</filename> or copy at
|
||||||
|
<ulink url="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</ulink>.
|
||||||
|
</para>
|
||||||
|
</legalnotice>
|
||||||
|
|
||||||
|
<librarypurpose>A utility library for passing references to generic functions</librarypurpose>
|
||||||
|
<librarycategory name="category:higher-order"/>
|
||||||
|
</libraryinfo>
|
||||||
|
|
||||||
|
<title>Boost.Ref</title>
|
||||||
|
|
||||||
|
<section id="ref.intro">
|
||||||
|
<title>Introduction</title>
|
||||||
|
|
||||||
|
<using-namespace name="boost"/>
|
||||||
|
|
||||||
|
<para>The Ref library is a small library that is useful for passing
|
||||||
|
references to function templates (algorithms) that would usually
|
||||||
|
take copies of their arguments. It defines the class template
|
||||||
|
<code><classname>boost::reference_wrapper<T></classname></code>,
|
||||||
|
two functions
|
||||||
|
<code><functionname>boost::ref</functionname></code> and
|
||||||
|
<code><functionname>boost::cref</functionname></code> that return
|
||||||
|
instances of <code>boost::reference_wrapper<T></code>,
|
||||||
|
a function <code><functionname>boost::unwrap_ref</functionname></code>
|
||||||
|
that unwraps a <code>boost::reference_wrapper<T></code> or
|
||||||
|
returns a reference to any other type of object, and the
|
||||||
|
two traits classes
|
||||||
|
<code><classname>boost::is_reference_wrapper<T></classname></code>
|
||||||
|
and
|
||||||
|
<code><classname>boost::unwrap_reference<T></classname></code>.</para>
|
||||||
|
|
||||||
|
<para>The purpose of
|
||||||
|
<code>boost::reference_wrapper<T></code> is to
|
||||||
|
contain a reference to an object of type T. It is primarily used to
|
||||||
|
"feed" references to function templates (algorithms) that take their
|
||||||
|
parameter by value.</para>
|
||||||
|
|
||||||
|
<para>To support this usage,
|
||||||
|
<code>boost::reference_wrapper<T></code> provides an implicit
|
||||||
|
conversion to <code>T&</code>. This usually allows the function
|
||||||
|
templates to work on references unmodified.</para>
|
||||||
|
|
||||||
|
<para><code>boost::reference_wrapper<T></code> is
|
||||||
|
both CopyConstructible and Assignable (ordinary references are not
|
||||||
|
Assignable).</para>
|
||||||
|
|
||||||
|
<para>The expression <code>boost::ref(x)</code>
|
||||||
|
returns a
|
||||||
|
<code>boost::reference_wrapper<X>(x)</code> where X
|
||||||
|
is the type of x. Similarly,
|
||||||
|
<code>boost::cref(x)</code> returns a
|
||||||
|
<code>boost::reference_wrapper<X const>(x)</code>.</para>
|
||||||
|
|
||||||
|
<para>The expression <code>boost::unwrap_ref(x)</code>
|
||||||
|
returns a
|
||||||
|
<code>boost::unwrap_reference<X>::type&</code> where X
|
||||||
|
is the type of x.</para>
|
||||||
|
|
||||||
|
<para>The expression
|
||||||
|
<code>boost::is_reference_wrapper<T>::value</code>
|
||||||
|
is true if T is a <code>reference_wrapper</code>, and
|
||||||
|
false otherwise.</para>
|
||||||
|
|
||||||
|
<para>The type-expression
|
||||||
|
<code>boost::unwrap_reference<T>::type</code> is T::type if T
|
||||||
|
is a <code>reference_wrapper</code>, T otherwise.</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<library-reference>
|
||||||
|
<header name="boost/ref.hpp">
|
||||||
|
<namespace name="boost">
|
||||||
|
<class name="reference_wrapper">
|
||||||
|
<template>
|
||||||
|
<template-type-parameter name="T"/>
|
||||||
|
</template>
|
||||||
|
<purpose>
|
||||||
|
Contains a reference to an object of type
|
||||||
|
<computeroutput>T</computeroutput>.
|
||||||
|
</purpose>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
<para><computeroutput><classname>reference_wrapper</classname></computeroutput>
|
||||||
|
is primarily used to "feed" references to function templates
|
||||||
|
(algorithms) that take their parameter by value. It provides
|
||||||
|
an implicit conversion to
|
||||||
|
<computeroutput>T&</computeroutput>, which usually allows
|
||||||
|
the function templates to work on references
|
||||||
|
unmodified.</para>
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<typedef name="type"><type>T</type></typedef>
|
||||||
|
|
||||||
|
<constructor specifiers="explicit">
|
||||||
|
<parameter name="t">
|
||||||
|
<paramtype>T&</paramtype>
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
<effects><simpara>Constructs a
|
||||||
|
<computeroutput><classname>reference_wrapper</classname></computeroutput>
|
||||||
|
object that stores a reference to
|
||||||
|
<computeroutput>t</computeroutput>.</simpara></effects>
|
||||||
|
|
||||||
|
<throws><simpara>Does not throw.</simpara></throws>
|
||||||
|
</constructor>
|
||||||
|
|
||||||
|
<method-group name="access">
|
||||||
|
<method name="conversion-operator" cv="const">
|
||||||
|
<type>T&</type>
|
||||||
|
<returns><simpara>The stored reference.</simpara></returns>
|
||||||
|
<throws><simpara>Does not throw.</simpara></throws>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<method name="get" cv="const">
|
||||||
|
<type>T&</type>
|
||||||
|
<returns><simpara>The stored reference.</simpara></returns>
|
||||||
|
<throws><simpara>Does not throw.</simpara></throws>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<method name="get_pointer" cv="const">
|
||||||
|
<type>T*</type>
|
||||||
|
<returns><simpara>A pointer to the object referenced by the stored reference.</simpara></returns>
|
||||||
|
<throws><simpara>Does not throw.</simpara></throws>
|
||||||
|
</method>
|
||||||
|
</method-group>
|
||||||
|
|
||||||
|
<free-function-group name="constructors">
|
||||||
|
<function name="ref">
|
||||||
|
<type>reference_wrapper<T></type>
|
||||||
|
<parameter name="t">
|
||||||
|
<paramtype>T&</paramtype>
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
<returns><simpara><computeroutput><classname>reference_wrapper</classname><T>(t)</computeroutput></simpara></returns>
|
||||||
|
|
||||||
|
<throws><simpara>Does not throw.</simpara></throws>
|
||||||
|
</function>
|
||||||
|
|
||||||
|
<function name="cref">
|
||||||
|
<type>reference_wrapper<T const></type>
|
||||||
|
<parameter name="t">
|
||||||
|
<paramtype>T const&</paramtype>
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
<returns><simpara><computeroutput><classname>reference_wrapper</classname><T const>(t)</computeroutput></simpara></returns>
|
||||||
|
|
||||||
|
<throws><simpara>Does not throw.</simpara></throws>
|
||||||
|
</function>
|
||||||
|
</free-function-group>
|
||||||
|
|
||||||
|
<free-function-group name="access">
|
||||||
|
<function name="unwrap_ref">
|
||||||
|
<type>unwrap_reference<T>::type&</type>
|
||||||
|
<parameter name="t">
|
||||||
|
<paramtype>T&</paramtype>
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
<returns><simpara><computeroutput><classname>unwrap_reference</classname><T>::type&(t)</computeroutput></simpara></returns>
|
||||||
|
|
||||||
|
<throws><simpara>Does not throw.</simpara></throws>
|
||||||
|
</function>
|
||||||
|
</free-function-group>
|
||||||
|
</class>
|
||||||
|
|
||||||
|
<class name="is_reference_wrapper">
|
||||||
|
<template>
|
||||||
|
<template-type-parameter name="T"/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<purpose>Determine if a type <computeroutput>T</computeroutput> is an instantiation of <computeroutput><classname>reference_wrapper</classname></computeroutput>.</purpose>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
<para>The <computeroutput>value</computeroutput> static
|
||||||
|
constant will be <computeroutput>true</computeroutput> iff the
|
||||||
|
type <computeroutput>T</computeroutput> is a specialization of
|
||||||
|
<computeroutput><classname>reference_wrapper</classname></computeroutput>.</para>
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<static-constant name="value">
|
||||||
|
<type>bool</type>
|
||||||
|
<default><emphasis>unspecified</emphasis></default>
|
||||||
|
</static-constant>
|
||||||
|
</class>
|
||||||
|
|
||||||
|
<class name="unwrap_reference">
|
||||||
|
<template>
|
||||||
|
<template-type-parameter name="T"/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<purpose>Find the type in a <computeroutput><classname>reference_wrapper</classname></computeroutput>.</purpose>
|
||||||
|
|
||||||
|
<description>
|
||||||
|
<para>The typedef <computeroutput>type</computeroutput> is
|
||||||
|
<computeroutput>T::type</computeroutput> if
|
||||||
|
<computeroutput>T</computeroutput> is a
|
||||||
|
<computeroutput><classname>reference_wrapper</classname></computeroutput>,
|
||||||
|
<computeroutput>T</computeroutput> otherwise.</para>
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef>
|
||||||
|
</class>
|
||||||
|
</namespace>
|
||||||
|
</header>
|
||||||
|
</library-reference>
|
||||||
|
|
||||||
|
<section id="ref.ack">
|
||||||
|
<title>Acknowledgements</title>
|
||||||
|
|
||||||
|
<using-namespace name="boost"/>
|
||||||
|
|
||||||
|
<para><functionname>ref</functionname> and <functionname>cref</functionname>
|
||||||
|
were originally part of the <libraryname>Tuple</libraryname> library
|
||||||
|
by Jaakko Järvi. They were "promoted to boost:: status" by
|
||||||
|
Peter Dimov because they are generally useful. Douglas Gregor and
|
||||||
|
Dave Abrahams contributed
|
||||||
|
<classname>is_reference_wrapper</classname> and
|
||||||
|
<classname>unwrap_reference</classname>. Frank Mori Hess and Ronald
|
||||||
|
Garcia contributed <functionname>boost::unwrap_ref</functionname></para>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</library>
|
||||||
@@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
#include <boost/is_placeholder.hpp>
|
#include <boost/is_placeholder.hpp>
|
||||||
#include <boost/static_assert.hpp>
|
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
{
|
{
|
||||||
@@ -34,7 +33,8 @@ template< int I > struct arg
|
|||||||
|
|
||||||
template< class T > arg( T const & /* t */ )
|
template< class T > arg( T const & /* t */ )
|
||||||
{
|
{
|
||||||
BOOST_STATIC_ASSERT( I == is_placeholder<T>::value );
|
// static assert I == is_placeholder<T>::value
|
||||||
|
typedef char T_must_be_placeholder[ I == is_placeholder<T>::value? 1: -1 ];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Boost: mem_fn.hpp documentation</title>
|
<title>Boost: mem_fn.hpp documentation</title>
|
||||||
@@ -145,7 +146,7 @@ void k(std::vector<boost::shared_ptr<X> > const & v)
|
|||||||
<p>
|
<p>
|
||||||
Yes. For simple uses, <b>mem_fn</b> provides additional functionality that the
|
Yes. For simple uses, <b>mem_fn</b> provides additional functionality that the
|
||||||
standard adaptors do not. Complicated expressions that use <b>std::bind1st</b>, <b>std::bind2nd</b>
|
standard adaptors do not. Complicated expressions that use <b>std::bind1st</b>, <b>std::bind2nd</b>
|
||||||
or <a href="http://www.boost.org/doc/libs/1_31_0/libs/compose/index.htm"><b>Boost.Compose</b></a> along with the
|
or <a href="../compose/index.htm"><b>Boost.Compose</b></a> along with the
|
||||||
standard adaptors can be rewritten using <a href="bind.html"><b>boost::bind</b></a>
|
standard adaptors can be rewritten using <a href="bind.html"><b>boost::bind</b></a>
|
||||||
that automatically takes advantage of <b>mem_fn</b>.
|
that automatically takes advantage of <b>mem_fn</b>.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"key": "bind",
|
|
||||||
"name": "Bind",
|
|
||||||
"authors": [
|
|
||||||
"Peter Dimov"
|
|
||||||
],
|
|
||||||
"description": "boost::bind is a generalization of the standard functions std::bind1st and std::bind2nd. It supports arbitrary function objects, functions, function pointers, and member function pointers, and is able to bind any argument to a specific value or route input arguments into arbitrary positions.",
|
|
||||||
"std": [
|
|
||||||
"tr1"
|
|
||||||
],
|
|
||||||
"category": [
|
|
||||||
"Function-objects"
|
|
||||||
],
|
|
||||||
"maintainers": [
|
|
||||||
"Peter Dimov <pdimov -at- pdimov.com>"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "bind/mem_fn",
|
|
||||||
"name": "Member Function",
|
|
||||||
"authors": [
|
|
||||||
"Peter Dimov"
|
|
||||||
],
|
|
||||||
"description": "Generalized binders for function/object/pointers and member functions.",
|
|
||||||
"documentation": "mem_fn.html",
|
|
||||||
"std": [
|
|
||||||
"tr1"
|
|
||||||
],
|
|
||||||
"category": [
|
|
||||||
"Function-objects"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
15
ref.html
Normal file
15
ref.html
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="refresh" content="0; URL=../../doc/html/ref.html">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
Automatic redirection failed, please go to
|
||||||
|
<a href="../../doc/html/ref.html">../../doc/html/ref.html</a>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
<!--
|
||||||
|
© Copyright Beman Dawes, 2001
|
||||||
|
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
|
||||||
|
-->
|
||||||
@@ -33,12 +33,6 @@
|
|||||||
|
|
||||||
struct X
|
struct X
|
||||||
{
|
{
|
||||||
// SGI-related compilers have odd compiler-synthesized ctors dtors
|
|
||||||
#ifdef __PATHSCALE__
|
|
||||||
X() {}
|
|
||||||
~X() {}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int operator()()
|
int operator()()
|
||||||
{
|
{
|
||||||
return 17041;
|
return 17041;
|
||||||
|
|||||||
@@ -43,11 +43,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// SGI-related compilers have odd compiler-synthesized ctors and dtors
|
|
||||||
#ifdef __PATHSCALE__
|
|
||||||
~X() {}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int state() const
|
int state() const
|
||||||
{
|
{
|
||||||
return state_;
|
return state_;
|
||||||
|
|||||||
@@ -39,128 +39,128 @@ struct X
|
|||||||
// 0
|
// 0
|
||||||
|
|
||||||
int mf0_1() { return 0; }
|
int mf0_1() { return 0; }
|
||||||
int mf0_2() { return 1; }
|
int mf0_2() { return 0; }
|
||||||
|
|
||||||
int cmf0_1() const { return 0; }
|
int cmf0_1() const { return 0; }
|
||||||
int cmf0_2() const { return 1; }
|
int cmf0_2() const { return 0; }
|
||||||
|
|
||||||
void mf0v_1() {}
|
void mf0v_1() {}
|
||||||
void mf0v_2() { static int x; ++x; }
|
void mf0v_2() {}
|
||||||
|
|
||||||
void cmf0v_1() const {}
|
void cmf0v_1() const {}
|
||||||
void cmf0v_2() const { static int x; ++x; }
|
void cmf0v_2() const {}
|
||||||
|
|
||||||
// 1
|
// 1
|
||||||
|
|
||||||
int mf1_1(int) { return 0; }
|
int mf1_1(int) { return 0; }
|
||||||
int mf1_2(int) { return 1; }
|
int mf1_2(int) { return 0; }
|
||||||
|
|
||||||
int cmf1_1(int) const { return 0; }
|
int cmf1_1(int) const { return 0; }
|
||||||
int cmf1_2(int) const { return 1; }
|
int cmf1_2(int) const { return 0; }
|
||||||
|
|
||||||
void mf1v_1(int) {}
|
void mf1v_1(int) {}
|
||||||
void mf1v_2(int) { static int x; ++x; }
|
void mf1v_2(int) {}
|
||||||
|
|
||||||
void cmf1v_1(int) const {}
|
void cmf1v_1(int) const {}
|
||||||
void cmf1v_2(int) const { static int x; ++x; }
|
void cmf1v_2(int) const {}
|
||||||
|
|
||||||
// 2
|
// 2
|
||||||
|
|
||||||
int mf2_1(int, int) { return 0; }
|
int mf2_1(int, int) { return 0; }
|
||||||
int mf2_2(int, int) { return 1; }
|
int mf2_2(int, int) { return 0; }
|
||||||
|
|
||||||
int cmf2_1(int, int) const { return 0; }
|
int cmf2_1(int, int) const { return 0; }
|
||||||
int cmf2_2(int, int) const { return 1; }
|
int cmf2_2(int, int) const { return 0; }
|
||||||
|
|
||||||
void mf2v_1(int, int) {}
|
void mf2v_1(int, int) {}
|
||||||
void mf2v_2(int, int) { static int x; ++x; }
|
void mf2v_2(int, int) {}
|
||||||
|
|
||||||
void cmf2v_1(int, int) const {}
|
void cmf2v_1(int, int) const {}
|
||||||
void cmf2v_2(int, int) const { static int x; ++x; }
|
void cmf2v_2(int, int) const {}
|
||||||
|
|
||||||
// 3
|
// 3
|
||||||
|
|
||||||
int mf3_1(int, int, int) { return 0; }
|
int mf3_1(int, int, int) { return 0; }
|
||||||
int mf3_2(int, int, int) { return 1; }
|
int mf3_2(int, int, int) { return 0; }
|
||||||
|
|
||||||
int cmf3_1(int, int, int) const { return 0; }
|
int cmf3_1(int, int, int) const { return 0; }
|
||||||
int cmf3_2(int, int, int) const { return 1; }
|
int cmf3_2(int, int, int) const { return 0; }
|
||||||
|
|
||||||
void mf3v_1(int, int, int) {}
|
void mf3v_1(int, int, int) {}
|
||||||
void mf3v_2(int, int, int) { static int x; ++x; }
|
void mf3v_2(int, int, int) {}
|
||||||
|
|
||||||
void cmf3v_1(int, int, int) const {}
|
void cmf3v_1(int, int, int) const {}
|
||||||
void cmf3v_2(int, int, int) const { static int x; ++x; }
|
void cmf3v_2(int, int, int) const {}
|
||||||
|
|
||||||
// 4
|
// 4
|
||||||
|
|
||||||
int mf4_1(int, int, int, int) { return 0; }
|
int mf4_1(int, int, int, int) { return 0; }
|
||||||
int mf4_2(int, int, int, int) { return 1; }
|
int mf4_2(int, int, int, int) { return 0; }
|
||||||
|
|
||||||
int cmf4_1(int, int, int, int) const { return 0; }
|
int cmf4_1(int, int, int, int) const { return 0; }
|
||||||
int cmf4_2(int, int, int, int) const { return 1; }
|
int cmf4_2(int, int, int, int) const { return 0; }
|
||||||
|
|
||||||
void mf4v_1(int, int, int, int) {}
|
void mf4v_1(int, int, int, int) {}
|
||||||
void mf4v_2(int, int, int, int) { static int x; ++x; }
|
void mf4v_2(int, int, int, int) {}
|
||||||
|
|
||||||
void cmf4v_1(int, int, int, int) const {}
|
void cmf4v_1(int, int, int, int) const {}
|
||||||
void cmf4v_2(int, int, int, int) const { static int x; ++x; }
|
void cmf4v_2(int, int, int, int) const {}
|
||||||
|
|
||||||
// 5
|
// 5
|
||||||
|
|
||||||
int mf5_1(int, int, int, int, int) { return 0; }
|
int mf5_1(int, int, int, int, int) { return 0; }
|
||||||
int mf5_2(int, int, int, int, int) { return 1; }
|
int mf5_2(int, int, int, int, int) { return 0; }
|
||||||
|
|
||||||
int cmf5_1(int, int, int, int, int) const { return 0; }
|
int cmf5_1(int, int, int, int, int) const { return 0; }
|
||||||
int cmf5_2(int, int, int, int, int) const { return 1; }
|
int cmf5_2(int, int, int, int, int) const { return 0; }
|
||||||
|
|
||||||
void mf5v_1(int, int, int, int, int) {}
|
void mf5v_1(int, int, int, int, int) {}
|
||||||
void mf5v_2(int, int, int, int, int) { static int x; ++x; }
|
void mf5v_2(int, int, int, int, int) {}
|
||||||
|
|
||||||
void cmf5v_1(int, int, int, int, int) const {}
|
void cmf5v_1(int, int, int, int, int) const {}
|
||||||
void cmf5v_2(int, int, int, int, int) const { static int x; ++x; }
|
void cmf5v_2(int, int, int, int, int) const {}
|
||||||
|
|
||||||
// 6
|
// 6
|
||||||
|
|
||||||
int mf6_1(int, int, int, int, int, int) { return 0; }
|
int mf6_1(int, int, int, int, int, int) { return 0; }
|
||||||
int mf6_2(int, int, int, int, int, int) { return 1; }
|
int mf6_2(int, int, int, int, int, int) { return 0; }
|
||||||
|
|
||||||
int cmf6_1(int, int, int, int, int, int) const { return 0; }
|
int cmf6_1(int, int, int, int, int, int) const { return 0; }
|
||||||
int cmf6_2(int, int, int, int, int, int) const { return 1; }
|
int cmf6_2(int, int, int, int, int, int) const { return 0; }
|
||||||
|
|
||||||
void mf6v_1(int, int, int, int, int, int) {}
|
void mf6v_1(int, int, int, int, int, int) {}
|
||||||
void mf6v_2(int, int, int, int, int, int) { static int x; ++x; }
|
void mf6v_2(int, int, int, int, int, int) {}
|
||||||
|
|
||||||
void cmf6v_1(int, int, int, int, int, int) const {}
|
void cmf6v_1(int, int, int, int, int, int) const {}
|
||||||
void cmf6v_2(int, int, int, int, int, int) const { static int x; ++x; }
|
void cmf6v_2(int, int, int, int, int, int) const {}
|
||||||
|
|
||||||
// 7
|
// 7
|
||||||
|
|
||||||
int mf7_1(int, int, int, int, int, int, int) { return 0; }
|
int mf7_1(int, int, int, int, int, int, int) { return 0; }
|
||||||
int mf7_2(int, int, int, int, int, int, int) { return 1; }
|
int mf7_2(int, int, int, int, int, int, int) { return 0; }
|
||||||
|
|
||||||
int cmf7_1(int, int, int, int, int, int, int) const { return 0; }
|
int cmf7_1(int, int, int, int, int, int, int) const { return 0; }
|
||||||
int cmf7_2(int, int, int, int, int, int, int) const { return 1; }
|
int cmf7_2(int, int, int, int, int, int, int) const { return 0; }
|
||||||
|
|
||||||
void mf7v_1(int, int, int, int, int, int, int) {}
|
void mf7v_1(int, int, int, int, int, int, int) {}
|
||||||
void mf7v_2(int, int, int, int, int, int, int) { static int x; ++x; }
|
void mf7v_2(int, int, int, int, int, int, int) {}
|
||||||
|
|
||||||
void cmf7v_1(int, int, int, int, int, int, int) const {}
|
void cmf7v_1(int, int, int, int, int, int, int) const {}
|
||||||
void cmf7v_2(int, int, int, int, int, int, int) const { static int x; ++x; }
|
void cmf7v_2(int, int, int, int, int, int, int) const {}
|
||||||
|
|
||||||
// 8
|
// 8
|
||||||
|
|
||||||
int mf8_1(int, int, int, int, int, int, int, int) { return 0; }
|
int mf8_1(int, int, int, int, int, int, int, int) { return 0; }
|
||||||
int mf8_2(int, int, int, int, int, int, int, int) { return 1; }
|
int mf8_2(int, int, int, int, int, int, int, int) { return 0; }
|
||||||
|
|
||||||
int cmf8_1(int, int, int, int, int, int, int, int) const { return 0; }
|
int cmf8_1(int, int, int, int, int, int, int, int) const { return 0; }
|
||||||
int cmf8_2(int, int, int, int, int, int, int, int) const { return 1; }
|
int cmf8_2(int, int, int, int, int, int, int, int) const { return 0; }
|
||||||
|
|
||||||
void mf8v_1(int, int, int, int, int, int, int, int) {}
|
void mf8v_1(int, int, int, int, int, int, int, int) {}
|
||||||
void mf8v_2(int, int, int, int, int, int, int, int) { static int x; ++x; }
|
void mf8v_2(int, int, int, int, int, int, int, int) {}
|
||||||
|
|
||||||
void cmf8v_1(int, int, int, int, int, int, int, int) const {}
|
void cmf8v_1(int, int, int, int, int, int, int, int) const {}
|
||||||
void cmf8v_2(int, int, int, int, int, int, int, int) const { static int x; ++x; }
|
void cmf8v_2(int, int, int, int, int, int, int, int) const {}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user