Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67548 - sandbox/chrono/libs/mpl/doc/src/refmanual
From: vicente.botet_at_[hidden]
Date: 2011-01-01 14:56:55


Author: viboes
Date: 2011-01-01 14:56:53 EST (Sat, 01 Jan 2011)
New Revision: 67548
URL: http://svn.boost.org/trac/boost/changeset/67548

Log:
StaticInteger: Add _c doc
Added:
   sandbox/chrono/libs/mpl/doc/src/refmanual/abs_c.rst (contents, props changed)
   sandbox/chrono/libs/mpl/doc/src/refmanual/gcd_c.rst (contents, props changed)
   sandbox/chrono/libs/mpl/doc/src/refmanual/lcm_c.rst (contents, props changed)
   sandbox/chrono/libs/mpl/doc/src/refmanual/sign_c.rst (contents, props changed)
Text files modified:
   sandbox/chrono/libs/mpl/doc/src/refmanual/NumericMetafunction.rst | 5 +++++
   1 files changed, 5 insertions(+), 0 deletions(-)

Modified: sandbox/chrono/libs/mpl/doc/src/refmanual/NumericMetafunction.rst
==============================================================================
--- sandbox/chrono/libs/mpl/doc/src/refmanual/NumericMetafunction.rst (original)
+++ sandbox/chrono/libs/mpl/doc/src/refmanual/NumericMetafunction.rst 2011-01-01 14:56:53 EST (Sat, 01 Jan 2011)
@@ -135,6 +135,11 @@
 * |abs|
 * |sign|
 * |gcd|
+* |lcm|
+* |abs_c|
+* |sign_c|
+* |gcd_c|
+* |lcm_c|
 
 
 See also

Added: sandbox/chrono/libs/mpl/doc/src/refmanual/abs_c.rst
==============================================================================
--- (empty file)
+++ sandbox/chrono/libs/mpl/doc/src/refmanual/abs_c.rst 2011-01-01 14:56:53 EST (Sat, 01 Jan 2011)
@@ -0,0 +1,116 @@
+.. Metafunctions/Arithmetic Operations//abs_c |120
+
+abs_c
+=====
+
+Synopsis
+--------
+
+.. parsed-literal::
+
+ template<
+ typename T
+ >
+ struct abs_c
+ {
+ typedef |unspecified| type;
+ };
+
+
+
+Description
+-----------
+
+Returns the absolute value of its argument and differs only from |abs| in the way the parameters are specified.
+
+
+Header
+------
+
+.. parsed-literal::
+
+ #include <boost/mpl/abs.hpp>
+ #include <boost/mpl/arithmetic.hpp>
+
+
+Model of
+--------
+
+|Numeric Metafunction|
+
+
+Parameters
+----------
+
++---------------+-------------------------------+----------------------------------+
+| Parameter | Requirement | Description |
++===============+===============================+==================================+
+| ``T`` | An integral type | Operation's argument value type. |
++---------------+-------------------------------+----------------------------------+
+| ``N`` | An integral constant | Operation's argument. |
++---------------+-------------------------------+----------------------------------+
+
+|Note:| |numeric metafunction note| |-- end note|
+
+
+Expression semantics
+--------------------
+
+For any Integral Type ``t`` and integral constant ``n`` of type ``t``:
+
+.. parsed-literal::
+
+ typedef abs_c<t,n>::type r;
+
+:Return type:
+ |Integral Constant|.
+
+:Semantics:
+ Equivalent to
+
+ .. parsed-literal::
+
+ typedef abs<integral_c<t,n> > r;
+
+.. ..........................................................................
+
+.. parsed-literal::
+
+ typedef abs_c<t,n> r;
+
+:Return type:
+ |Integral Constant|.
+
+:Semantics:
+ Equivalent to
+
+ .. parsed-literal::
+
+ struct r : abs_c<t,n>::type {};
+
+
+Complexity
+----------
+
+Amortized constant time.
+
+
+Example
+-------
+
+.. parsed-literal::
+
+ typedef abs_c< int, -10 >::type r;
+ BOOST_MPL_ASSERT_RELATION( r::value, ==, 10 );
+ BOOST_MPL_ASSERT(( is_same< r::value_type, int > ));
+
+
+See also
+--------
+
+|Arithmetic Operations|, |Numeric Metafunction|, |numeric_cast|, |abs|
+
+
+.. copyright:: Copyright © 2010 Vicente J. Botet Escriba
+ 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)

Added: sandbox/chrono/libs/mpl/doc/src/refmanual/gcd_c.rst
==============================================================================
--- (empty file)
+++ sandbox/chrono/libs/mpl/doc/src/refmanual/gcd_c.rst 2011-01-01 14:56:53 EST (Sat, 01 Jan 2011)
@@ -0,0 +1,130 @@
+.. Metafunctions/Arithmetic Operations//gcd_c |130
+
+gcd_c
+=====
+
+Synopsis
+--------
+
+.. parsed-literal::
+
+ template<
+ typename T
+ T N1
+ , T N2
+ , T N3 = |unspecified|
+ |...|
+ , T N\ *n* = |unspecified|
+ >
+ struct gcd_c
+ {
+ typedef |unspecified| type;
+ };
+
+
+
+Description
+-----------
+
+Returns the greatest common divisor (gcd) of its arguments and differs only from |gcd| in the way the parameters are specified.
+
+
+Header
+------
+
+.. parsed-literal::
+
+ #include <boost/mpl/gcd.hpp>
+ #include <boost/mpl/arithmetic.hpp>
+
+
+Model of
+--------
+
+|Numeric Metafunction|
+
+
+
+Parameters
+----------
+
++---------------+-------------------------------+-----------------------------------+
+| Parameter | Requirement | Description |
++===============+===============================+===================================+
+| ``T`` | An integral type | Operation's arguments value type. |
++---------------+-------------------------------+-----------------------------------+
+| ``N1...Nn`` | An integral constant | Operation's arguments. |
++---------------+-------------------------------+-----------------------------------+
+
+|Note:| |numeric metafunction note| |-- end note|
+
+
+Expression semantics
+--------------------
+
+For any Integral Type ``t`` and integral constants |c1...cn| of type ``t``:
+
+
+.. parsed-literal::
+
+ typedef gcd_c<t, c1,\ |...|\ c\ *n*\>::type r;
+
+:Return type:
+ |Integral Constant|.
+
+:Semantics:
+ Equivalent to
+
+ .. parsed-literal::
+
+ typedef gcd<
+ integral_c<T,c1>,
+ integral_c<T,c2>,
+ ...,
+ integral_c<T,cn>
+ >::type r;
+
+.. ..........................................................................
+
+.. parsed-literal::
+
+ typedef gcd_c<t, c1,\ |...|\ c\ *n*\>r;
+
+:Return type:
+ |Integral Constant|.
+
+:Semantics:
+ Equivalent to
+
+ .. parsed-literal::
+
+ struct r : gcd_c<t, c1,\ |...|\ c\ *n*\>::type {};
+
+
+
+
+Complexity
+----------
+
+Amortized constant time.
+
+
+Example
+-------
+
+.. parsed-literal::
+
+ typedef gcd_c<int, 10, 4, 6>::type r;
+ BOOST_MPL_ASSERT_RELATION( r::value, ==, 2 );
+ BOOST_MPL_ASSERT(( is_same< r::value_type, long > ));
+
+
+See also
+--------
+
+|Arithmetic Operations|, |Numeric Metafunction|, |numeric_cast|, |gcd|
+
+
+.. copyright:: Copyright © 2010 Vicente J. Botet Escriba
+ 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)

Added: sandbox/chrono/libs/mpl/doc/src/refmanual/lcm_c.rst
==============================================================================
--- (empty file)
+++ sandbox/chrono/libs/mpl/doc/src/refmanual/lcm_c.rst 2011-01-01 14:56:53 EST (Sat, 01 Jan 2011)
@@ -0,0 +1,130 @@
+.. Metafunctions/Arithmetic Operations//lcm_c |140
+
+lcm_c
+=====
+
+Synopsis
+--------
+
+.. parsed-literal::
+
+ template<
+ typename T
+ T N1
+ , T N2
+ , T N3 = |unspecified|
+ |...|
+ , T N\ *n* = |unspecified|
+ >
+ struct lcm_c
+ {
+ typedef |unspecified| type;
+ };
+
+
+
+Description
+-----------
+
+Returns the least common multiple (lcm) of its arguments of its arguments and differs only from |lcm| in the way the parameters are specified.
+
+
+Header
+------
+
+.. parsed-literal::
+
+ #include <boost/mpl/lcm.hpp>
+ #include <boost/mpl/arithmetic.hpp>
+
+
+Model of
+--------
+
+|Numeric Metafunction|
+
+
+
+Parameters
+----------
+
++---------------+-------------------------------+-----------------------------------+
+| Parameter | Requirement | Description |
++===============+===============================+===================================+
+| ``T`` | An integral type | Operation's arguments value type. |
++---------------+-------------------------------+-----------------------------------+
+| ``N1...Nn`` | An integral constant | Operation's arguments. |
++---------------+-------------------------------+-----------------------------------+
+
+|Note:| |numeric metafunction note| |-- end note|
+
+
+Expression semantics
+--------------------
+
+For any Integral Type ``t`` and integral constants |c1...cn| of type ``t``:
+
+
+.. parsed-literal::
+
+ typedef lcm_c<t, c1,\ |...|\ c\ *n*\>::type r;
+
+:Return type:
+ |Integral Constant|.
+
+:Semantics:
+ Equivalent to
+
+ .. parsed-literal::
+
+ typedef lcm<
+ integral_c<T,c1>,
+ integral_c<T,c2>,
+ ...,
+ integral_c<T,cn>
+ >::type r;
+
+.. ..........................................................................
+
+.. parsed-literal::
+
+ typedef lcm<t, c1,\ |...|\ c\ *n*\> r;
+
+:Return type:
+ |Integral Constant|.
+
+:Semantics:
+ Equivalent to
+
+ .. parsed-literal::
+
+ struct r : lcm_c<t, c1,\ |...|\ c\ *n*\>::type {};
+
+
+
+
+Complexity
+----------
+
+Amortized constant time.
+
+
+Example
+-------
+
+.. parsed-literal::
+
+ typedef lcm< int, 10, 4, 6>::type r;
+ BOOST_MPL_ASSERT_RELATION( r::value, ==, 60 );
+ BOOST_MPL_ASSERT(( is_same< r::value_type, long > ));
+
+
+See also
+--------
+
+|Arithmetic Operations|, |Numeric Metafunction|, |numeric_cast|, |lcm|
+
+
+.. copyright:: Copyright © 2010 Vicente J. Botet Escriba
+ 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)

Added: sandbox/chrono/libs/mpl/doc/src/refmanual/sign_c.rst
==============================================================================
--- (empty file)
+++ sandbox/chrono/libs/mpl/doc/src/refmanual/sign_c.rst 2011-01-01 14:56:53 EST (Sat, 01 Jan 2011)
@@ -0,0 +1,117 @@
+.. Metafunctions/Arithmetic Operations//sign_c |110
+
+sign_c
+======
+
+Synopsis
+--------
+
+.. parsed-literal::
+
+ template<
+ typename T
+ T N
+ >
+ struct sign_c
+ {
+ typedef |unspecified| type;
+ };
+
+
+
+Description
+-----------
+
+Returns the sign of its argument and differs only from |sign| in the way the parameters are specified.
+
+
+Header
+------
+
+.. parsed-literal::
+
+ #include <boost/mpl/sign.hpp>
+ #include <boost/mpl/arithmetic.hpp>
+
+
+Model of
+--------
+
+|Numeric Metafunction|
+
+
+Parameters
+----------
+
++---------------+-------------------------------+----------------------------------+
+| Parameter | Requirement | Description |
++===============+===============================+==================================+
+| ``T`` | An integral type | Operation's argument value type. |
++---------------+-------------------------------+----------------------------------+
+| ``N`` | An integral constant | Operation's argument. |
++---------------+-------------------------------+----------------------------------+
+
+|Note:| |numeric metafunction note| |-- end note|
+
+
+Expression semantics
+--------------------
+
+For any Integral Type ``t`` and integral constant ``n`` of type ``t``:
+
+.. parsed-literal::
+
+ typedef sign_c<t,n>::type r;
+
+:Return type:
+ |Integral Constant|.
+
+:Semantics:
+ Equivalent to
+
+ .. parsed-literal::
+
+ typedef sign< integral_c<t,n> > r;
+
+.. ..........................................................................
+
+.. parsed-literal::
+
+ typedef sign_c<t,n> r;
+
+:Return type:
+ |Integral Constant|.
+
+:Semantics:
+ Equivalent to
+
+ .. parsed-literal::
+
+ struct r : sign_c<t,n>::type {};
+
+
+Complexity
+----------
+
+Amortized constant time.
+
+
+Example
+-------
+
+.. parsed-literal::
+
+ typedef sign_c< int, -10 >::type r;
+ BOOST_MPL_ASSERT_RELATION( r::value, ==, -1 );
+ BOOST_MPL_ASSERT(( is_same< r::value_type, int > ));
+
+
+See also
+--------
+
+|Arithmetic Operations|, |Numeric Metafunction|, |numeric_cast|, |sign|
+
+
+.. copyright:: Copyright © 2010 Vicente J. Botet Escriba
+ 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)


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk