Compare commits

..

1 Commits

Author SHA1 Message Date
Beman Dawes 31abcf3dc3 Release 1.37.0
[SVN r49549]
2008-11-03 12:44:25 +00:00
560 changed files with 8288 additions and 13895 deletions
-175
View File
@@ -1,175 +0,0 @@
# Copyright 2016 Peter Dimov
# Copyright 2017, 2018 James E. King III
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
#
# Generic Travis CI build script for boostorg repositories
# See: https://github.com/jeking3/boost-ci
#
# Instructions for customizing this script for your library:
#
# 1. Customize the compilers and language levels you want in the 'jobs'.
# 2. If you have more than include/, src/, test/, example/, examples/, or
# tools/ directories, modify your Travis CI project and add the environment
# variable DEPINST. For example if your build uses code in "bench/" and
# "fog/" directories, then set DEPINST to the following:
# --include bench --include fog
# 3. If you want to enable Coverity Scan, you need to provide the environment
# variables COVERITY_SCAN_TOKEN and COVERITY_SCAN_NOTIFICATION_EMAIL in
# your github settings.
# 4. Enable pull request builds in your boostorg/<library> account.
#
# That's it - the scripts will do everything else for you.
sudo: false
dist: trusty
language: cpp
env:
global:
# see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties
# to use the default for a given environment, comment it out; recommend you build debug and release however..
# - B2_ADDRESS_MODEL=address-model=64,32
# - B2_LINK=link=shared,static
# - B2_THREADING=threading=multi,single
- B2_VARIANT=variant=release,debug
install:
- git clone https://github.com/jeking3/boost-ci.git boost-ci
- cp -pr boost-ci/ci boost-ci/.codecov.yml .
- source ci/travis/install.sh
addons:
apt:
packages:
- binutils-gold
- gdb
- libc6-dbg
branches:
only:
- develop
- master
script:
- cd $BOOST_ROOT/libs/$SELF
- ci/travis/build.sh
#
# Default toolsets in Ubuntu
#
# trusty xenial bionic
# 14.04 16.04 18.04
# ------ ------ ------
# clang 3.4 3.8 6.0
# gcc 4.8.2 5.3.1 7.3.0
#
anchors:
clang-34: &clang-34 { apt: { packages: [ "clang-3.4" ], sources: [ "llvm-toolchain-trusty-3.4" ] } }
clang-38: &clang-38 { apt: { packages: [ "clang-3.8",
"libstdc++-6-dev" ], sources: [ "llvm-toolchain-trusty-3.8",
"ubuntu-toolchain-r-test" ] } }
clang-4: &clang-4 { apt: { packages: [ "clang-4.0",
"libstdc++-6-dev" ], sources: [ "llvm-toolchain-trusty-4.0",
"ubuntu-toolchain-r-test" ] } }
clang-5: &clang-5 { apt: { packages: [ "clang-5.0",
"libstdc++-7-dev" ], sources: [ "llvm-toolchain-trusty-5.0",
"ubuntu-toolchain-r-test" ] } }
clang-6: &clang-6 { apt: { packages: [ "clang-6.0",
"libc++-dev",
"libstdc++-8-dev",
"valgrind" ], sources: [ "llvm-toolchain-trusty-6.0",
"ubuntu-toolchain-r-test" ] } }
gcc-44: &gcc-44 { apt: { packages: [ "g++-4.4" ], sources: [ "ubuntu-toolchain-r-test" ] } }
gcc-46: &gcc-46 { apt: { packages: [ "g++-4.6" ], sources: [ "ubuntu-toolchain-r-test" ] } }
gcc-48: &gcc-48 { apt: { packages: [ "g++-4.8" ], sources: [ "ubuntu-toolchain-r-test" ] } }
gcc-5: &gcc-5 { apt: { packages: [ "g++-5" ], sources: [ "ubuntu-toolchain-r-test" ] } }
gcc-6: &gcc-6 { apt: { packages: [ "g++-6" ], sources: [ "ubuntu-toolchain-r-test" ] } }
gcc-7: &gcc-7 { apt: { packages: [ "g++-7" ], sources: [ "ubuntu-toolchain-r-test" ] } }
gcc-8: &gcc-8 { apt: { packages: [ "g++-8" ], sources: [ "ubuntu-toolchain-r-test" ] } }
jobs:
allow_failures:
- env:
- COPY="all the environment settings from your job"
include:
# libstdc++
- { os: "linux", env: [ "TOOLSET=gcc-4.4", "CXXSTD=98,0x" ], addons: *gcc-44 }
- { os: "linux", env: [ "TOOLSET=gcc-4.6", "CXXSTD=03,0x" ], addons: *gcc-46 }
- { os: "linux", env: [ "TOOLSET=gcc-4.8", "CXXSTD=03,11" ], addons: *gcc-48 }
- { os: "linux", env: [ "TOOLSET=gcc-5", "CXXSTD=03,11" ], addons: *gcc-5 }
- { os: "linux", env: [ "TOOLSET=gcc-6", "CXXSTD=03,11,14" ], addons: *gcc-6 }
- { os: "linux", env: [ "TOOLSET=gcc-7", "CXXSTD=03,11,14,17" ], addons: *gcc-7 }
- { os: "linux", env: [ "TOOLSET=gcc-8", "CXXSTD=03,11,14,17,2a" ], addons: *gcc-8 }
- { os: "linux", env: [ "TOOLSET=clang-3.4", "CXXSTD=03,11" ], addons: *clang-34 }
- { os: "linux", env: [ "TOOLSET=clang-3.8", "CXXSTD=03,11,14" ], addons: *clang-38 }
- { os: "linux", env: [ "TOOLSET=clang-4.0", "CXXSTD=03,11,14" ], addons: *clang-4 }
- { os: "linux", env: [ "TOOLSET=clang-5.0", "CXXSTD=03,11,14,17" ], addons: *clang-5 }
- { os: "linux", env: [ "TOOLSET=clang-6.0", "CXXSTD=03,11,14,17,2a" ], addons: *clang-6 }
# libc++
- { os: "linux", env: [ "TOOLSET=clang-6.0", "CXXSTD=03,11,14,17,2a",
"CXXFLAGS=-stdlib=libc++" ], addons: *clang-6 }
# the rvm environment on osx is taking over basic commands like "cd" and breaking things!
# - { os: "osx" , env: [ "COMMENT=libc++",
# "TOOLSET=clang", "CXXSTD=03,11,14" ] }
- os: linux
env:
- COMMENT=codecov.io
- TOOLSET=gcc-7
- DEFINES="define=BOOST_NO_STRESS_TEST=1"
addons: *gcc-7
script:
- pushd /tmp && git clone https://github.com/linux-test-project/lcov.git && export PATH=/tmp/lcov/bin:$PATH && which lcov && lcov --version && popd
- cd $BOOST_ROOT/libs/$SELF
- ci/travis/codecov.sh
- os: linux
env:
- COMMENT=cppcheck
script:
- cd $BOOST_ROOT/libs/$SELF
- ci/travis/cppcheck.sh
- os: linux
env:
- COMMENT=ubsan
- B2_VARIANT=variant=debug
- TOOLSET=gcc-8
- CXXSTD=03,11,14,17,2a
- DEFINES="define=BOOST_NO_STRESS_TEST=1"
- CXXFLAGS="cxxflags=-fno-omit-frame-pointer cxxflags=-fsanitize=undefined cxxflags=-fno-sanitize-recover=undefined"
- LINKFLAGS="linkflags=-fsanitize=undefined linkflags=-fno-sanitize-recover=undefined linkflags=-fuse-ld=gold"
- UBSAN_OPTIONS=print_stacktrace=1
addons: *gcc-8
- os: linux
env:
- COMMENT=valgrind
- TOOLSET=clang-6.0
- CXXSTD=03,11,14,17,2a
- DEFINES="define=BOOST_NO_STRESS_TEST=1"
- B2_VARIANT=variant=debug
- TESTFLAGS=testing.launcher=valgrind
- VALGRIND_OPTS=--error-exitcode=1
addons: *clang-6
#################### Jobs to run on pushes to master, develop ###################
# Coverity Scan
- os: linux
if: (env(COVERITY_SCAN_NOTIFICATION_EMAIL) IS present) AND (branch IN (develop, master)) AND (type IN (cron, push))
env:
- COMMENT="Coverity Scan"
- TOOLSET=gcc-7
addons: *gcc-7
script:
- cd $BOOST_ROOT/libs/$SELF
- ci/travis/coverity.sh
notifications:
email:
false
-11
View File
@@ -1,11 +0,0 @@
# Boost.MPL Library Jamfile
#
# Copyright (c) 2018 James E. King III
#
# Use, modification, and distribution are subject to 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)
# please order by name to ease maintenance
build-project example ;
build-project test ;
-23
View File
@@ -1,23 +0,0 @@
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-34
View File
@@ -1,34 +0,0 @@
MPL, part of collection of the [Boost C++ Libraries](http://github.com/boostorg), provides a general-purpose, high-level C++ template metaprogramming framework of compile-time algorithms, sequences and metafunctions.
### License
Distributed under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt).
### Properties
* C++03
* Header Only
### Build Status
Branch | Travis | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests |
:-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- |
[`master`](https://github.com/boostorg/mpl/tree/master) | [![Build Status](https://travis-ci.org/boostorg/mpl.svg?branch=master)](https://travis-ci.org/boostorg/mpl) | [![Build status](https://ci.appveyor.com/api/projects/status/lx9pjj2ixqod6flb/branch/master?svg=true)](https://ci.appveyor.com/project/jeking3/mpl-nrhfm/branch/master) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/15866/badge.svg)](https://scan.coverity.com/projects/boostorg-mpl) | [![codecov](https://codecov.io/gh/boostorg/mpl/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/mpl/branch/master)| [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/mpl.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/doc/html/mpl.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/mpl.html)
[`develop`](https://github.com/boostorg/mpl/tree/develop) | [![Build Status](https://travis-ci.org/boostorg/mpl.svg?branch=develop)](https://travis-ci.org/boostorg/mpl) | [![Build status](https://ci.appveyor.com/api/projects/status/lx9pjj2ixqod6flb/branch/develop?svg=true)](https://ci.appveyor.com/project/jeking3/mpl-nrhfm/branch/develop) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/15866/badge.svg)](https://scan.coverity.com/projects/boostorg-mpl) | [![codecov](https://codecov.io/gh/boostorg/mpl/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/mpl/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/mpl.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/doc/html/mpl.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/mpl.html)
### Directories
| Name | Purpose |
| ----------- | ------------------------------ |
| `doc` | documentation |
| `example` | examples |
| `include` | headers |
| `test` | unit tests |
### More information
* [Ask questions](http://stackoverflow.com/questions/ask?tags=c%2B%2B,boost,boost-mpl)
* [Report bugs](https://github.com/boostorg/mpl/issues): Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.
* Submit your patches as pull requests against **develop** branch. Note that by submitting patches you agree to license your modifications under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt).
* Discussions about the library are held on the [Boost developers mailing list](http://www.boost.org/community/groups.html#main). Be sure to read the [discussion policy](http://www.boost.org/community/policy.html) before posting and add the `[mpl]` tag at the beginning of the subject line.
-126
View File
@@ -1,126 +0,0 @@
# Copyright 2016, 2017 Peter Dimov
# Copyright (C) 2017, 2018 James E. King III
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
#
# Generic Appveyor build script for boostorg repositories
# See: https://github.com/jeking3/boost-ci/
#
# Instructions for customizing this script for your library:
#
# 1. Customize the compilers and language levels you want.
# 2. If you have move than include/, src/, test/, example/, examples/,
# benchmark/ or tools/ directories, set the environment variable DEPINST.
# For example if your build uses code in "bench/" and "fog/" directories:
# - DEPINST: --include bench --include fog
# 3. Enable pull request builds in your boostorg/<library> account.
#
# That's it - the script will do everything else for you.
#
version: 1.0.{build}-{branch}
shallow_clone: true
branches:
only:
- develop
- master
matrix:
# Adding MAYFAIL to any matrix job allows it to fail but the build stays green:
allow_failures:
- MAYFAIL: true
environment:
global:
# see: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html#bbv2.overview.invocation.properties
# to use the default for a given environment, comment it out; recommend you build debug and release however:
# on Windows it is important to exercise all the possibilities, especially shared vs static, however most
# libraries that care about this exercise it in their Jamfiles...
# B2_ADDRESS_MODEL: address-model=64,32
# B2_LINK: link=shared,static
# B2_THREADING: threading=multi,single
B2_VARIANT: variant=release,debug
matrix:
- FLAVOR: Visual Studio 2017 C++2a Strict
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: msvc-14.1
B2_ADDRESS_MODEL: address-model=64
CXXFLAGS: cxxflags=-permissive-
CXXSTD: latest # 2a
- FLAVOR: Visual Studio 2017 C++17
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: msvc-14.1
B2_ADDRESS_MODEL: address-model=64
CXXSTD: 17
- FLAVOR: Visual Studio 2017 C++14 (Default)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
TOOLSET: msvc-14.1
B2_ADDRESS_MODEL: address-model=64,32
- FLAVOR: Visual Studio 2015 C++14 (Default)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
TOOLSET: msvc-14.0
B2_ADDRESS_MODEL: address-model=64,32
- FLAVOR: Visual Studio 2010, 2012, 2013
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
TOOLSET: msvc-10.0,msvc-11.0,msvc-12.0
- FLAVOR: cygwin (32-bit)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ADDPATH: C:\cygwin\bin;
B2_ADDRESS_MODEL: address-model=32
CXXSTD: 03,11
# https://github.com/boostorg/test/issues/144
DEFINES: define=_POSIX_C_SOURCE=200112L
THREADING: threadapi=pthread
TOOLSET: gcc
- FLAVOR: cygwin (64-bit)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ADDPATH: C:\cygwin64\bin;
B2_ADDRESS_MODEL: address-model=64
CXXSTD: 11,17
# https://github.com/boostorg/test/issues/144
DEFINES: define=_POSIX_C_SOURCE=200112L define=__USE_ISOC99
THREADING: threadapi=pthread
TOOLSET: gcc
- FLAVOR: mingw32
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH: i686
B2_ADDRESS_MODEL: address-model=32
CXXSTD: 03,11
SCRIPT: ci\appveyor\mingw.bat
- FLAVOR: mingw64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH: x86_64
B2_ADDRESS_MODEL: address-model=64
CXXSTD: 11,17
DEFINES: define=__USE_ISOC99
SCRIPT: ci\appveyor\mingw.bat
install:
- set SELF=%APPVEYOR_PROJECT_NAME:-=_%
- git clone https://github.com/jeking3/boost-ci.git C:\boost-ci
- xcopy /s /e /q /i C:\boost-ci\ci .\ci
- ci\appveyor\install.bat
build: off
test_script:
- set SELF=%APPVEYOR_PROJECT_NAME:-=_%
- PATH=%ADDPATH%%PATH%
# The definition of TOOLCXX omits CXXSTD= if it was not defined above
- IF NOT DEFINED CXXSTD (SET TOOLCXX=toolset=%TOOLSET%) ELSE (SET TOOLCXX=toolset=%TOOLSET% cxxstd=%CXXSTD%)
# Echo the complete build command to the build log
- IF NOT DEFINED SCRIPT (ECHO b2 libs/%SELF:\=/% %TOOLCXX% %CXXFLAGS% %DEFINES% %THREADING% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3)
# Now go build...
- IF DEFINED SCRIPT (call libs\%SELF%\%SCRIPT%) ELSE (b2 libs/%SELF:\=/% %TOOLCXX% %CXXFLAGS% %DEFINES% %THREADING% %B2_ADDRESS_MODEL% %B2_LINK% %B2_THREADING% %B2_VARIANT% -j3)
+1 -1
View File
@@ -35,7 +35,7 @@ metafunctions. It provides a conceptual foundation and an extensive
set of powerful and coherent tools that make doing explict metaprogramming
in C++ as easy and enjoyable as possible within the current language.</p>
<p>There are several places to start when getting familiar with the library,
depending on what you know about metaprogramming in general and
depending on what your know about metaprogramming in general and
C++ template metaprogramming in particular. Starting with
Boost version 1.32, the MPL comes with both an <a class="reference" href="./tutorial/tutorial-metafunctions.html">in-depth tutorial</a> on its
fundamental concepts and an annotated <a class="reference" href="./tutorial/reference-manual.html">reference manual</a> covering all concepts
+24 -22
View File
@@ -1,50 +1,52 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual</title>
<meta name="copyright" content="Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams" />
<meta name="copyright" content="Copyright © Aleksey Gurtovoy and David Abrahams, 2001-2005." />
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<div class="document" id="the-mpl-reference-manual">
<h1 class="title">The MPL Reference Manual</h1>
<table class="docinfo" frame="void" rules="none">
<col class="docinfo-name" />
<col class="docinfo-content" />
<tbody valign="top">
<tr><th class="docinfo-name">Copyright:</th>
<td>Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</td></tr>
<tr class="field"><th class="docinfo-name">License:</th><td class="field-body">Distributed under the Boost Software License, Version 1.0. (See
accompanying file <tt class="literal"><span class="pre">LICENSE_1_0.txt</span></tt> or copy at
<a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</td>
<td>Copyright © Aleksey Gurtovoy and David Abrahams, 2001-2005.</td></tr>
<tr class="field"><th class="docinfo-name">License:</th><td class="field-body">Distributed under the Boost Software License, Version 1.0. (See
accompanying file <tt class="literal"><span class="pre">LICENSE_1_0.txt</span></tt> or copy at
<a class="reference" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</td>
</tr>
</tbody>
</table>
<!-- TOC copyright: -->
<div class="document" id="the-mpl-reference-manual">
<!-- no .. section-numbering:: -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./refmanual/sequences.html" id="id1393">Sequences</a></li>
<li><a class="reference internal" href="./refmanual/iterators.html" id="id1448">Iterators</a></li>
<li><a class="reference internal" href="./refmanual/algorithms.html" id="id1460">Algorithms</a></li>
<li><a class="reference internal" href="./refmanual/metafunctions.html" id="id1510">Metafunctions</a></li>
<li><a class="reference internal" href="./refmanual/data-types.html" id="id1572">Data Types</a></li>
<li><a class="reference internal" href="./refmanual/macros.html" id="id1586">Macros</a></li>
<li><a class="reference internal" href="./refmanual/terminology.html" id="id1610">Terminology</a></li>
<li><a class="reference internal" href="./refmanual/categorized-index.html" id="id1611">Categorized Index</a></li>
<li><a class="reference internal" href="./refmanual/acknowledgements.html" id="id1614">Acknowledgements</a></li>
<li><a class="reference internal" href="./refmanual/refmanual_toc.html">Full TOC</a></li>
<li><a class="reference" href="./refmanual/sequences.html" id="id322" name="id322">Sequences</a></li>
<li><a class="reference" href="./refmanual/iterators.html" id="id376" name="id376">Iterators</a></li>
<li><a class="reference" href="./refmanual/algorithms.html" id="id388" name="id388">Algorithms</a></li>
<li><a class="reference" href="./refmanual/metafunctions.html" id="id436" name="id436">Metafunctions</a></li>
<li><a class="reference" href="./refmanual/data-types.html" id="id496" name="id496">Data Types</a></li>
<li><a class="reference" href="./refmanual/macros.html" id="id509" name="id509">Macros</a></li>
<li><a class="reference" href="./refmanual/terminology.html" id="id529" name="id529">Terminology</a></li>
<li><a class="reference" href="./refmanual/categorized-index.html" id="id530" name="id530">Categorized Index</a></li>
<li><a class="reference" href="./refmanual/acknowledgements.html" id="id533" name="id533">Acknowledgements</a></li>
<li><a class="reference" href="./refmanual/refmanual_toc.html">Full TOC</a></li>
</ul>
<!-- workaround weird substitution bug (used to work!): -->
<!-- workaround weird substitution bug (works with t's!): -->
<!-- "[*Note:*" instead of "|Note:|" to workaround another subst. bug -->
</div>
<div class="footer">
<hr class="footer" />
Generated on: 2010-08-09 18:21 UTC.
Generated by <a class="reference external" href="http://docutils.sourceforge.net/" target="_top">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html" target="_top">reStructuredText</a> source.
<div class="footer">
Generated on: 2004-11-15 12:15 UTC.
Generated by <a class="reference" href="http://docutils.sourceforge.net/" target="_top">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html" target="_top">reStructuredText</a> source.
</div>
</body>
</html>
+32 -31
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: accumulate</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./iteration-algorithms.html" class="navigation-link">Iteration Algorithms</a> / <a href="./accumulate.html" class="navigation-link">accumulate</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="accumulate">
<h1><a class="toc-backref" href="./iteration-algorithms.html#id1473">accumulate</a></h1>
<div class="section" id="id527">
<h1><a class="toc-backref" href="./iteration-algorithms.html#id401" name="accumulate">accumulate</a></h1>
<div class="section" id="accumulate-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -27,36 +30,36 @@ struct <a href="./accumulate.html" class="identifier">accumulate</a>
};
</pre>
</div>
<div class="section" id="id528">
<div class="section" id="accumulate-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the result of the successive application of binary <tt class="literal"><span class="pre">ForwardOp</span></tt> to the
result of the previous <tt class="literal"><span class="pre">ForwardOp</span></tt> invocation (<tt class="literal"><span class="pre">State</span></tt> if it's the first call)
and every element of the sequence in the range [<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;Sequence&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;Sequence&gt;::type</span></tt>) in order.
[<em>Note:</em> <tt class="literal"><span class="pre"><a href="./accumulate.html" class="identifier">accumulate</a></span></tt> is a synonym for <a class="reference internal" href="./fold.html">fold</a><em>end note</em>]</p>
<p>Returns the result of the successive application of binary <tt class="literal"><span class="pre">ForwardOp</span></tt> to the
result of the previous <tt class="literal"><span class="pre">ForwardOp</span></tt> invocation (<tt class="literal"><span class="pre">State</span></tt> if it's the first call)
and every element of the sequence in the range [<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;Sequence&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;Sequence&gt;::type</span></tt>) in order.
[<em>Note:</em> <tt class="literal"><span class="pre"><a href="./accumulate.html" class="identifier">accumulate</a></span></tt> is a synonym for <a class="refentry reference" href="./fold.html"><tt class="refentry literal"><span class="pre">fold</span></tt></a><em>end note</em>]</p>
</div>
<div class="section" id="id529">
<div class="section" id="accumulate-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/accumulate.hpp" class="header">boost/mpl/accumulate.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id530">
<div class="section" id="accumulate-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="15%" />
<col width="32%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td><a class="reference" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to iterate.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">State</span></tt></td>
@@ -65,61 +68,59 @@ and every element of the sequence in the range [<tt class="literal"><span class=
application.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">ForwardOp</span></tt></td>
<td>Binary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td>Binary <a class="reference" href="./lambda-expression.html">Lambda Expression</a></td>
<td>The operation to be executed on forward
traversal.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id531">
<div class="section" id="accumulate-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, binary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">op</span></tt>, and arbitrary type <tt class="literal"><span class="pre">state</span></tt>:</p>
<p>For any <a class="reference" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, binary <a class="reference" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">op</span></tt>, and arbitrary type <tt class="literal"><span class="pre">state</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./accumulate.html" class="identifier">accumulate</a>&lt;s,state,op&gt;::type t;
typedef <a href="./accumulate.html" class="identifier">accumulate</a>&lt;s,state,op&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">A type.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./fold.html" class="identifier">fold</a>&lt;s,state,op&gt;::type t;
typedef <a href="./fold.html" class="identifier">fold</a>&lt;s,state,op&gt;::type t;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id532">
<div class="section" id="accumulate-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. Exactly <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> applications of <tt class="literal"><span class="pre">op</span></tt>.</p>
</div>
<div class="section" id="id533">
<div class="section" id="accumulate-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;long,float,short,double,float,long,long double&gt; types;
typedef <a href="./accumulate.html" class="identifier">accumulate</a>&lt;
types
, <a href="./int.html" class="identifier">int_</a>&lt;0&gt;
, <a href="./if.html" class="identifier">if_</a>&lt; is_float&lt;<a href="./placeholders.html" class="identifier">_2</a>&gt;,<a href="./next.html" class="identifier">next</a>&lt;<a href="./placeholders.html" class="identifier">_1</a>&gt;,<a href="./placeholders.html" class="identifier">_1</a> &gt;
, <a href="./if.html" class="identifier">if_</a>&lt; is_float&lt;_2&gt;,<a href="./next.html" class="identifier">next</a>&lt;_1&gt;,_1 &gt;
&gt;::type number_of_floats;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( number_of_floats::value, ==, 4 );
</pre>
</div>
<div class="section" id="id534">
<div class="section" id="accumulate-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./algorithms.html">Algorithms</a>, <a class="reference internal" href="./fold.html">fold</a>, <a class="reference internal" href="./reverse-fold.html">reverse_fold</a>, <a class="reference internal" href="./iter-fold.html">iter_fold</a>, <a class="reference internal" href="./reverse-iter-fold.html">reverse_iter_fold</a>, <a class="reference internal" href="./copy.html">copy</a>, <a class="reference internal" href="./copy-if.html">copy_if</a></p>
<p><a class="reference" href="./algorithms.html">Algorithms</a>, <a class="refentry reference" href="./fold.html"><tt class="refentry literal"><span class="pre">fold</span></tt></a>, <a class="refentry reference" href="./reverse-fold.html"><tt class="refentry literal"><span class="pre">reverse_fold</span></tt></a>, <a class="refentry reference" href="./iter-fold.html"><tt class="refentry literal"><span class="pre">iter_fold</span></tt></a>, <a class="refentry reference" href="./reverse-iter-fold.html"><tt class="refentry literal"><span class="pre">reverse_iter_fold</span></tt></a>, <a class="refentry reference" href="./copy.html"><tt class="refentry literal"><span class="pre">copy</span></tt></a>, <a class="refentry reference" href="./copy-if.html"><tt class="refentry literal"><span class="pre">copy_if</span></tt></a></p>
<!-- modtime: November 10, 2004 04:25:46 +0000 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./reverse-iter-fold.html" class="navigation-link">Prev</a>&nbsp;<a href="./querying-algorithms.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./reverse-iter-fold.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iteration-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+9 -7
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Acknowledgements</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,14 +15,13 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./acknowledgements.html" class="navigation-link">Acknowledgements</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="acknowledgements">
<h1><a class="toc-backref" href="../refmanual.html#id1614">Acknowledgements</a></h1>
<p id="label-acknowledgements">The format and language of this reference documentation has been greatly influenced by
the SGI's <a class="reference external" href="http://www.sgi.com/tech/stl/" target="_top">Standard Template Library Programmer's Guide</a>.</p>
<h1><a class="toc-backref" href="../refmanual.html#id533" name="acknowledgements">Acknowledgements</a></h1>
<a class="target" id="label-acknowledgements" name="label-acknowledgements"></a><p>The format and language of this reference documentation has been greatly influenced by
the SGI's <a class="reference" href="http://www.sgi.com/tech/stl/" target="_top">Standard Template Library Programmer's Guide</a>.</p>
<!-- modtime: November 09, 2004 17:18:37 +0000 -->
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./components.html" class="navigation-link">Prev</a>&nbsp;Next</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="../refmanual.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+41 -42
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: advance</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./iterators.html" class="navigation-link">Iterators</a> / <a href="./iterator-metafunctions.html" class="navigation-link">Iterator Metafunctions</a> / <a href="./advance.html" class="navigation-link">advance</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="advance">
<h1><a class="toc-backref" href="./iterator-metafunctions.html#id1454">advance</a></h1>
<div class="section" id="id403">
<h1><a class="toc-backref" href="./iterator-metafunctions.html#id382" name="advance">advance</a></h1>
<div class="section" id="advance-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -26,94 +29,91 @@ struct <a href="./advance.html" class="identifier">advance</a>
};
</pre>
</div>
<div class="section" id="id404">
<div class="section" id="advance-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Moves <tt class="literal"><span class="pre">Iterator</span></tt> by the distance <tt class="literal"><span class="pre">N</span></tt>. For <a class="reference internal" href="./bidirectional-iterator.html">bidirectional</a> and
<a class="reference internal" href="./random-access-iterator.html">random access</a> iterators, the distance may be negative.</p>
<p>Moves <tt class="literal"><span class="pre">Iterator</span></tt> by the distance <tt class="literal"><span class="pre">N</span></tt>. For <a class="reference" href="./bidirectional-iterator.html">bidirectional</a> and
<a class="reference" href="./random-access-iterator.html">random access</a> iterators, the distance may be negative.</p>
</div>
<div class="section" id="id405">
<div class="section" id="advance-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/advance.hpp" class="header">boost/mpl/advance.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id406">
<div class="section" id="advance-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="19%" />
<col width="35%" />
<col width="45%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Iterator</span></tt></td>
<td><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></td>
<td><a class="reference" href="./forward-iterator.html">Forward Iterator</a></td>
<td>An iterator to advance.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">N</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td><a class="reference" href="./integral-constant.html">Integral Constant</a></td>
<td>A distance.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id407">
<div class="section" id="advance-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model Of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
<p><a class="reference" href="./tag-dispatched.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id408">
<div class="section" id="advance-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For a <a class="reference internal" href="./forward-iterator.html">Forward Iterator</a> <tt class="literal"><span class="pre">iter</span></tt> and arbitrary <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">n</span></tt>:</p>
<p>For a <a class="reference" href="./forward-iterator.html">Forward Iterator</a> <tt class="literal"><span class="pre">iter</span></tt> and arbitrary <a class="reference" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">n</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./advance.html" class="identifier">advance</a>&lt;iter,n&gt;::type j;
typedef <a href="./advance.html" class="identifier">advance</a>&lt;iter,n&gt;::type j;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./forward-iterator.html">Forward Iterator</a>.</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first">If <tt class="literal"><span class="pre">Iterator</span></tt> is a <a class="reference internal" href="./forward-iterator.html">Forward Iterator</a>, <tt class="literal"><span class="pre">n::value</span></tt> must be nonnegative.</p>
</td>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body">If <tt class="literal"><span class="pre">Iterator</span></tt> is a <a class="reference" href="./forward-iterator.html">Forward Iterator</a>, <tt class="literal"><span class="pre">n::value</span></tt> must be nonnegative.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to:</p>
<pre class="literal-block">
typedef iter i0;
typedef <a href="./next.html" class="identifier">next</a>&lt;i0&gt;::type i1;
typedef iter i0;
typedef <a href="./next.html" class="identifier">next</a>&lt;i0&gt;::type i1;
<em>...</em>
typedef <a href="./next.html" class="identifier">next</a>&lt;i<em>n-1</em>&gt;::type j;
</pre>
<p>if <tt class="literal"><span class="pre">n::value</span> <span class="pre">&gt;</span> <span class="pre">0</span></tt>, and</p>
<pre class="literal-block">
typedef iter i0;
typedef <a href="./prior.html" class="identifier">prior</a>&lt;i0&gt;::type i1;
typedef iter i0;
typedef <a href="./prior.html" class="identifier">prior</a>&lt;i0&gt;::type i1;
<em>...</em>
typedef <a href="./prior.html" class="identifier">prior</a>&lt;i<em>n-1</em>&gt;::type j;
</pre>
<p>otherwise.</p>
<p class="last">otherwise.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><p class="first last"><tt class="literal"><span class="pre">j</span></tt> is dereferenceable or past-the-end;
<tt class="literal"><span class="pre"><a href="./distance.html" class="identifier">distance</a>&lt;iter,j&gt;::value</span> <span class="pre">==</span> <span class="pre">n::value</span></tt> if <tt class="literal"><span class="pre">n::value</span> <span class="pre">&gt;</span> <span class="pre">0</span></tt>, and
<tt class="literal"><span class="pre"><a href="./distance.html" class="identifier">distance</a>&lt;j,iter&gt;::value</span> <span class="pre">==</span> <span class="pre">n::value</span></tt> otherwise.</p>
</td>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><tt class="literal"><span class="pre">j</span></tt> is dereferenceable or past-the-end;
<tt class="literal"><span class="pre"><a href="./distance.html" class="identifier">distance</a>&lt;iter,j&gt;::value</span> <span class="pre">==</span> <span class="pre">n::value</span></tt> if <tt class="literal"><span class="pre">n::value</span> <span class="pre">&gt;</span> <span class="pre">0</span></tt>, and
<tt class="literal"><span class="pre"><a href="./distance.html" class="identifier">distance</a>&lt;j,iter&gt;::value</span> <span class="pre">==</span> <span class="pre">n::value</span></tt> otherwise.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id409">
<div class="section" id="advance-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time if <tt class="literal"><span class="pre">iter</span></tt> is a model of
<a class="reference internal" href="./random-access-iterator.html">Random Access Iterator</a>, otherwise linear time.</p>
<p>Amortized constant time if <tt class="literal"><span class="pre">iter</span></tt> is a model of
<a class="reference" href="./random-access-iterator.html">Random Access Iterator</a>, otherwise linear time.</p>
</div>
<div class="section" id="id410">
<div class="section" id="advance-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,10&gt; numbers;
@@ -127,16 +127,15 @@ typedef <a href="./advance.html" class="identifier">advance</a>&lt;last,<a href=
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( boost::is_same&lt;i2,first&gt; ));
</pre>
</div>
<div class="section" id="id411">
<div class="section" id="advance-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./iterators.html">Iterators</a>, <a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a>, <a class="reference internal" href="./distance.html">distance</a>, <a class="reference internal" href="./next.html">next</a></p>
<p><a class="reference" href="./iterators.html">Iterators</a>, <a class="reference" href="./tag-dispatched.html">Tag Dispatched Metafunction</a>, <a class="refentry reference" href="./distance.html"><tt class="refentry literal"><span class="pre">distance</span></tt></a>, <a class="refentry reference" href="./next.html"><tt class="refentry literal"><span class="pre">next</span></tt></a></p>
<!-- modtime: November 11, 2004 11:16:39 +0000 -->
<!-- Iterators/Iterator Metafunctions//distance |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./iterator-metafunctions.html" class="navigation-link">Prev</a>&nbsp;<a href="./distance.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./distance.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterator-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+10 -9
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Concepts</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -11,18 +14,16 @@
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./algorithms.html" class="navigation-link">Prev</a>&nbsp;<a href="./inserter.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./inserters.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./algorithms-concepts.html" class="navigation-link">Concepts</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="id453">
<h1><a class="toc-backref" href="./algorithms.html#id1461"><a class="subsection-title" href="#concepts" name="concepts">Concepts</a></a></h1>
<!-- Algorithms/Concepts//Inserter -->
<div class="section" id="algorithms-concepts">
<h1><a class="toc-backref" href="./algorithms.html#id389" name="algorithms-concepts">Concepts</a></h1>
<a class="target" id="label-algorithms-concepts" name="label-algorithms-concepts"></a><!-- Algorithms/Concepts//Inserter -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./inserter.html" id="id1462">Inserter</a></li>
<li><a class="reference internal" href="./reversible-algorithm.html" id="id1463">Reversible Algorithm</a></li>
<li><a class="reference" href="./inserter.html" id="id390" name="id390">Inserter</a></li>
<li><a class="reference" href="./reversible-algorithm.html" id="id391" name="id391">Reversible Algorithm</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./algorithms.html" class="navigation-link">Prev</a>&nbsp;<a href="./inserter.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./inserters.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+32 -30
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Algorithms</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,50 +15,49 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="algorithms">
<h1><a class="toc-backref" href="../refmanual.html#id1460">Algorithms</a></h1>
<p id="label-algorithms">The MPL provides a broad range of fundamental algorithms aimed to
satisfy the majority of sequential compile-time data processing
<h1><a class="toc-backref" href="../refmanual.html#id388" name="algorithms">Algorithms</a></h1>
<a class="target" id="label-algorithms" name="label-algorithms"></a><p>The MPL provides a broad range of fundamental algorithms aimed to
satisfy the majority of sequential compile-time data processing
needs. The algorithms include compile-time counterparts
of many of the STL algorithms, iteration algorithms borrowed from
of many of the STL algorithms, iteration algorithms borrowed from
functional programming languages, and more.</p>
<p>Unlike the algorithms in the C++ Standard Library, which operate on
implict <em>iterator ranges</em>, the majority of MPL counterparts take
and return <em>sequences</em>. This derivation is not dictated by the
and return <em>sequences</em>. This derivation is not dictated by the
functional nature of C++ compile-time computations per se, but
rather by a desire to improve general usability of the library,
making programming with compile-time data structures as enjoyable
making programming with compile-time data structures as enjoyable
as possible.</p>
<!-- This can be seen as a further generalization and extension of
<!-- This can be seen as a further generalization and extension of
the STL's conceptual framework. -->
<p>In the spirit of the STL, MPL algorithms are <em>generic</em>, meaning
that they are not tied to particular sequence class
implementations, and can operate on a wide range of arguments as
<p>In the spirit of the STL, MPL algorithms are <em>generic</em>, meaning
that they are not tied to particular sequence class
implementations, and can operate on a wide range of arguments as
long as they satisfy the documented requirements. The requirements
are formulated in terms of concepts. Under the hood,
algorithms are decoupled from concrete sequence
implementations by operating on <a class="reference internal" href="./iterators.html">Iterators</a>.</p>
<p>All MPL algorithms can be sorted into three
major categories: iteration algorithms, querying algorithms, and
transformation algorithms. The transformation algorithms introduce
an associated <a class="reference internal" href="./inserter.html">Inserter</a> concept, a rough equivalent for the notion of
<a class="reference external" href="http://www.sgi.com/tech/stl/OutputIterator.html" target="_top">Output Iterator</a> in the Standard Library. Moreover, every
transformation algorithm provides a <tt class="literal"><span class="pre">reverse_</span></tt> counterpart,
are formulated in terms of concepts. Under the hood,
algorithms are decoupled from concrete sequence
implementations by operating on <a class="reference" href="./iterators.html">Iterators</a>.</p>
<p>All MPL algorithms can be sorted into three
major categories: iteration algorithms, querying algorithms, and
transformation algorithms. The transformation algorithms introduce
an associated <a class="reference" href="./inserter.html">Inserter</a> concept, a rough equivalent for the notion of
<a class="reference" href="http://www.sgi.com/tech/stl/OutputIterator.html" target="_top">Output Iterator</a> in the Standard Library. Moreover, every
transformation algorithm provides a <tt class="literal"><span class="pre">reverse_</span></tt> counterpart,
allowing for a wider range of efficient transformations — a
common functionality documented by the <a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a>
common functionality documented by the <a class="reference" href="./reversible-algorithm.html">Reversible Algorithm</a>
concept.</p>
<!-- modtime: November 29, 2004 06:33:05 +0000 -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./algorithms-concepts.html" id="id1461">Concepts</a></li>
<li><a class="reference internal" href="./inserters.html" id="id1464">Inserters</a></li>
<li><a class="reference internal" href="./iteration-algorithms.html" id="id1468">Iteration Algorithms</a></li>
<li><a class="reference internal" href="./querying-algorithms.html" id="id1474">Querying Algorithms</a></li>
<li><a class="reference internal" href="./transformation-algorithms.html" id="id1485">Transformation Algorithms</a></li>
<li><a class="reference internal" href="./runtime-algorithms.html" id="id1508">Runtime Algorithms</a></li>
<li><a class="reference" href="./algorithms-concepts.html" id="id389" name="id389">Concepts</a></li>
<li><a class="reference" href="./inserters.html" id="id392" name="id392">Inserters</a></li>
<li><a class="reference" href="./iteration-algorithms.html" id="id396" name="id396">Iteration Algorithms</a></li>
<li><a class="reference" href="./querying-algorithms.html" id="id402" name="id402">Querying Algorithms</a></li>
<li><a class="reference" href="./transformation-algorithms.html" id="id413" name="id413">Transformation Algorithms</a></li>
<li><a class="reference" href="./runtime-algorithms.html" id="id436" name="id436">Runtime Algorithms</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./iterator-category.html" class="navigation-link">Prev</a>&nbsp;<a href="./algorithms-concepts.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterators.html" class="navigation-link">Back</a>&nbsp;<a href="./metafunctions.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="../refmanual.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+30 -29
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: always</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,11 +15,11 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./miscellaneous.html" class="navigation-link">Miscellaneous</a> / <a href="./always.html" class="navigation-link">always</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="always">
<h1><a class="toc-backref" href="./miscellaneous.html#id1565">always</a></h1>
<div class="section" id="id1155">
<h1><a class="toc-backref" href="./miscellaneous.html#id489" name="always">always</a></h1>
<div class="section" id="always-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
template&lt;
typename X
&gt;
struct <a href="./always.html" class="identifier">always</a>
@@ -26,33 +29,33 @@ struct <a href="./always.html" class="identifier">always</a>
};
</pre>
</div>
<div class="section" id="id1156">
<div class="section" id="always-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./always.html" class="identifier">always</a>&lt;X&gt;</span></tt> specialization is a variadic <a class="reference internal" href="./metafunction-class.html">Metafunction Class</a> always returning the
<p><tt class="literal"><span class="pre"><a href="./always.html" class="identifier">always</a>&lt;X&gt;</span></tt> specialization is a variadic <a class="reference" href="./metafunction-class.html">Metafunction Class</a> always returning the
same type, <tt class="literal"><span class="pre">X</span></tt>, regardless of the number and types of passed arguments.</p>
</div>
<div class="section" id="id1157">
<div class="section" id="always-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/always.hpp" class="header">boost/mpl/always.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1158">
<div class="section" id="always-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./metafunction-class.html">Metafunction Class</a></p>
<p><a class="reference" href="./metafunction-class.html">Metafunction Class</a></p>
</div>
<div class="section" id="id1159">
<div class="section" id="always-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="22%" />
<col width="28%" />
<col width="51%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
@@ -63,48 +66,46 @@ same type, <tt class="literal"><span class="pre">X</span></tt>, regardless of th
</tbody>
</table>
</div>
<div class="section" id="id1160">
<div class="section" id="always-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For an arbitrary type <tt class="literal"><span class="pre">x</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./always.html" class="identifier">always</a>&lt;x&gt; f;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./metafunction-class.html">Metafunction Class</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./metafunction-class.html">Metafunction Class</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
struct f : <a href="./bind.html" class="identifier">bind</a>&lt; <a href="./identity.html" class="identifier">identity</a>&lt;<a href="./placeholders.html" class="identifier">_1</a>&gt;, x > {};
struct f : <a href="./bind.html" class="identifier">bind</a>&lt; <a href="./identity.html" class="identifier">identity</a>&lt;_1&gt;, x > {};
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1161">
<div class="section" id="always-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./always.html" class="identifier">always</a>&lt;<a href="./bool.html" class="identifier">true_</a>&gt; always_true;
typedef <a href="./always.html" class="identifier">always</a>&lt;true_&gt; always_true;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./apply.html" class="identifier">apply</a>&lt; always_true,<a href="./bool.html" class="identifier">false_</a>&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./apply.html" class="identifier">apply</a>&lt; always_true,<a href="./bool.html" class="identifier">false_</a>,<a href="./bool.html" class="identifier">false_</a> &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./apply.html" class="identifier">apply</a>&lt; always_true,<a href="./bool.html" class="identifier">false_</a>,<a href="./bool.html" class="identifier">false_</a>,<a href="./bool.html" class="identifier">false_</a> > ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./apply.html" class="identifier">apply</a>&lt; always_true,false_&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./apply.html" class="identifier">apply</a>&lt; always_true,false_,false_ &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./apply.html" class="identifier">apply</a>&lt; always_true,false_,false_,false_ > ));
</pre>
</div>
<div class="section" id="id1162">
<div class="section" id="always-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./metafunction-class.html">Metafunction Class</a>, <a class="reference internal" href="./identity.html">identity</a>, <a class="reference internal" href="./bind.html">bind</a>, <a class="reference internal" href="./apply.html">apply</a></p>
<p><a class="reference" href="./metafunctions.html">Metafunctions</a>, <a class="reference" href="./metafunction-class.html">Metafunction Class</a>, <a class="refentry reference" href="./identity.html"><tt class="refentry literal"><span class="pre">identity</span></tt></a>, <a class="refentry reference" href="./bind.html"><tt class="refentry literal"><span class="pre">bind</span></tt></a>, <a class="refentry reference" href="./apply.html"><tt class="refentry literal"><span class="pre">apply</span></tt></a></p>
<!-- modtime: November 13, 2004 02:52:37 +0000 -->
<!-- Metafunctions/Miscellaneous//inherit |30 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./identity.html" class="navigation-link">Prev</a>&nbsp;<a href="./inherit.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./identity.html" class="navigation-link">Back</a>&nbsp;<a href="./inherit.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./miscellaneous.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+35 -34
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: and_</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,11 +15,11 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./logical-operations.html" class="navigation-link">Logical Operations</a> / <a href="./and.html" class="navigation-link">and_</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="and">
<h1><a class="toc-backref" href="./logical-operations.html#id1550">and_</a></h1>
<div class="section" id="id1068">
<h1><a class="toc-backref" href="./logical-operations.html#id476" name="and">and_</a></h1>
<div class="section" id="and-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
template&lt;
typename F1
, typename F2
<em>...</em>
@@ -28,54 +31,54 @@ struct <a href="./and.html" class="identifier">and_</a>
};
</pre>
</div>
<div class="section" id="id1069">
<div class="section" id="and-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the result of short-circuit <em>logical and</em> (<tt class="literal"><span class="pre">&amp;&amp;</span></tt>) operation on its arguments.</p>
</div>
<div class="section" id="id1070">
<div class="section" id="and-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/and.hpp" class="header">boost/mpl/and.hpp</a>&gt;
#include &lt;<a href="../../../../boost/mpl/logical.hpp" class="header">boost/mpl/logical.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1071">
<div class="section" id="and-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">F1</span></tt>, <tt class="literal"><span class="pre">F2</span></tt>,... <tt class="literal"><span class="pre">Fn</span></tt></td>
<td>Nullary <a class="reference internal" href="./metafunction.html">Metafunction</a></td>
<td>Nullary <a class="reference" href="./metafunction.html">Metafunction</a></td>
<td>Operation's arguments.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1072">
<div class="section" id="and-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For arbitrary nullary <a class="reference internal" href="./metafunction.html">Metafunction</a>s <tt class="literal"><span class="pre">f1</span></tt>, <tt class="literal"><span class="pre">f2</span></tt>,... <tt class="literal"><span class="pre">fn</span></tt>:</p>
<p>For arbitrary nullary <a class="reference" href="./metafunction.html">Metafunction</a>s <tt class="literal"><span class="pre">f1</span></tt>, <tt class="literal"><span class="pre">f2</span></tt>,... <tt class="literal"><span class="pre">fn</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./and.html" class="identifier">and_</a>&lt;f1,f2,<em>...</em>,f<em>n</em>&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><tt class="literal"><span class="pre">r</span></tt> is <tt class="literal"><span class="pre"><a href="./bool.html" class="identifier">false_</a></span></tt> if either of <tt class="literal"><span class="pre">f1::type::value</span></tt>, <tt class="literal"><span class="pre">f2::type::value</span></tt>,...
<tt class="literal"><span class="pre">fn::type::value</span></tt> expressions evaluates to <tt class="literal"><span class="pre">false</span></tt>, and <tt class="literal"><span class="pre"><a href="./bool.html" class="identifier">true_</a></span></tt> otherwise;
guarantees left-to-right evaluation; the operands subsequent to the first
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><tt class="literal"><span class="pre">r</span></tt> is <tt class="literal"><span class="pre">false_</span></tt> if either of <tt class="literal"><span class="pre">f1::type::value</span></tt>, <tt class="literal"><span class="pre">f2::type::value</span></tt>,...
<tt class="literal"><span class="pre">fn::type::value</span></tt> expressions evaluates to <tt class="literal"><span class="pre">false</span></tt>, and <tt class="literal"><span class="pre">true_</span></tt> otherwise;
guarantees left-to-right evaluation; the operands subsequent to the first
<tt class="literal"><span class="pre">f</span></tt><em>i</em> metafunction that evaluates to <tt class="literal"><span class="pre">false</span></tt> are not evaluated.</td>
</tr>
</tbody>
@@ -84,12 +87,11 @@ guarantees left-to-right evaluation; the operands subsequent to the first
<pre class="literal-block">
typedef <a href="./and.html" class="identifier">and_</a>&lt;f1,f2,<em>...</em>,f<em>n</em>&gt; r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -100,29 +102,28 @@ struct r : <a href="./and.html" class="identifier">and_</a>&lt;f1,f2,<em>...</em
</tbody>
</table>
</div>
<div class="section" id="id1073">
<div class="section" id="and-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
struct unknown;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./and.html" class="identifier">and_</a>&lt; <a href="./bool.html" class="identifier">true_</a>,<a href="./bool.html" class="identifier">true_</a> &gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./and.html" class="identifier">and_</a>&lt; <a href="./bool.html" class="identifier">false_</a>,<a href="./bool.html" class="identifier">true_</a> &gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./and.html" class="identifier">and_</a>&lt; <a href="./bool.html" class="identifier">true_</a>,<a href="./bool.html" class="identifier">false_</a> &gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./and.html" class="identifier">and_</a>&lt; <a href="./bool.html" class="identifier">false_</a>,<a href="./bool.html" class="identifier">false_</a> &gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./and.html" class="identifier">and_</a>&lt; <a href="./bool.html" class="identifier">false_</a>,unknown &gt; )); // OK
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./and.html" class="identifier">and_</a>&lt; <a href="./bool.html" class="identifier">false_</a>,unknown,unknown &gt; )); // OK too
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./and.html" class="identifier">and_</a>&lt; true_,true_ &gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./and.html" class="identifier">and_</a>&lt; false_,true_ &gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./and.html" class="identifier">and_</a>&lt; true_,false_ &gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./and.html" class="identifier">and_</a>&lt; false_,false_ &gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./and.html" class="identifier">and_</a>&lt; false_,unknown &gt; )); // OK
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./and.html" class="identifier">and_</a>&lt; false_,unknown,unknown &gt; )); // OK too
</pre>
</div>
<div class="section" id="id1074">
<div class="section" id="and-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./logical-operations.html">Logical Operations</a>, <a class="reference internal" href="./or.html">or_</a>, <a class="reference internal" href="./not.html">not_</a></p>
<p><a class="reference" href="./metafunctions.html">Metafunctions</a>, <a class="reference" href="./logical-operations.html">Logical Operations</a>, <a class="refentry reference" href="./or.html"><tt class="refentry literal"><span class="pre">or_</span></tt></a>, <a class="refentry reference" href="./not.html"><tt class="refentry literal"><span class="pre">not_</span></tt></a></p>
<!-- modtime: November 10, 2004 04:46:17 +0000 -->
<!-- Metafunctions/Logical Operations//or_ |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./logical-operations.html" class="navigation-link">Prev</a>&nbsp;<a href="./or.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./or.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./logical-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+31 -29
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: apply_wrap</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,11 +15,11 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./invocation.html" class="navigation-link">Invocation</a> / <a href="./apply-wrap.html" class="navigation-link">apply_wrap</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="apply-wrap">
<h1><a class="toc-backref" href="./invocation.html#id1526">apply_wrap</a></h1>
<div class="section" id="id894">
<h1><a class="toc-backref" href="./invocation.html#id452" name="apply-wrap">apply_wrap</a></h1>
<div class="section" id="invocation-apply-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
template&lt;
typename F
&gt;
struct apply_wrap0
@@ -24,7 +27,7 @@ struct apply_wrap0
typedef <em>unspecified</em> type;
};
template&lt;
template&lt;
typename F, typename A1
&gt;
struct apply_wrap1
@@ -34,7 +37,7 @@ struct apply_wrap1
<em>...</em>
template&lt;
template&lt;
typename F, typename A1,<em>...</em> typename An
&gt;
struct <a href="./apply-wrap.html" class="identifier">apply_wrap</a><em>n</em>
@@ -43,37 +46,37 @@ struct <a href="./apply-wrap.html" class="identifier">apply_wrap</a><em>n</em>
};
</pre>
</div>
<div class="section" id="id895">
<div class="section" id="invocation-apply-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Invokes a <a class="reference internal" href="./metafunction-class.html">Metafunction Class</a> <tt class="literal"><span class="pre">F</span></tt> with arguments <tt class="literal"><span class="pre">A1</span></tt>,... <tt class="literal"><span class="pre">An</span></tt>.</p>
<p>In essence, <tt class="literal"><span class="pre"><a href="./apply-wrap.html" class="identifier">apply_wrap</a></span></tt> forms are nothing more than syntactic wrappers around
<tt class="literal"><span class="pre">F::<a href="./apply.html" class="identifier">apply</a>&lt;A1,...</span> <span class="pre">An&gt;::type</span></tt> / <tt class="literal"><span class="pre">F::<a href="./apply.html" class="identifier">apply</a>::type</span></tt> expressions (hence the name).
They provide a more concise notation and higher portability than their
<p>Invokes a <a class="reference" href="./metafunction-class.html">Metafunction Class</a> <tt class="literal"><span class="pre">F</span></tt> with arguments <tt class="literal"><span class="pre">A1</span></tt>,... <tt class="literal"><span class="pre">An</span></tt>.</p>
<p>In essence, <tt class="literal"><span class="pre"><a href="./apply-wrap.html" class="identifier">apply_wrap</a></span></tt> forms are nothing more than syntactic wrappers around
<tt class="literal"><span class="pre">F::<a href="./apply.html" class="identifier">apply</a>&lt;A1,...</span> <span class="pre">An&gt;::type</span></tt> / <tt class="literal"><span class="pre">F::<a href="./apply.html" class="identifier">apply</a>::type</span></tt> expressions (hence the name).
They provide a more concise notation and higher portability than their
underlaying constructs at the cost of an extra template instantiation.</p>
</div>
<div class="section" id="id896">
<div class="section" id="invocation-apply-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/apply_wrap.hpp" class="header">boost/mpl/apply_wrap.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id897">
<div class="section" id="invocation-apply-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">F</span></tt></td>
<td><a class="reference internal" href="./metafunction-class.html">Metafunction Class</a></td>
<td><a class="reference" href="./metafunction-class.html">Metafunction Class</a></td>
<td>A metafunction class to invoke.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">A1</span></tt>,... <tt class="literal"><span class="pre">An</span></tt></td>
@@ -83,13 +86,13 @@ underlaying constructs at the cost of an extra template instantiation.</p>
</tbody>
</table>
</div>
<div class="section" id="id898">
<div class="section" id="invocation-apply-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./metafunction-class.html">Metafunction Class</a> <tt class="literal"><span class="pre">f</span></tt> and arbitrary types <tt class="literal"><span class="pre">a1</span></tt>,... <tt class="literal"><span class="pre">an</span></tt>:</p>
<p>For any <a class="reference" href="./metafunction-class.html">Metafunction Class</a> <tt class="literal"><span class="pre">f</span></tt> and arbitrary types <tt class="literal"><span class="pre">a1</span></tt>,... <tt class="literal"><span class="pre">an</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><em>n</em>&lt;f,a1,<em>...</em>an&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
@@ -97,13 +100,13 @@ typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><em>n</em>&
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">If <tt class="literal"><span class="pre">n</span> <span class="pre">&gt;</span> <span class="pre">0</span></tt>, equivalent to <tt class="literal"><span class="pre">typedef</span> <span class="pre">f::<a href="./apply.html" class="identifier">apply</a>&lt;a1,...</span> <span class="pre">an&gt;::type</span> <span class="pre">t;</span></tt>,
otherwise equivalent to either <tt class="literal"><span class="pre">typedef</span> <span class="pre">f::<a href="./apply.html" class="identifier">apply</a>::type</span> <span class="pre">t;</span></tt> or
<tt class="literal"><span class="pre">typedef</span> <span class="pre">f::<a href="./apply.html" class="identifier">apply</a>&lt;&gt;::type</span> <span class="pre">t;</span></tt> depending on whether <tt class="literal"><span class="pre">f::<a href="./apply.html" class="identifier">apply</a></span></tt> is
<tt class="literal"><span class="pre">typedef</span> <span class="pre">f::<a href="./apply.html" class="identifier">apply</a>&lt;&gt;::type</span> <span class="pre">t;</span></tt> depending on whether <tt class="literal"><span class="pre">f::<a href="./apply.html" class="identifier">apply</a></span></tt> is
a class or a class template.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id899">
<div class="section" id="invocation-apply-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
struct f0
@@ -113,7 +116,7 @@ struct f0
typedef char type;
};
};
struct g0
{
struct <a href="./apply.html" class="identifier">apply</a> { typedef char type; };
@@ -137,16 +140,15 @@ typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;r3,char&gt; ));
</pre>
</div>
<div class="section" id="id900">
<div class="section" id="invocation-apply-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./invocation.html">invocation</a>, <a class="reference internal" href="./apply.html">apply</a>, <a class="reference internal" href="./lambda.html">lambda</a>, <a class="reference internal" href="./quote.html">quote</a>, <a class="reference internal" href="./bind.html">bind</a>, <a class="reference internal" href="./protect.html">protect</a></p>
<p><a class="reference" href="./metafunctions.html">Metafunctions</a>, <a class="reference" href="./invocation.html">invocation</a>, <a class="refentry reference" href="./apply.html"><tt class="refentry literal"><span class="pre">apply</span></tt></a>, <a class="refentry reference" href="./lambda.html"><tt class="refentry literal"><span class="pre">lambda</span></tt></a>, <a class="refentry reference" href="./quote.html"><tt class="refentry literal"><span class="pre">quote</span></tt></a>, <a class="refentry reference" href="./bind.html"><tt class="refentry literal"><span class="pre">bind</span></tt></a>, <a class="refentry reference" href="./protect.html"><tt class="refentry literal"><span class="pre">protect</span></tt></a></p>
<!-- modtime: November 10, 2004 04:46:09 +0000 -->
<!-- Metafunctions/Invocation//unpack_args |30 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./apply.html" class="navigation-link">Prev</a>&nbsp;<a href="./unpack-args.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./apply.html" class="navigation-link">Back</a>&nbsp;<a href="./unpack-args.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./invocation.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+28 -26
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: apply</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,11 +15,11 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./invocation.html" class="navigation-link">Invocation</a> / <a href="./apply.html" class="navigation-link">apply</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="apply">
<h1><a class="toc-backref" href="./invocation.html#id1525">apply</a></h1>
<div class="section" id="id887">
<h1><a class="toc-backref" href="./invocation.html#id451" name="apply">apply</a></h1>
<div class="section" id="apply-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
template&lt;
typename F
&gt;
struct apply0
@@ -24,7 +27,7 @@ struct apply0
typedef <em>unspecified</em> type;
};
template&lt;
template&lt;
typename F, typename A1
&gt;
struct apply1
@@ -34,7 +37,7 @@ struct apply1
<em>...</em>
template&lt;
template&lt;
typename F, typename A1,<em>...</em> typename An
&gt;
struct <a href="./apply.html" class="identifier">apply</a><em>n</em>
@@ -42,7 +45,7 @@ struct <a href="./apply.html" class="identifier">apply</a><em>n</em>
typedef <em>unspecified</em> type;
};
template&lt;
template&lt;
typename F
, typename A1 = <em>unspecified</em>
<em>...</em>
@@ -54,33 +57,33 @@ struct <a href="./apply.html" class="identifier">apply</a>
};
</pre>
</div>
<div class="section" id="id888">
<div class="section" id="apply-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Invokes a <a class="reference internal" href="./metafunction-class.html">Metafunction Class</a> or a <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">F</span></tt> with arguments <tt class="literal"><span class="pre">A1</span></tt>,... <tt class="literal"><span class="pre">An</span></tt>.</p>
<p>Invokes a <a class="reference" href="./metafunction-class.html">Metafunction Class</a> or a <a class="reference" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">F</span></tt> with arguments <tt class="literal"><span class="pre">A1</span></tt>,... <tt class="literal"><span class="pre">An</span></tt>.</p>
</div>
<div class="section" id="id889">
<div class="section" id="apply-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/apply.hpp" class="header">boost/mpl/apply.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id890">
<div class="section" id="apply-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">F</span></tt></td>
<td><a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td><a class="reference" href="./lambda-expression.html">Lambda Expression</a></td>
<td>An expression to invoke.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">A1</span></tt>,... <tt class="literal"><span class="pre">An</span></tt></td>
@@ -90,14 +93,14 @@ struct <a href="./apply.html" class="identifier">apply</a>
</tbody>
</table>
</div>
<div class="section" id="id891">
<div class="section" id="apply-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">f</span></tt> and arbitrary types <tt class="literal"><span class="pre">a1</span></tt>,... <tt class="literal"><span class="pre">an</span></tt>:</p>
<p>For any <a class="reference" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">f</span></tt> and arbitrary types <tt class="literal"><span class="pre">a1</span></tt>,... <tt class="literal"><span class="pre">an</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./apply.html" class="identifier">apply</a><em>n</em>&lt;f,a1,<em>...</em>a<em>n</em>&gt;::type t;
typedef <a href="./apply.html" class="identifier">apply</a>&lt;f,a1,<em>...</em>a<em>n</em>&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
@@ -108,7 +111,7 @@ typedef <a href="./apply.html" class="identifier">apply</a>&lt;f,a1,<em>...</em>
</tbody>
</table>
</div>
<div class="section" id="id892">
<div class="section" id="apply-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
template&lt; typename N1, typename N2 &gt; struct int_plus
@@ -116,23 +119,22 @@ template&lt; typename N1, typename N2 &gt; struct int_plus
{
};
typedef <a href="./apply.html" class="identifier">apply</a>&lt; int_plus&lt;<a href="./placeholders.html" class="identifier">_1</a>,<a href="./placeholders.html" class="identifier">_2</a>&gt;, <a href="./int.html" class="identifier">int_</a>&lt;2&gt;, <a href="./int.html" class="identifier">int_</a>&lt;3&gt; &gt;::type r1;
typedef <a href="./apply.html" class="identifier">apply</a>&lt; int_plus&lt;_1,_2&gt;, <a href="./int.html" class="identifier">int_</a>&lt;2&gt;, <a href="./int.html" class="identifier">int_</a>&lt;3&gt; &gt;::type r1;
typedef <a href="./apply.html" class="identifier">apply</a>&lt; <a href="./quote.html" class="identifier">quote</a><tt class="literal"><span class="pre">2</span></tt>&lt;int_plus&gt;, <a href="./int.html" class="identifier">int_</a>&lt;2&gt;, <a href="./int.html" class="identifier">int_</a>&lt;3&gt; &gt;::type r2;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( r1::value, ==, 5 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( r2::value, ==, 5 );
</pre>
</div>
<div class="section" id="id893">
<div class="section" id="apply-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./apply-wrap.html">apply_wrap</a>, <a class="reference internal" href="./lambda.html">lambda</a>, <a class="reference internal" href="./quote.html">quote</a>, <a class="reference internal" href="./bind.html">bind</a></p>
<p><a class="reference" href="./metafunctions.html">Metafunctions</a>, <a class="refentry reference" href="./apply-wrap.html"><tt class="refentry literal"><span class="pre">apply_wrap</span></tt></a>, <a class="refentry reference" href="./lambda.html"><tt class="refentry literal"><span class="pre">lambda</span></tt></a>, <a class="refentry reference" href="./quote.html"><tt class="refentry literal"><span class="pre">quote</span></tt></a>, <a class="refentry reference" href="./bind.html"><tt class="refentry literal"><span class="pre">bind</span></tt></a></p>
<!-- modtime: November 10, 2004 04:46:13 +0000 -->
<!-- Metafunctions/Invocation//apply_wrap |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./invocation.html" class="navigation-link">Prev</a>&nbsp;<a href="./apply-wrap.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./apply-wrap.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./invocation.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+25 -23
View File
@@ -1,19 +1,22 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: arg</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./quote.html" class="navigation-link">Prev</a>&nbsp;<a href="./protect.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./quote.html" class="navigation-link">Back</a>&nbsp;<a href="./protect.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./composition-and-argument-binding.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./composition-and-argument-binding.html" class="navigation-link">Composition and Argument Binding</a> / <a href="./arg.html" class="navigation-link">arg</a></td>
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./quote.html" class="navigation-link">Prev</a>&nbsp;<a href="./protect.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./quote.html" class="navigation-link">Back</a>&nbsp;<a href="./protect.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./composition-and-argument.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./composition-and-argument.html" class="navigation-link">Composition and Argument Binding</a> / <a href="./arg.html" class="navigation-link">arg</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="arg">
<h1><a class="toc-backref" href="./composition-and-argument-binding.html#id1533">arg</a></h1>
<div class="section" id="id946">
<h1><a class="toc-backref" href="./composition-and-argument.html#id459" name="arg">arg</a></h1>
<div class="section" id="arg-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt; int n &gt; struct <a href="./arg.html" class="identifier">arg</a>;
@@ -39,28 +42,28 @@ template&lt;&gt; struct <a href="./arg.html" class="identifier">arg</a>&lt;<em>n
};
</pre>
</div>
<div class="section" id="id947">
<div class="section" id="arg-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./arg.html" class="identifier">arg</a>&lt;n&gt;</span></tt> specialization is a <a class="reference internal" href="./metafunction-class.html">Metafunction Class</a> that return the <tt class="literal"><span class="pre">n</span></tt>th of its arguments.</p>
<p><tt class="literal"><span class="pre"><a href="./arg.html" class="identifier">arg</a>&lt;n&gt;</span></tt> specialization is a <a class="reference" href="./metafunction-class.html">Metafunction Class</a> that return the <tt class="literal"><span class="pre">n</span></tt>th of its arguments.</p>
</div>
<div class="section" id="id948">
<div class="section" id="arg-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/arg.hpp" class="header">boost/mpl/arg.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id949">
<div class="section" id="arg-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
@@ -71,14 +74,14 @@ template&lt;&gt; struct <a href="./arg.html" class="identifier">arg</a>&lt;<em>n
</tbody>
</table>
</div>
<div class="section" id="id950">
<div class="section" id="arg-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any integral constant <tt class="literal"><span class="pre">n</span></tt> in the range [1, <a class="reference internal" href="./limit-metafunction-arity.html">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</a>] and
<p>For any integral constant <tt class="literal"><span class="pre">n</span></tt> in the range [1, <a class="refentry reference" href="./limit-metafunction-arity.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</span></tt></a>] and
arbitrary types <tt class="literal"><span class="pre">a1</span></tt>,... <tt class="literal"><span class="pre">an</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><em>n</em>&lt; <a href="./arg.html" class="identifier">arg</a>&lt;<em>n</em>&gt;,a1,<em>...</em>a<em>n</em> &gt;::type x;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
@@ -89,7 +92,7 @@ typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><em>n</em>&
</tbody>
</table>
</div>
<div class="section" id="id951">
<div class="section" id="arg-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">5</span></tt>&lt; <a href="./arg.html" class="identifier">arg</a>&lt;1&gt;,bool,char,short,int,long &gt;::type t1;
@@ -99,16 +102,15 @@ typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; t3, short > ));
</pre>
</div>
<div class="section" id="id952">
<div class="section" id="arg-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./composition-and-argument-binding.html">Composition and Argument Binding</a>, <a class="reference internal" href="./placeholders.html">Placeholders</a>, <a class="reference internal" href="./lambda.html">lambda</a>, <a class="reference internal" href="./bind.html">bind</a>, <a class="reference internal" href="./apply.html">apply</a>, <a class="reference internal" href="./apply-wrap.html">apply_wrap</a></p>
<p><a class="reference" href="./composition-and-argument.html">Composition and Argument Binding</a>, <a class="reference" href="./placeholders.html">Placeholders</a>, <a class="refentry reference" href="./lambda.html"><tt class="refentry literal"><span class="pre">lambda</span></tt></a>, <a class="refentry reference" href="./bind.html"><tt class="refentry literal"><span class="pre">bind</span></tt></a>, <a class="refentry reference" href="./apply.html"><tt class="refentry literal"><span class="pre">apply</span></tt></a>, <a class="refentry reference" href="./apply-wrap.html"><tt class="refentry literal"><span class="pre">apply_wrap</span></tt></a></p>
<!-- modtime: November 13, 2004 18:35:04 +0000 -->
<!-- Metafunctions/Composition and Argument Binding//protect |60 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./quote.html" class="navigation-link">Prev</a>&nbsp;<a href="./protect.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./quote.html" class="navigation-link">Back</a>&nbsp;<a href="./protect.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./composition-and-argument-binding.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./quote.html" class="navigation-link">Prev</a>&nbsp;<a href="./protect.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./quote.html" class="navigation-link">Back</a>&nbsp;<a href="./protect.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./composition-and-argument.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
</tr></table></body>
</html>
+16 -14
View File
@@ -1,32 +1,34 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Arithmetic Operations</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./protect.html" class="navigation-link">Prev</a>&nbsp;<a href="./plus.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./composition-and-argument-binding.html" class="navigation-link">Back</a>&nbsp;<a href="./comparisons.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./protect.html" class="navigation-link">Prev</a>&nbsp;<a href="./plus.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./composition-and-argument.html" class="navigation-link">Back</a>&nbsp;<a href="./comparisons.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./arithmetic-operations.html" class="navigation-link">Arithmetic Operations</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="arithmetic-operations">
<h1><a class="toc-backref" href="./metafunctions.html#id1535">Arithmetic Operations</a></h1>
<span class="target" id="label-metafunctions-arithmetic-operations"></span><!-- Metafunctions/Arithmetic Operations//plus |10 -->
<h1><a class="toc-backref" href="./metafunctions.html#id461" name="arithmetic-operations">Arithmetic Operations</a></h1>
<a class="target" id="id227" name="id227"></a><!-- modtime: November 08, 2004 05:37:53 +0000 -->
<!-- Metafunctions/Arithmetic Operations//plus |10 -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./plus.html" id="id1536">plus</a></li>
<li><a class="reference internal" href="./minus.html" id="id1537">minus</a></li>
<li><a class="reference internal" href="./times.html" id="id1538">times</a></li>
<li><a class="reference internal" href="./divides.html" id="id1539">divides</a></li>
<li><a class="reference internal" href="./modulus.html" id="id1540">modulus</a></li>
<li><a class="reference internal" href="./negate.html" id="id1541">negate</a></li>
<li><a class="reference" href="./plus.html" id="id462" name="id462">plus</a></li>
<li><a class="reference" href="./minus.html" id="id463" name="id463">minus</a></li>
<li><a class="reference" href="./times.html" id="id464" name="id464">times</a></li>
<li><a class="reference" href="./divides.html" id="id465" name="id465">divides</a></li>
<li><a class="reference" href="./modulus.html" id="id466" name="id466">modulus</a></li>
<li><a class="reference" href="./negate.html" id="id467" name="id467">negate</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./protect.html" class="navigation-link">Prev</a>&nbsp;<a href="./plus.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./composition-and-argument-binding.html" class="navigation-link">Back</a>&nbsp;<a href="./comparisons.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./protect.html" class="navigation-link">Prev</a>&nbsp;<a href="./plus.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./composition-and-argument.html" class="navigation-link">Back</a>&nbsp;<a href="./comparisons.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
</tr></table></body>
</html>
+33 -35
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_ASSERT_MSG</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -11,9 +14,9 @@
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./assert.html" class="navigation-link">Prev</a>&nbsp;<a href="./assert-not.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./assert.html" class="navigation-link">Back</a>&nbsp;<a href="./assert-not.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./asserts.html" class="navigation-link">Asserts</a> / <a href="./assert-msg.html" class="navigation-link">BOOST_MPL_ASSERT_MSG</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-assert-msg">
<h1><a class="toc-backref" href="./asserts.html#id1589">BOOST_MPL_ASSERT_MSG</a></h1>
<div class="section" id="id1294">
<div class="section" id="assert-msg">
<h1><a class="toc-backref" href="./asserts.html#id512" name="assert-msg">BOOST_MPL_ASSERT_MSG</a></h1>
<div class="section" id="asserts-assert-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./assert-msg.html" class="identifier">BOOST_MPL_ASSERT_MSG</a>( condition, message, types ) \
@@ -21,29 +24,29 @@
/**/
</pre>
</div>
<div class="section" id="id1295">
<div class="section" id="asserts-assert-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Generates a compilation error with an embedded custom message when the condition
<p>Generates a compilation error with an embedded custom message when the condition
doesn't hold.</p>
</div>
<div class="section" id="id1296">
<div class="section" id="asserts-assert-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/assert.hpp" class="header">boost/mpl/assert.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1297">
<div class="section" id="asserts-assert-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
@@ -64,27 +67,25 @@ in the error message.</td>
</tbody>
</table>
</div>
<div class="section" id="id1298">
<div class="section" id="asserts-assert-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any integral constant expression <tt class="literal"><span class="pre">expr</span></tt>, legal C++ identifier <tt class="literal"><span class="pre">message</span></tt>, and
<p>For any integral constant expression <tt class="literal"><span class="pre">expr</span></tt>, legal C++ identifier <tt class="literal"><span class="pre">message</span></tt>, and
arbitrary types <tt class="literal"><span class="pre">t1</span></tt>, <tt class="literal"><span class="pre">t2</span></tt>,... <tt class="literal"><span class="pre">tn</span></tt>:</p>
<pre class="literal-block">
<a href="./assert-msg.html" class="identifier">BOOST_MPL_ASSERT_MSG</a>( expr, message, (t1, t2,... tn) );
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">None.</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">t1</span></tt>, <tt class="literal"><span class="pre">t2</span></tt>,... <tt class="literal"><span class="pre">tn</span></tt> are non-<tt class="literal"><span class="pre">void</span></tt>.</p>
</td>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><tt class="literal"><span class="pre">t1</span></tt>, <tt class="literal"><span class="pre">t2</span></tt>,... <tt class="literal"><span class="pre">tn</span></tt> are non-<tt class="literal"><span class="pre">void</span></tt>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Generates a compilation error if <tt class="literal"><span class="pre">expr</span> <span class="pre">!=</span> <span class="pre">true</span></tt>, otherwise
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Generates a compilation error if <tt class="literal"><span class="pre">expr::value</span> <span class="pre">!=</span> <span class="pre">true</span></tt>, otherwise
has no effect.</p>
<p>When possible within the compiler's diagnostic capabilities,
the error message will include the <tt class="literal"><span class="pre">message</span></tt> identifier and the parenthized
the error message will include the <tt class="literal"><span class="pre">message</span></tt> identifier and the parenthized
list of <tt class="literal"><span class="pre">t1</span></tt>, <tt class="literal"><span class="pre">t2</span></tt>,... <tt class="literal"><span class="pre">tn</span></tt> types, and have a general form of:</p>
<pre class="last literal-block">
<em>...</em> ************( <em>...</em>::message )************)(t1, t2,... tn) <em>...</em>
@@ -96,20 +97,18 @@ list of <tt class="literal"><span class="pre">t1</span></tt>, <tt class="literal
<pre class="literal-block">
<a href="./assert-msg.html" class="identifier">BOOST_MPL_ASSERT_MSG</a>( expr, message, (types&lt;t1, t2,... tn&gt;) );
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">None.</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first">None.</p>
</td>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body">None.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Generates a compilation error if <tt class="literal"><span class="pre">expr</span> <span class="pre">!=</span> <span class="pre">true</span></tt>, otherwise
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Generates a compilation error if <tt class="literal"><span class="pre">expr::value</span> <span class="pre">!=</span> <span class="pre">true</span></tt>, otherwise
has no effect.</p>
<p>When possible within the compiler's diagnostics capabilities,
the error message will include the <tt class="literal"><span class="pre">message</span></tt> identifier and the list of
the error message will include the <tt class="literal"><span class="pre">message</span></tt> identifier and the list of
<tt class="literal"><span class="pre">t1</span></tt>, <tt class="literal"><span class="pre">t2</span></tt>,... <tt class="literal"><span class="pre">tn</span></tt> types, and have a general form of:</p>
<pre class="last literal-block">
<em>...</em> ************( <em>...</em>::message )************)(types&lt;t1, t2,... tn&gt;) <em>...</em>
@@ -119,13 +118,13 @@ the error message will include the <tt class="literal"><span class="pre">message
</tbody>
</table>
</div>
<div class="section" id="id1299">
<div class="section" id="asserts-assert-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
template&lt; typename T &gt; struct my
{
// ...
<a href="./assert-msg.html" class="identifier">BOOST_MPL_ASSERT_MSG</a>(
<a href="./assert-msg.html" class="identifier">BOOST_MPL_ASSERT_MSG</a>(
is_integral&lt;T&gt;::value
, NON_INTEGRAL_TYPES_ARE_NOT_ALLOWED
, (T)
@@ -142,16 +141,15 @@ my&lt;void*&gt; test;
// ' to non-scalar type `mpl_::assert&lt;false&gt;' requested
</pre>
</div>
<div class="section" id="id1300">
<div class="section" id="asserts-assert-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./asserts.html">Asserts</a>, <a class="reference internal" href="./assert.html">BOOST_MPL_ASSERT</a>, <a class="reference internal" href="./assert-not.html">BOOST_MPL_ASSERT_NOT</a>, <a class="reference internal" href="./assert-relation.html">BOOST_MPL_ASSERT_RELATION</a></p>
<p><a class="reference" href="./asserts.html">Asserts</a>, <a class="refentry reference" href="./assert.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_ASSERT</span></tt></a>, <a class="refentry reference" href="./assert-not.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_ASSERT_NOT</span></tt></a>, <a class="refentry reference" href="./assert-relation.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_ASSERT_RELATION</span></tt></a></p>
<!-- modtime: November 10, 2004 04:45:24 +0000 -->
<!-- Macros/Asserts//BOOST_MPL_ASSERT_NOT -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./assert.html" class="navigation-link">Prev</a>&nbsp;<a href="./assert-not.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./assert.html" class="navigation-link">Back</a>&nbsp;<a href="./assert-not.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+27 -26
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_ASSERT_NOT</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -11,9 +14,9 @@
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./assert-msg.html" class="navigation-link">Prev</a>&nbsp;<a href="./assert-relation.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./assert-msg.html" class="navigation-link">Back</a>&nbsp;<a href="./assert-relation.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./asserts.html" class="navigation-link">Asserts</a> / <a href="./assert-not.html" class="navigation-link">BOOST_MPL_ASSERT_NOT</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-assert-not">
<h1><a class="toc-backref" href="./asserts.html#id1590">BOOST_MPL_ASSERT_NOT</a></h1>
<div class="section" id="id1301">
<div class="section" id="assert-not">
<h1><a class="toc-backref" href="./asserts.html#id513" name="assert-not">BOOST_MPL_ASSERT_NOT</a></h1>
<div class="section" id="macros-asserts-assert-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>( pred ) \
@@ -21,56 +24,55 @@
/**/
</pre>
</div>
<div class="section" id="id1302">
<div class="section" id="macros-asserts-assert-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Generates a compilation error when predicate holds true.</p>
</div>
<div class="section" id="id1303">
<div class="section" id="macros-asserts-assert-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/assert.hpp" class="header">boost/mpl/assert.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1304">
<div class="section" id="macros-asserts-assert-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="16%" />
<col width="38%" />
<col width="46%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">pred</span></tt></td>
<td>Boolean nullary <a class="reference internal" href="./metafunction.html">Metafunction</a></td>
<td>Boolean nullary <a class="reference" href="./metafunction.html">Metafunction</a></td>
<td>A predicate to be asserted to be false.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1305">
<div class="section" id="macros-asserts-assert-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any boolean nullary <a class="reference internal" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">pred</span></tt>:</p>
<p>For any boolean nullary <a class="reference" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">pred</span></tt>:</p>
<pre class="literal-block">
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( pred ));
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">None.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Generates a compilation error if <tt class="literal"><span class="pre">pred::type::value</span> <span class="pre">!=</span> <span class="pre">false</span></tt>, otherwise
has no effect. Note that double parentheses are required even if no commas
has no effect. Note that double parentheses are required even if no commas
appear in the condition.</p>
<p>When possible within the compiler's diagnostic capabilities,
the error message will include the predicate's full type name, and have a
the error message will include the predicate's full type name, and have a
general form of:</p>
<pre class="last literal-block">
<em>...</em> ************boost::mpl::<a href="./not.html" class="identifier">not_</a>&lt; pred >::************ <em>...</em>
@@ -80,7 +82,7 @@ general form of:</p>
</tbody>
</table>
</div>
<div class="section" id="id1306">
<div class="section" id="macros-asserts-assert-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
template&lt; typename T, typename U &gt; struct my
@@ -94,20 +96,19 @@ my&lt;void,void&gt; test;
// In instantiation of `my&lt;void, void&gt;':
// instantiated from here
// conversion from `
// mpl_::failed************boost::mpl::<a href="./not.html" class="identifier">not_</a>&lt;boost::is_same&lt;void, void&gt;
// mpl_::failed************boost::mpl::<a href="./not.html" class="identifier">not_</a>&lt;boost::is_same&lt;void, void&gt;
// &gt;::************' to non-scalar type `mpl_::assert&lt;false&gt;' requested
</pre>
</div>
<div class="section" id="id1307">
<div class="section" id="macros-asserts-assert-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./asserts.html">Asserts</a>, <a class="reference internal" href="./assert.html">BOOST_MPL_ASSERT</a>, <a class="reference internal" href="./assert-msg.html">BOOST_MPL_ASSERT_MSG</a>, <a class="reference internal" href="./assert-relation.html">BOOST_MPL_ASSERT_RELATION</a></p>
<p><a class="reference" href="./asserts.html">Asserts</a>, <a class="refentry reference" href="./assert.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_ASSERT</span></tt></a>, <a class="refentry reference" href="./assert-msg.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_ASSERT_MSG</span></tt></a>, <a class="refentry reference" href="./assert-relation.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_ASSERT_RELATION</span></tt></a></p>
<!-- modtime: November 10, 2004 04:45:20 +0000 -->
<!-- Macros/Asserts//BOOST_MPL_ASSERT_RELATION -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./assert-msg.html" class="navigation-link">Prev</a>&nbsp;<a href="./assert-relation.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./assert-msg.html" class="navigation-link">Back</a>&nbsp;<a href="./assert-relation.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+25 -24
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_ASSERT_RELATION</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -11,9 +14,9 @@
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./assert-not.html" class="navigation-link">Prev</a>&nbsp;<a href="./introspection.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./assert-not.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./asserts.html" class="navigation-link">Asserts</a> / <a href="./assert-relation.html" class="navigation-link">BOOST_MPL_ASSERT_RELATION</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-assert-relation">
<h1><a class="toc-backref" href="./asserts.html#id1591">BOOST_MPL_ASSERT_RELATION</a></h1>
<div class="section" id="id1308">
<div class="section" id="assert-relation">
<h1><a class="toc-backref" href="./asserts.html#id514" name="assert-relation">BOOST_MPL_ASSERT_RELATION</a></h1>
<div class="section" id="the-macros-asserts-assert-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( x, relation, y ) \
@@ -21,30 +24,30 @@
/**/
</pre>
</div>
<div class="section" id="id1309">
<div class="section" id="the-macros-asserts-assert-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>A specialized assertion macro for checking numerical conditions. Generates
a compilation error when the condition <tt class="literal"><span class="pre">(</span> <span class="pre">x</span> <span class="pre">relation</span> <span class="pre">y</span> <span class="pre">)</span></tt>
<p>A specialized assertion macro for checking numerical conditions. Generates
a compilation error when the condition <tt class="literal"><span class="pre">(</span> <span class="pre">x</span> <span class="pre">relation</span> <span class="pre">y</span> <span class="pre">)</span></tt>
doesn't hold.</p>
</div>
<div class="section" id="id1310">
<div class="section" id="the-macros-asserts-assert-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/assert.hpp" class="header">boost/mpl/assert.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1311">
<div class="section" id="the-macros-asserts-assert-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
@@ -64,18 +67,17 @@ checked.</td>
</tbody>
</table>
</div>
<div class="section" id="id1312">
<div class="section" id="the-macros-asserts-assert-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any integral constants <tt class="literal"><span class="pre">x</span></tt>, <tt class="literal"><span class="pre">y</span></tt> and a legal C++ operator token <tt class="literal"><span class="pre">op</span></tt>:</p>
<pre class="literal-block">
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( x, op, y );
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">None.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Generates a compilation error if <tt class="literal"><span class="pre">(</span> <span class="pre">x</span> <span class="pre">op</span> <span class="pre">y</span> <span class="pre">)</span> <span class="pre">!=</span> <span class="pre">true</span></tt>, otherwise
has no effect.</p>
@@ -90,7 +92,7 @@ the actual values of both operands, and have a general form of:</p>
</tbody>
</table>
</div>
<div class="section" id="id1313">
<div class="section" id="the-macros-asserts-assert-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
template&lt; typename T, typename U &gt; struct my
@@ -104,19 +106,18 @@ my&lt;char[50],char[10]&gt; test;
// In instantiation of `my&lt;char[50], char[10]&gt;':
// instantiated from here
// conversion from `
// mpl_::failed************mpl_::assert_relation&lt;<a href="./less.html" class="identifier">less</a>, 50, 10&gt;::************'
// mpl_::failed************mpl_::assert_relation&lt;<a href="./less.html" class="identifier">less</a>, 50, 10&gt;::************'
// to non-scalar type `mpl_::assert&lt;false&gt;' requested
</pre>
</div>
<div class="section" id="id1314">
<div class="section" id="the-macros-asserts-assert-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./asserts.html">Asserts</a>, <a class="reference internal" href="./assert.html">BOOST_MPL_ASSERT</a>, <a class="reference internal" href="./assert-not.html">BOOST_MPL_ASSERT_NOT</a>, <a class="reference internal" href="./assert-msg.html">BOOST_MPL_ASSERT_MSG</a></p>
<p><a class="reference" href="./asserts.html">Asserts</a>, <a class="refentry reference" href="./assert.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_ASSERT</span></tt></a>, <a class="refentry reference" href="./assert-not.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_ASSERT_NOT</span></tt></a>, <a class="refentry reference" href="./assert-msg.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_ASSERT_MSG</span></tt></a></p>
<!-- modtime: November 10, 2004 04:45:16 +0000 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./assert-not.html" class="navigation-link">Prev</a>&nbsp;<a href="./introspection.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./assert-not.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+27 -26
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_ASSERT</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -11,9 +14,9 @@
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Prev</a>&nbsp;<a href="./assert-msg.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./assert-msg.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./asserts.html" class="navigation-link">Asserts</a> / <a href="./assert.html" class="navigation-link">BOOST_MPL_ASSERT</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-assert">
<h1><a class="toc-backref" href="./asserts.html#id1588">BOOST_MPL_ASSERT</a></h1>
<div class="section" id="id1287">
<div class="section" id="assert">
<h1><a class="toc-backref" href="./asserts.html#id511" name="assert">BOOST_MPL_ASSERT</a></h1>
<div class="section" id="assert-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>( pred ) \
@@ -21,56 +24,55 @@
/**/
</pre>
</div>
<div class="section" id="id1288">
<div class="section" id="assert-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Generates a compilation error when the predicate <tt class="literal"><span class="pre">pred</span></tt> holds false.</p>
</div>
<div class="section" id="id1289">
<div class="section" id="assert-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/assert.hpp" class="header">boost/mpl/assert.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1290">
<div class="section" id="assert-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="19%" />
<col width="43%" />
<col width="38%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">pred</span></tt></td>
<td>Boolean nullary <a class="reference internal" href="./metafunction.html">Metafunction</a></td>
<td>Boolean nullary <a class="reference" href="./metafunction.html">Metafunction</a></td>
<td>A predicate to be asserted.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1291">
<div class="section" id="assert-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any boolean nullary <a class="reference internal" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">pred</span></tt>:</p>
<p>For any boolean nullary <a class="reference" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">pred</span></tt>:</p>
<pre class="literal-block">
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( pred ));
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">None.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Generates a compilation error if <tt class="literal"><span class="pre">pred::type::value</span> <span class="pre">!=</span> <span class="pre">true</span></tt>, otherwise
has no effect. Note that double parentheses are required even if no commas
has no effect. Note that double parentheses are required even if no commas
appear in the condition.</p>
<p>When possible within the compiler's diagnostic capabilities,
the error message will include the predicate's full type name, and have a
the error message will include the predicate's full type name, and have a
general form of:</p>
<pre class="last literal-block">
<em>...</em> ************ pred::************ <em>...</em>
@@ -80,7 +82,7 @@ general form of:</p>
</tbody>
</table>
</div>
<div class="section" id="id1292">
<div class="section" id="assert-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
template&lt; typename T, typename U &gt; struct my
@@ -94,20 +96,19 @@ my&lt;void*,char*&gt; test;
// In instantiation of `my&lt;void, char*&gt;':
// instantiated from here
// conversion from `
// mpl_::failed************boost::is_same&lt;void, char*&gt;::************' to
// mpl_::failed************boost::is_same&lt;void, char*&gt;::************' to
// non-scalar type `mpl_::assert&lt;false&gt;' requested
</pre>
</div>
<div class="section" id="id1293">
<div class="section" id="assert-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./asserts.html">Asserts</a>, <a class="reference internal" href="./assert-not.html">BOOST_MPL_ASSERT_NOT</a>, <a class="reference internal" href="./assert-msg.html">BOOST_MPL_ASSERT_MSG</a>, <a class="reference internal" href="./assert-relation.html">BOOST_MPL_ASSERT_RELATION</a></p>
<p><a class="reference" href="./asserts.html">Asserts</a>, <a class="refentry reference" href="./assert-not.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_ASSERT_NOT</span></tt></a>, <a class="refentry reference" href="./assert-msg.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_ASSERT_MSG</span></tt></a>, <a class="refentry reference" href="./assert-relation.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_ASSERT_RELATION</span></tt></a></p>
<!-- modtime: November 10, 2004 04:45:28 +0000 -->
<!-- Macros/Asserts//BOOST_MPL_ASSERT_MSG -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Prev</a>&nbsp;<a href="./assert-msg.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./assert-msg.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./asserts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+12 -10
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Asserts</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,23 +15,22 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./asserts.html" class="navigation-link">Asserts</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="asserts">
<h1><a class="toc-backref" href="./macros.html#id1587">Asserts</a></h1>
<p id="label-macros-asserts">The MPL supplies a suite of static assertion macros that are specifically
<h1><a class="toc-backref" href="./macros.html#id510" name="asserts">Asserts</a></h1>
<a class="target" id="label-macros-asserts" name="label-macros-asserts"></a><p>The MPL supplies a suite of static assertion macros that are specifically
designed to generate maximally useful and informative error messages
within the diagnostic capabilities of each compiler.</p>
<p>All assert macros can be used at class, function, or namespace scope.</p>
<!-- modtime: November 05, 2004 07:25:45 +0000 -->
<!-- Macros/Asserts//BOOST_MPL_ASSERT -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./assert.html" id="id1588">BOOST_MPL_ASSERT</a></li>
<li><a class="reference internal" href="./assert-msg.html" id="id1589">BOOST_MPL_ASSERT_MSG</a></li>
<li><a class="reference internal" href="./assert-not.html" id="id1590">BOOST_MPL_ASSERT_NOT</a></li>
<li><a class="reference internal" href="./assert-relation.html" id="id1591">BOOST_MPL_ASSERT_RELATION</a></li>
<li><a class="reference" href="./assert.html" id="id511" name="id511">BOOST_MPL_ASSERT</a></li>
<li><a class="reference" href="./assert-msg.html" id="id512" name="id512">BOOST_MPL_ASSERT_MSG</a></li>
<li><a class="reference" href="./assert-not.html" id="id513" name="id513">BOOST_MPL_ASSERT_NOT</a></li>
<li><a class="reference" href="./assert-relation.html" id="id514" name="id514">BOOST_MPL_ASSERT_RELATION</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./macros.html" class="navigation-link">Prev</a>&nbsp;<a href="./assert.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./introspection.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./macros.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+48 -46
View File
@@ -1,65 +1,68 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Associative Sequence</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./back-extensible-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./extensible-associative-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./back-extensible-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./extensible-associative-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./back-extensible-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./extensible-associative.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./back-extensible-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./extensible-associative.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./concepts.html" class="navigation-link">Concepts</a> / <a href="./associative-sequence.html" class="navigation-link">Associative Sequence</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="associative-sequence">
<h1><a class="toc-backref" href="./concepts.html#id1401">Associative Sequence</a></h1>
<div class="section" id="id29">
<h1><a class="toc-backref" href="./concepts.html#id330" name="associative-sequence">Associative Sequence</a></h1>
<div class="section" id="associative-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>An <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a> is a <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> that allows efficient retrieval of
elements based on keys. Unlike associative containers in the C++ Standard Library,
MPL associative sequences have no associated ordering relation. Instead,
<em>type identity</em> is used to impose an equivalence relation on keys, and the
order in which sequence elements are traversed during iteration is left
<p>An <a class="reference" href="./associative-sequence.html">Associative Sequence</a> is a <a class="reference" href="./forward-sequence.html">Forward Sequence</a> that allows efficient retrieval of
elements based on keys. Unlike associative containers in the C++ Standard Library,
MPL associative sequences have no associated ordering relation. Instead,
<em>type identity</em> is used to impose an equivalence relation on keys, and the
order in which sequence elements are traversed during iteration is left
unspecified.</p>
</div>
<div class="section" id="id30">
<div class="section" id="associative-definitions">
<h3><a class="subsection-title" href="#definitions" name="definitions">Definitions</a></h3>
<ul class="simple" id="value-part">
<span id="key-part"></span><li>A <em>key</em> is a part of the element type used to identify and retrieve
<a class="target" id="key-part" name="key-part"></a><a class="target" id="value-part" name="value-part"></a><ul class="simple">
<li>A <em>key</em> is a part of the element type used to identify and retrieve
the element within the sequence.</li>
<li>A <em>value</em> is a part of the element type retrievied from the sequence
<li>A <em>value</em> is a part of the element type retrievied from the sequence
by its key.</li>
</ul>
</div>
<div class="section" id="id31">
<div class="section" id="associative-expression-requirements">
<h3><a class="subsection-title" href="#expression-requirements" name="expression-requirements">Expression requirements</a></h3>
<p>In the following table and subsequent specifications, <tt class="literal"><span class="pre">s</span></tt> is an <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a>,
<p>In the following table and subsequent specifications, <tt class="literal"><span class="pre">s</span></tt> is an <a class="reference" href="./associative-sequence.html">Associative Sequence</a>,
<tt class="literal"><span class="pre">x</span></tt> is a sequence element, and <tt class="literal"><span class="pre">k</span></tt> and <tt class="literal"><span class="pre">def</span></tt> are arbitrary types.</p>
<p>In addition to the requirements defined in <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>,
<p>In addition to the requirements defined in <a class="reference" href="./forward-sequence.html">Forward Sequence</a>,
the following must be met:</p>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="33%" />
<col width="38%" />
<col width="29%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Type</th>
<th class="head">Complexity</th>
<tr><th>Expression</th>
<th>Type</th>
<th>Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./has-key.html" class="identifier">has_key</a>&lt;s,k&gt;::type</span></tt></td>
<td>Boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td>Boolean <a class="reference" href="./integral-constant.html">Integral Constant</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./count.html" class="identifier">count</a>&lt;s,k&gt;::type</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td><a class="reference" href="./integral-constant.html">Integral Constant</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./order.html" class="identifier">order</a>&lt;s,k&gt;::type</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a> or <tt class="literal"><span class="pre"><a href="./void.html" class="identifier">void_</a></span></tt></td>
<td><a class="reference" href="./integral-constant.html">Integral Constant</a> or <tt class="literal"><span class="pre"><a href="./void.html" class="identifier">void_</a></span></tt></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./at.html" class="identifier">at</a>&lt;s,k&gt;::type</span></tt></td>
@@ -81,33 +84,33 @@ the following must be met:</p>
</tbody>
</table>
</div>
<div class="section" id="id32">
<div class="section" id="associative-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>.</p>
<table border="1" class="docutils table">
where they differ from, or are not defined in <a class="reference" href="./forward-sequence.html">Forward Sequence</a>.</p>
<table border="1" class="table">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
<tr><th>Expression</th>
<th>Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./has-key.html" class="identifier">has_key</a>&lt;s,k&gt;::type</span></tt></td>
<td>A boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c</span></tt> such that
<td>A boolean <a class="reference" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c</span></tt> such that
<tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and only if there is one or more
elements with the key <tt class="literal"><span class="pre">k</span></tt> in <tt class="literal"><span class="pre">s</span></tt>; see <a class="reference internal" href="./has-key.html">has_key</a>.</td>
elements with the key <tt class="literal"><span class="pre">k</span></tt> in <tt class="literal"><span class="pre">s</span></tt>; see <a class="refentry reference" href="./has-key.html"><tt class="refentry literal"><span class="pre">has_key</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./count.html" class="identifier">count</a>&lt;s,k&gt;::type</span></tt></td>
<td>The number of elements with the key <tt class="literal"><span class="pre">k</span></tt> in <tt class="literal"><span class="pre">s</span></tt>;
see <a class="reference internal" href="./count.html">count</a>.</td>
see <a class="refentry reference" href="./count.html"><tt class="refentry literal"><span class="pre">count</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./order.html" class="identifier">order</a>&lt;s,k&gt;::type</span></tt></td>
<td>A unique unsigned <a class="reference internal" href="./integral-constant.html">Integral Constant</a> associated
with the key <tt class="literal"><span class="pre">k</span></tt> in the sequence <tt class="literal"><span class="pre">s</span></tt>; see <a class="reference internal" href="./order.html">order</a>.</td>
<td>A unique unsigned <a class="reference" href="./integral-constant.html">Integral Constant</a> associated
with the key <tt class="literal"><span class="pre">k</span></tt> in the sequence <tt class="literal"><span class="pre">s</span></tt>; see <a class="refentry reference" href="./order.html"><tt class="refentry literal"><span class="pre">order</span></tt></a>.</td>
</tr>
<tr><td><pre class="first last literal-block">
<a href="./at.html" class="identifier">at</a>&lt;s,k&gt;::type
@@ -115,43 +118,42 @@ with the key <tt class="literal"><span class="pre">k</span></tt> in the sequence
</pre>
</td>
<td>The first element associated with the key <tt class="literal"><span class="pre">k</span></tt>
in the sequence <tt class="literal"><span class="pre">s</span></tt>; see <a class="reference internal" href="./at.html">at</a>.</td>
in the sequence <tt class="literal"><span class="pre">s</span></tt>; see <a class="refentry reference" href="./at.html"><tt class="refentry literal"><span class="pre">at</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./key-type.html" class="identifier">key_type</a>&lt;s,x&gt;::type</span></tt></td>
<td>The key part of the element <tt class="literal"><span class="pre">x</span></tt> that would be
used to identify <tt class="literal"><span class="pre">x</span></tt> in <tt class="literal"><span class="pre">s</span></tt>; see <a class="reference internal" href="./key-type.html">key_type</a>.</td>
used to identify <tt class="literal"><span class="pre">x</span></tt> in <tt class="literal"><span class="pre">s</span></tt>; see <a class="refentry reference" href="./key-type.html"><tt class="refentry literal"><span class="pre">key_type</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./value-type.html" class="identifier">value_type</a>&lt;s,x&gt;::type</span></tt></td>
<td>The value part of the element <tt class="literal"><span class="pre">x</span></tt> that would be
used for <tt class="literal"><span class="pre">x</span></tt> in <tt class="literal"><span class="pre">s</span></tt>; see <a class="reference internal" href="./value-type.html">value_type</a>.</td>
used for <tt class="literal"><span class="pre">x</span></tt> in <tt class="literal"><span class="pre">s</span></tt>; see <a class="refentry reference" href="./value-type.html"><tt class="refentry literal"><span class="pre">value_type</span></tt></a>.</td>
</tr>
</tbody>
</table>
<!-- Invariants
- - - - - - - - - -
For any associative sequence ``s`` the following invariants always hold:
For any associative sequence ``s`` the following invariants always hold:
* ??? -->
</div>
<div class="section" id="id33">
<div class="section" id="associative-models">
<h3><a class="subsection-title" href="#models" name="models">Models</a></h3>
<ul class="simple">
<li><a class="reference internal" href="./set.html">set</a></li>
<li><a class="reference internal" href="./map.html">map</a></li>
<li><a class="refentry reference" href="./set.html"><tt class="refentry literal"><span class="pre">set</span></tt></a></li>
<li><a class="refentry reference" href="./map.html"><tt class="refentry literal"><span class="pre">map</span></tt></a></li>
</ul>
<!-- * |multiset| -->
</div>
<div class="section" id="id34">
<div class="section" id="associative-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a>, <a class="reference internal" href="./has-key.html">has_key</a>, <a class="reference internal" href="./count.html">count</a>, <a class="reference internal" href="./order.html">order</a>, <a class="reference internal" href="./at.html">at</a>, <a class="reference internal" href="./key-type.html">key_type</a>, <a class="reference internal" href="./value-type.html">value_type</a></p>
<p><a class="reference" href="./sequences.html">Sequences</a>, <a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a>, <a class="refentry reference" href="./has-key.html"><tt class="refentry literal"><span class="pre">has_key</span></tt></a>, <a class="refentry reference" href="./count.html"><tt class="refentry literal"><span class="pre">count</span></tt></a>, <a class="refentry reference" href="./order.html"><tt class="refentry literal"><span class="pre">order</span></tt></a>, <a class="refentry reference" href="./at.html"><tt class="refentry literal"><span class="pre">at</span></tt></a>, <a class="refentry reference" href="./key-type.html"><tt class="refentry literal"><span class="pre">key_type</span></tt></a>, <a class="refentry reference" href="./value-type.html"><tt class="refentry literal"><span class="pre">value_type</span></tt></a></p>
<!-- modtime: November 13, 2004 00:51:14 +0000 -->
<!-- Sequences/Concepts//Extensible Associative Sequence |80 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./back-extensible-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./extensible-associative-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./back-extensible-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./extensible-associative-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./back-extensible-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./extensible-associative.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./back-extensible-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./extensible-associative.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
</tr></table></body>
</html>
+35 -35
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: at_c</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./at-c.html" class="navigation-link">at_c</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="at-c">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1426">at_c</a></h1>
<div class="section" id="id185">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id354" name="at-c">at_c</a></h1>
<div class="section" id="intrinsic-at-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -26,35 +29,35 @@ struct <a href="./at-c.html" class="identifier">at_c</a>
};
</pre>
</div>
<div class="section" id="id186">
<div class="section" id="intrinsic-at-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns a type identical to the <tt class="literal"><span class="pre">n</span></tt>th element from the beginning of
the sequence. <tt class="literal"><span class="pre"><a href="./at-c.html" class="identifier">at_c</a>&lt;Sequence,n&gt;::type</span></tt> is a shorcut notation for
<p>Returns a type identical to the <tt class="literal"><span class="pre">n</span></tt>th element from the beginning of
the sequence. <tt class="literal"><span class="pre"><a href="./at-c.html" class="identifier">at_c</a>&lt;Sequence,n&gt;::type</span></tt> is a shorcut notation for
<tt class="literal"><span class="pre"><a href="./at.html" class="identifier">at</a>&lt;</span> <span class="pre">Sequence,</span> <span class="pre"><a href="./long.html" class="identifier">long_</a>&lt;n&gt;</span> <span class="pre">&gt;::type</span></tt>.</p>
</div>
<div class="section" id="id187">
<div class="section" id="intrinsic-at-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/at.hpp" class="header">boost/mpl/at.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id188">
<div class="section" id="intrinsic-at-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td><a class="reference" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to be examined.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">n</span></tt></td>
@@ -65,20 +68,18 @@ specifying the element to be retrieved.</td>
</tbody>
</table>
</div>
<div class="section" id="id189">
<div class="section" id="intrinsic-at-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<pre class="literal-block">
typedef <a href="./at-c.html" class="identifier">at_c</a>&lt;Sequence,n&gt;::type t;
typedef <a href="./at-c.html" class="identifier">at_c</a>&lt;Sequence,n&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">A type</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">0</span> <span class="pre">&lt;=</span> <span class="pre">n</span> <span class="pre">&lt;</span> <span class="pre"><a href="./size.html" class="identifier">size</a>&lt;Sequence&gt;::value</span></tt></p>
</td>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><tt class="literal"><span class="pre">0</span> <span class="pre">&lt;=</span> <span class="pre">n</span> <span class="pre">&lt;</span> <span class="pre"><a href="./size.html" class="identifier">size</a>&lt;Sequence&gt;::value</span></tt></td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -89,47 +90,46 @@ typedef <a href="./at.html" class="identifier">at</a>&lt; Sequence, <a href="./l
</tbody>
</table>
</div>
<div class="section" id="id190">
<div class="section" id="at-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="47%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Sequence archetype</th>
<th class="head">Complexity</th>
<tr><th>Sequence archetype</th>
<th>Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<tr><td><a class="reference" href="./forward-sequence.html">Forward Sequence</a></td>
<td>Linear.</td>
</tr>
<tr><td><a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a></td>
<tr><td><a class="reference" href="./random-access-sequence.html">Random Access Sequence</a></td>
<td>Amortized constant time.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id191">
<div class="section" id="intrinsic-at-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./range-c.html" class="identifier">range_c</a>&lt;long,10,50&gt; range;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./at-c.html" class="identifier">at_c</a>&lt; range,0 &gt;::type::value), ==, 10 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./at-c.html" class="identifier">at_c</a>&lt; range,10 &gt;::type::value), ==, 20 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./at-c.html" class="identifier">at_c</a>&lt; range,40 &gt;::type::value), ==, 50 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./at-c.html" class="identifier">at_c</a>&lt; range,0 &gt;::value), ==, 10 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./at-c.html" class="identifier">at_c</a>&lt; range,10 &gt;::value), ==, 20 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./at-c.html" class="identifier">at_c</a>&lt; range,40 &gt;::value), ==, 50 );
</pre>
</div>
<div class="section" id="id192">
<div class="section" id="intrinsic-at-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a>, <a class="reference internal" href="./at.html">at</a>, <a class="reference internal" href="./front.html">front</a>, <a class="reference internal" href="./back.html">back</a></p>
<p><a class="reference" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference" href="./random-access-sequence.html">Random Access Sequence</a>, <a class="refentry reference" href="./at.html"><tt class="refentry literal"><span class="pre">at</span></tt></a>, <a class="refentry reference" href="./front.html"><tt class="refentry literal"><span class="pre">front</span></tt></a>, <a class="refentry reference" href="./back.html"><tt class="refentry literal"><span class="pre">back</span></tt></a></p>
<!-- modtime: November 13, 2004 01:23:57 +0000 -->
<!-- Sequences/Intrinsic Metafunctions//back -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./at.html" class="navigation-link">Prev</a>&nbsp;<a href="./back.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./at.html" class="navigation-link">Back</a>&nbsp;<a href="./back.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+47 -48
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: at</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./at.html" class="navigation-link">at</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="at">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1425">at</a></h1>
<div class="section" id="id177">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id353" name="at">at</a></h1>
<div class="section" id="at-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -36,52 +39,52 @@ struct <a href="./at.html" class="identifier">at</a>
};
</pre>
</div>
<div class="section" id="id178">
<div class="section" id="at-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./at.html" class="identifier">at</a></span></tt> is an <a class="reference internal" href="./terminology.html#overloaded-name">overloaded name</a>:</p>
<p><tt class="literal"><span class="pre"><a href="./at.html" class="identifier">at</a></span></tt> is an <a class="reference" href="./terminology.html#overloaded-name">overloaded name</a>:</p>
<ul class="simple">
<li><tt class="literal"><span class="pre"><a href="./at.html" class="identifier">at</a>&lt;Sequence,N&gt;</span></tt> returns the <tt class="literal"><span class="pre">N</span></tt>-th element from the beginning of the
<a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">Sequence</span></tt>.</li>
<li><tt class="literal"><span class="pre"><a href="./at.html" class="identifier">at</a>&lt;AssocSeq,Key,Default&gt;</span></tt> returns the first element associated with <tt class="literal"><span class="pre">Key</span></tt>
in the <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a> <tt class="literal"><span class="pre">AssocSeq</span></tt>, or <tt class="literal"><span class="pre">Default</span></tt> if no such element
<li><tt class="literal"><span class="pre"><a href="./at.html" class="identifier">at</a>&lt;Sequence,N&gt;</span></tt> returns the <tt class="literal"><span class="pre">N</span></tt>-th element from the beginning of the
<a class="reference" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">Sequence</span></tt>.</li>
<li><tt class="literal"><span class="pre"><a href="./at.html" class="identifier">at</a>&lt;AssocSeq,Key,Default&gt;</span></tt> returns the first element associated with <tt class="literal"><span class="pre">Key</span></tt>
in the <a class="reference" href="./associative-sequence.html">Associative Sequence</a> <tt class="literal"><span class="pre">AssocSeq</span></tt>, or <tt class="literal"><span class="pre">Default</span></tt> if no such element
exists.</li>
</ul>
</div>
<div class="section" id="id179">
<div class="section" id="at-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/at.hpp" class="header">boost/mpl/at.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id180">
<div class="section" id="at-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
<p><a class="reference" href="./tag-dispatched.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id181">
<div class="section" id="at-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td><a class="reference" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to be examined.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">AssocSeq</span></tt></td>
<td><a class="reference internal" href="./associative-sequence.html">Associative Sequence</a></td>
<td><a class="reference" href="./associative-sequence.html">Associative Sequence</a></td>
<td>A sequence to be examined.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">N</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td><a class="reference" href="./integral-constant.html">Integral Constant</a></td>
<td>An offset from the beginning of the sequence
specifying the element to be retrieved.</td>
</tr>
@@ -97,22 +100,20 @@ not found.</td>
</tbody>
</table>
</div>
<div class="section" id="id182">
<div class="section" id="at-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<div class="expression-semantics compound">
<p class="compound-first">For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">n</span></tt>:</p>
<p class="compound-first">For any <a class="reference" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and <a class="reference" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">n</span></tt>:</p>
<pre class="compound-middle literal-block">
typedef <a href="./at.html" class="identifier">at</a>&lt;s,n&gt;::type t;
typedef <a href="./at.html" class="identifier">at</a>&lt;s,n&gt;::type t;
</pre>
<table class="compound-last docutils field-list" frame="void" rules="none">
<table class="compound-last field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">A type.</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">0</span> <span class="pre">&lt;=</span> <span class="pre">n::value</span> <span class="pre">&lt;</span> <span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt>.</p>
</td>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><tt class="literal"><span class="pre">0</span> <span class="pre">&lt;=</span> <span class="pre">n::value</span> <span class="pre">&lt;</span> <span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -124,11 +125,11 @@ typedef <a href="./deref.html" class="identifier">deref</a>&lt; <a href="./advan
</table>
</div>
<div class="expression-semantics compound">
<p class="compound-first">For any <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and arbitrary types <tt class="literal"><span class="pre">key</span></tt> and <tt class="literal"><span class="pre">x</span></tt>:</p>
<p class="compound-first">For any <a class="reference" href="./associative-sequence.html">Associative Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and arbitrary types <tt class="literal"><span class="pre">key</span></tt> and <tt class="literal"><span class="pre">x</span></tt>:</p>
<pre class="compound-middle literal-block">
typedef <a href="./at.html" class="identifier">at</a>&lt;s,key,x&gt;::type t;
typedef <a href="./at.html" class="identifier">at</a>&lt;s,key,x&gt;::type t;
</pre>
<table class="compound-middle docutils field-list" frame="void" rules="none">
<table class="compound-middle field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
@@ -141,14 +142,13 @@ otherwise <tt class="literal"><span class="pre">t</span></tt> is identical to <t
</table>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<pre class="compound-middle literal-block">
typedef <a href="./at.html" class="identifier">at</a>&lt;s,key&gt;::type t;
typedef <a href="./at.html" class="identifier">at</a>&lt;s,key&gt;::type t;
</pre>
<table class="compound-last docutils field-list" frame="void" rules="none">
<table class="compound-last field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">A type.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -161,31 +161,31 @@ typedef <a href="./at.html" class="identifier">at</a>&lt;s,key,<a href="./void.h
</div>
</div>
<div class="section" id="complexity">
<h3>Complexity</h3>
<table border="1" class="docutils table">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<table border="1" class="table">
<colgroup>
<col width="47%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Sequence archetype</th>
<th class="head">Complexity</th>
<tr><th>Sequence archetype</th>
<th>Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<tr><td><a class="reference" href="./forward-sequence.html">Forward Sequence</a></td>
<td>Linear.</td>
</tr>
<tr><td><a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a></td>
<tr><td><a class="reference" href="./random-access-sequence.html">Random Access Sequence</a></td>
<td>Amortized constant time.</td>
</tr>
<tr><td><a class="reference internal" href="./associative-sequence.html">Associative Sequence</a></td>
<tr><td><a class="reference" href="./associative-sequence.html">Associative Sequence</a></td>
<td>Amortized constant time.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id183">
<div class="section" id="at-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./range-c.html" class="identifier">range_c</a>&lt;long,10,50&gt; range;
@@ -200,16 +200,15 @@ typedef <a href="./set.html" class="identifier">set</a>&lt; int const,long*,doub
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./at.html" class="identifier">at</a>&lt;s,int&gt;::type, int > ));
</pre>
</div>
<div class="section" id="id184">
<div class="section" id="at-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a>, <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a>, <a class="reference internal" href="./at-c.html">at_c</a>, <a class="reference internal" href="./front.html">front</a>, <a class="reference internal" href="./back.html">back</a></p>
<p><a class="reference" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference" href="./random-access-sequence.html">Random Access Sequence</a>, <a class="reference" href="./associative-sequence.html">Associative Sequence</a>, <a class="refentry reference" href="./at-c.html"><tt class="refentry literal"><span class="pre">at_c</span></tt></a>, <a class="refentry reference" href="./front.html"><tt class="refentry literal"><span class="pre">front</span></tt></a>, <a class="refentry reference" href="./back.html"><tt class="refentry literal"><span class="pre">back</span></tt></a></p>
<!-- modtime: November 13, 2004 01:23:02 +0000 -->
<!-- Sequences/Intrinsic Metafunctions//at_c -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Prev</a>&nbsp;<a href="./at-c.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./at-c.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+32 -30
View File
@@ -1,19 +1,22 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_AUX_LAMBDA_SUPPORT</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./broken-compiler-workarounds.html" class="navigation-link">Prev</a>&nbsp;<a href="./terminology.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./broken-compiler-workarounds.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./broken-compiler-workarounds.html" class="navigation-link">Broken Compiler Workarounds</a> / <a href="./aux-lambda-support.html" class="navigation-link">BOOST_MPL_AUX_LAMBDA_SUPPORT</a></td>
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./broken-compiler.html" class="navigation-link">Prev</a>&nbsp;<a href="./terminology.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./broken-compiler.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./broken-compiler.html" class="navigation-link">Broken Compiler Workarounds</a> / <a href="./aux-lambda-support.html" class="navigation-link">BOOST_MPL_AUX_LAMBDA_SUPPORT</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-aux-lambda-support">
<h1><a class="toc-backref" href="./broken-compiler-workarounds.html#id1609">BOOST_MPL_AUX_LAMBDA_SUPPORT</a></h1>
<div class="section" id="id1384">
<div class="section" id="aux-lambda-support">
<h1><a class="toc-backref" href="./broken-compiler.html#id528" name="aux-lambda-support">BOOST_MPL_AUX_LAMBDA_SUPPORT</a></h1>
<div class="section" id="aux-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./aux-lambda-support.html" class="identifier">BOOST_MPL_AUX_LAMBDA_SUPPORT</a>(arity, fun, params) \
@@ -21,30 +24,30 @@
/**/
</pre>
</div>
<div class="section" id="id1385">
<div class="section" id="aux-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Enables metafunction <tt class="literal"><span class="pre">fun</span></tt> for the use in <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a>s on
compilers that don't support partial template specialization or/and
<p>Enables metafunction <tt class="literal"><span class="pre">fun</span></tt> for the use in <a class="reference" href="./lambda-expression.html">Lambda Expression</a>s on
compilers that don't support partial template specialization or/and
template template parameters. Expands to nothing on conforming compilers.</p>
</div>
<div class="section" id="id1386">
<div class="section" id="aux-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/aux_/lambda_support.hpp" class="header">boost/mpl/aux_/lambda_support.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1387">
<div class="section" id="aux-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="15%" />
<col width="32%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
@@ -58,16 +61,16 @@ template parameters, including the defaults.</td>
<td>The metafunction's name.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">params</span></tt></td>
<td>A <a class="reference external" href="http://www.boost.org/libs/preprocessor/doc/data/tuples.html" target="_top">PP-tuple</a></td>
<td>A <a class="reference" href="http://www.boost.org/libs/preprocessor/doc/data/tuples.html" target="_top">PP-tuple</a></td>
<td>A tuple of the metafunction's parameter names, in
their original order, including the defaults.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1388">
<div class="section" id="aux-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any integral constant <tt class="literal"><span class="pre">n</span></tt>, a <a class="reference internal" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">fun</span></tt>, and arbitrary types <tt class="literal"><span class="pre">A1</span></tt>,... <tt class="literal"><span class="pre">An</span></tt>:</p>
<p>For any integral constant <tt class="literal"><span class="pre">n</span></tt>, a <a class="reference" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">fun</span></tt>, and arbitrary types <tt class="literal"><span class="pre">A1</span></tt>,... <tt class="literal"><span class="pre">An</span></tt>:</p>
<pre class="literal-block">
template&lt; typename A1,<em>...</em> typename A<em>n</em> &gt; struct fun
{
@@ -76,24 +79,24 @@ template&lt; typename A1,<em>...</em> typename A<em>n</em> &gt; struct fun
<a href="./aux-lambda-support.html" class="identifier">BOOST_MPL_AUX_LAMBDA_SUPPORT</a>(n, fun, (A1,<em>...</em>A<em>n</em>))
};
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body">Appears in <tt class="literal"><span class="pre">fun</span></tt>'s scope, immediately followed by the scope-closing
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body">Appears in <tt class="literal"><span class="pre">fun</span></tt>'s scope, immediately followed by the scope-closing
bracket (<tt class="literal"><span class="pre">}</span></tt>).</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">None.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">Expands to nothing and has no effect on conforming compilers. On compilers that
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">Expands to nothing and has no effect on conforming compilers. On compilers that
don't support partial template specialization or/and template template parameters
expands to an unspecified token sequence enabling <tt class="literal"><span class="pre">fun</span></tt> to participate in
<a class="reference internal" href="./lambda-expression.html">Lambda Expression</a>s with the semantics described in this manual.</td>
<a class="reference" href="./lambda-expression.html">Lambda Expression</a>s with the semantics described in this manual.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1389">
<div class="section" id="aux-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
template&lt; typename T, typename U = int &gt; struct f
@@ -103,19 +106,18 @@ template&lt; typename T, typename U = int &gt; struct f
<a href="./aux-lambda-support.html" class="identifier">BOOST_MPL_AUX_LAMBDA_SUPPORT</a>(2, f, (T,U))
};
typedef <a href="./apply.html" class="identifier">apply</a><tt class="literal"><span class="pre">1</span></tt>&lt; f&lt;char,<a href="./placeholders.html" class="identifier">_1</a>&gt;,long &gt;::type r;
typedef <a href="./apply.html" class="identifier">apply</a><tt class="literal"><span class="pre">1</span></tt>&lt; f&lt;char,_1&gt;,long &gt;::type r;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; r, char[sizeof(long)] > ));
</pre>
</div>
<div class="section" id="id1390">
<div class="section" id="aux-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./macros.html">Macros</a>, <a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></p>
<p><a class="reference" href="./macros.html">Macros</a>, <a class="reference" href="./metafunctions.html">Metafunctions</a>, <a class="reference" href="./lambda-expression.html">Lambda Expression</a></p>
<!-- modtime: November 10, 2004 04:45:01 +0000 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./broken-compiler-workarounds.html" class="navigation-link">Prev</a>&nbsp;<a href="./terminology.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./broken-compiler-workarounds.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./broken-compiler.html" class="navigation-link">Prev</a>&nbsp;<a href="./terminology.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./broken-compiler.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
</tr></table></body>
</html>
+33 -31
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Back Extensible Sequence</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,39 +15,39 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./concepts.html" class="navigation-link">Concepts</a> / <a href="./back-extensible-sequence.html" class="navigation-link">Back Extensible Sequence</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="back-extensible-sequence">
<h1><a class="toc-backref" href="./concepts.html#id1400">Back Extensible Sequence</a></h1>
<div class="section" id="id23">
<h1><a class="toc-backref" href="./concepts.html#id329" name="back-extensible-sequence">Back Extensible Sequence</a></h1>
<div class="section" id="back-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>A <a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a> is an <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> that supports amortized constant
<p>A <a class="reference" href="./back-extensible-sequence.html">Back Extensible Sequence</a> is an <a class="reference" href="./extensible-sequence.html">Extensible Sequence</a> that supports amortized constant
time insertion and removal operations at the end.</p>
</div>
<div class="section" id="id24">
<div class="section" id="back-refinement-of">
<h3><a class="subsection-title" href="#refinement-of" name="refinement-of">Refinement of</a></h3>
<p><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></p>
<p><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a></p>
</div>
<div class="section" id="id25">
<div class="section" id="back-expression-requirements">
<h3><a class="subsection-title" href="#expression-requirements" name="expression-requirements">Expression requirements</a></h3>
<p>In addition to the requirements defined in <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>,
for any <a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt> the following must be met:</p>
<table border="1" class="docutils table">
<p>In addition to the requirements defined in <a class="reference" href="./extensible-sequence.html">Extensible Sequence</a>,
for any <a class="reference" href="./back-extensible-sequence.html">Back Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt> the following must be met:</p>
<table border="1" class="table">
<colgroup>
<col width="35%" />
<col width="35%" />
<col width="30%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Type</th>
<th class="head">Complexity</th>
<tr><th>Expression</th>
<th>Type</th>
<th>Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./push-back.html" class="identifier">push_back</a>&lt;s,x&gt;::type</span></tt></td>
<td><a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a></td>
<td><a class="reference" href="./back-extensible-sequence.html">Back Extensible Sequence</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./pop-back.html" class="identifier">pop_back</a>&lt;s&gt;::type</span></tt></td>
<td><a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a></td>
<td><a class="reference" href="./back-extensible-sequence.html">Back Extensible Sequence</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./back.html" class="identifier">back</a>&lt;s&gt;::type</span></tt></td>
@@ -54,52 +57,51 @@ for any <a class="reference internal" href="./back-extensible-sequence.html">Bac
</tbody>
</table>
</div>
<div class="section" id="id26">
<div class="section" id="back-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>.</p>
<table border="1" class="docutils table">
where they differ from, or are not defined in <a class="reference" href="./extensible-sequence.html">Extensible Sequence</a>.</p>
<table border="1" class="table">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
<tr><th>Expression</th>
<th>Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./push-back.html" class="identifier">push_back</a>&lt;s,x&gt;::type</span></tt></td>
<td>Equivalent to <tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;s,<a href="./end.html" class="identifier">end</a>&lt;s&gt;::type,x&gt;::type</span></tt>;
see <a class="reference internal" href="./push-back.html">push_back</a>.</td>
see <a class="refentry reference" href="./push-back.html"><tt class="refentry literal"><span class="pre">push_back</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./pop-back.html" class="identifier">pop_back</a>&lt;v&gt;::type</span></tt></td>
<td>Equivalent to <tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a>&lt;s,<a href="./end.html" class="identifier">end</a>&lt;s&gt;::type&gt;::type</span></tt>;
see <a class="reference internal" href="./pop-back.html">pop_back</a>.</td>
see <a class="refentry reference" href="./pop-back.html"><tt class="refentry literal"><span class="pre">pop_back</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./back.html" class="identifier">back</a>&lt;s&gt;::type</span></tt></td>
<td>The last element in the sequence; see <a class="reference internal" href="./back.html">back</a>.</td>
<td>The last element in the sequence; see <a class="refentry reference" href="./back.html"><tt class="refentry literal"><span class="pre">back</span></tt></a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id27">
<div class="section" id="back-models">
<h3><a class="subsection-title" href="#models" name="models">Models</a></h3>
<ul class="simple">
<li><a class="reference internal" href="./vector.html">vector</a></li>
<li><a class="reference internal" href="./deque.html">deque</a></li>
<li><a class="refentry reference" href="./vector.html"><tt class="refentry literal"><span class="pre">vector</span></tt></a></li>
<li><a class="refentry reference" href="./deque.html"><tt class="refentry literal"><span class="pre">deque</span></tt></a></li>
</ul>
</div>
<div class="section" id="id28">
<div class="section" id="back-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>, <a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a>, <a class="reference internal" href="./push-back.html">push_back</a>, <a class="reference internal" href="./pop-back.html">pop_back</a>, <a class="reference internal" href="./back.html">back</a></p>
<p><a class="reference" href="./sequences.html">Sequences</a>, <a class="reference" href="./extensible-sequence.html">Extensible Sequence</a>, <a class="reference" href="./front-extensible-sequence.html">Front Extensible Sequence</a>, <a class="refentry reference" href="./push-back.html"><tt class="refentry literal"><span class="pre">push_back</span></tt></a>, <a class="refentry reference" href="./pop-back.html"><tt class="refentry literal"><span class="pre">pop_back</span></tt></a>, <a class="refentry reference" href="./back.html"><tt class="refentry literal"><span class="pre">back</span></tt></a></p>
<!-- modtime: November 10, 2004 04:27:21 +0000 -->
<!-- Sequences/Concepts//Associative Sequence |70 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./front-extensible-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./associative-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./front-extensible-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./associative-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+31 -29
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: back_inserter</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./inserters.html" class="navigation-link">Inserters</a> / <a href="./back-inserter.html" class="navigation-link">back_inserter</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="back-inserter">
<h1><a class="toc-backref" href="./inserters.html#id1465">back_inserter</a></h1>
<div class="section" id="id465">
<h1><a class="toc-backref" href="./inserters.html#id393" name="back-inserter">back_inserter</a></h1>
<div class="section" id="inserters-back-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -26,93 +29,92 @@ struct <a href="./back-inserter.html" class="identifier">back_inserter</a>
};
</pre>
</div>
<div class="section" id="id466">
<div class="section" id="inserters-back-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Inserts elements at the end of the sequence.</p>
</div>
<div class="section" id="id467">
<div class="section" id="inserters-back-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/back_inserter.hpp" class="header">boost/mpl/back_inserter.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id468">
<div class="section" id="inserters-back-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./inserter.html">Inserter</a></p>
<p><a class="reference" href="./inserter.html">Inserter</a></p>
</div>
<div class="section" id="id469">
<div class="section" id="inserters-back-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="18%" />
<col width="36%" />
<col width="46%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Seq</span></tt></td>
<td><a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a></td>
<td><a class="reference" href="./back-extensible-sequence.html">Back Extensible Sequence</a></td>
<td>A sequence to bind the inserter to.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id470">
<div class="section" id="inserters-back-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./inserter.html">Inserter</a>.</p>
<p>For any <a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p>
<table border="1" class="docutils table">
where they differ from, or are not defined in <a class="reference" href="./inserter.html">Inserter</a>.</p>
<p>For any <a class="reference" href="./back-extensible-sequence.html">Back Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p>
<table border="1" class="table">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
<tr><th>Expression</th>
<th>Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./back-inserter.html" class="identifier">back_inserter</a>&lt;s&gt;</span></tt></td>
<td><p class="first">An <a class="reference internal" href="./inserter.html">Inserter</a> <tt class="literal"><span class="pre">in</span></tt>, equivalent to</p>
<td><p class="first">An <a class="reference" href="./inserter.html">Inserter</a> <tt class="literal"><span class="pre">in</span></tt>, equivalent to</p>
<pre class="last literal-block">
struct in : <a href="./inserter-class.html" class="identifier">inserter</a>&lt;s,<a href="./push-back.html" class="identifier">push_back</a>&lt;<a href="./placeholders.html" class="identifier">_1</a>,<a href="./placeholders.html" class="identifier">_2</a>&gt; > {};
struct in : <a href="./inserter.html" class="identifier">inserter</a>&lt;s,<a href="./push-back.html" class="identifier">push_back</a>&lt;_1,_2&gt; > {};
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id471">
<div class="section" id="inserters-back-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id472">
<div class="section" id="inserters-back-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./copy.html" class="identifier">copy</a>&lt;
<a href="./range-c.html" class="identifier">range_c</a>&lt;int,5,10&gt;
, <a href="./back-inserter.html" class="identifier">back_inserter</a>&lt; <a href="./vector-c.html" class="identifier">vector_c</a>&lt;int,0,1,2,3,4&gt; &gt;
&gt;::type range;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./equal.html" class="identifier">equal</a>&lt; range, <a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,10&gt; > ));
</pre>
</div>
<div class="section" id="id473">
<div class="section" id="inserters-back-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./algorithms.html">Algorithms</a>, <a class="reference internal" href="./inserter.html">Inserter</a>, <a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a>, <a class="reference internal" href="./inserter-class.html">inserter (class)</a>, <a class="reference internal" href="./front-inserter.html">front_inserter</a>, <a class="reference internal" href="./push-back.html">push_back</a></p>
<p><a class="reference" href="./algorithms.html">Algorithms</a>, <a class="reference" href="./inserter.html">Inserter</a>, <a class="reference" href="./reversible-algorithm.html">Reversible Algorithm</a>, <a class="refentry reference" href="./inserters-inserter.html"><tt class="refentry literal"><span class="pre">inserter</span></tt></a>, <a class="refentry reference" href="./front-inserter.html"><tt class="refentry literal"><span class="pre">front_inserter</span></tt></a>, <a class="refentry reference" href="./push-back.html"><tt class="refentry literal"><span class="pre">push_back</span></tt></a></p>
<!-- modtime: November 10, 2004 04:44:52 +0000 -->
<!-- Algorithms/Inserters//front_inserter -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./inserters.html" class="navigation-link">Prev</a>&nbsp;<a href="./front-inserter.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./front-inserter.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./inserters.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+29 -29
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: back</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./back.html" class="navigation-link">back</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="back">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1427">back</a></h1>
<div class="section" id="id193">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id355" name="back">back</a></h1>
<div class="section" id="back-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -25,57 +28,55 @@ struct <a href="./back.html" class="identifier">back</a>
};
</pre>
</div>
<div class="section" id="id194">
<div class="section" id="intrinsic-back-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the last element in the sequence.</p>
</div>
<div class="section" id="id195">
<div class="section" id="back-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/back.hpp" class="header">boost/mpl/back.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id196">
<div class="section" id="back-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
<p><a class="reference" href="./tag-dispatched.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id197">
<div class="section" id="back-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="19%" />
<col width="35%" />
<col width="45%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a></td>
<td><a class="reference" href="./bidirectional-sequence.html">Bidirectional Sequence</a></td>
<td>A sequence to be examined.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id198">
<div class="section" id="intrinsic-back-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p>
<p>For any <a class="reference" href="./bidirectional-sequence.html">Bidirectional Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./back.html" class="identifier">back</a>&lt;s&gt;::type t;
typedef <a href="./back.html" class="identifier">back</a>&lt;s&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">A type.</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre"><a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::value</span> <span class="pre">==</span> <span class="pre">false</span></tt>.</p>
</td>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><tt class="literal"><span class="pre"><a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::value</span> <span class="pre">==</span> <span class="pre">false</span></tt>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -86,32 +87,31 @@ typedef <a href="./deref.html" class="identifier">deref</a>&lt; <a href="./prior
</tbody>
</table>
</div>
<div class="section" id="id199">
<div class="section" id="back-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id200">
<div class="section" id="back-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,1&gt; range1;
typedef <a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,10&gt; range2;
typedef <a href="./range-c.html" class="identifier">range_c</a>&lt;int,-10,0&gt; range3;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./back.html" class="identifier">back</a>&lt;range1&gt;::value, ==, 0 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./back.html" class="identifier">back</a>&lt;range2&gt;::value, ==, 9 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./back.html" class="identifier">back</a>&lt;range3&gt;::value, ==, -1 );
</pre>
</div>
<div class="section" id="id201">
<div class="section" id="intrinsic-back-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a>, <a class="reference internal" href="./front.html">front</a>, <a class="reference internal" href="./push-back.html">push_back</a>, <a class="reference internal" href="./end.html">end</a>, <a class="reference internal" href="./deref.html">deref</a>, <a class="reference internal" href="./at.html">at</a></p>
<p><a class="reference" href="./bidirectional-sequence.html">Bidirectional Sequence</a>, <a class="refentry reference" href="./front.html"><tt class="refentry literal"><span class="pre">front</span></tt></a>, <a class="refentry reference" href="./push-back.html"><tt class="refentry literal"><span class="pre">push_back</span></tt></a>, <a class="refentry reference" href="./end.html"><tt class="refentry literal"><span class="pre">end</span></tt></a>, <a class="refentry reference" href="./deref.html"><tt class="refentry literal"><span class="pre">deref</span></tt></a>, <a class="refentry reference" href="./at.html"><tt class="refentry literal"><span class="pre">at</span></tt></a></p>
<!-- modtime: November 13, 2004 01:24:30 +0000 -->
<!-- Sequences/Intrinsic Metafunctions//begin -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./at-c.html" class="navigation-link">Prev</a>&nbsp;<a href="./begin.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./at-c.html" class="navigation-link">Back</a>&nbsp;<a href="./begin.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+28 -26
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: begin</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./begin.html" class="navigation-link">begin</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="begin">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1428">begin</a></h1>
<div class="section" id="id202">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id356" name="begin">begin</a></h1>
<div class="section" id="begin-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -25,33 +28,33 @@ struct <a href="./begin.html" class="identifier">begin</a>
};
</pre>
</div>
<div class="section" id="id203">
<div class="section" id="begin-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns an iterator that points to the first element of the sequence. If
the argument is not a <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, returns <a class="reference internal" href="./void.html">void_</a>.</p>
the argument is not a <a class="reference" href="./forward-sequence.html">Forward Sequence</a>, returns <a class="refentry reference" href="./void.html"><tt class="refentry literal"><span class="pre">void_</span></tt></a>.</p>
</div>
<div class="section" id="id204">
<div class="section" id="begin-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/begin_end.hpp" class="header">boost/mpl/begin_end.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id205">
<div class="section" id="begin-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
<p><a class="reference" href="./tag-dispatched.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id206">
<div class="section" id="begin-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="18%" />
<col width="22%" />
<col width="60%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
@@ -63,32 +66,32 @@ returned.</td>
</tbody>
</table>
</div>
<div class="section" id="id207">
<div class="section" id="begin-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any arbitrary type <tt class="literal"><span class="pre">x</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./begin.html" class="identifier">begin</a>&lt;x&gt;::type first;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a> or <a class="reference internal" href="./void.html">void_</a>.</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./forward-iterator.html">Forward Iterator</a> or <a class="refentry reference" href="./void.html"><tt class="refentry literal"><span class="pre">void_</span></tt></a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">If <tt class="literal"><span class="pre">x</span></tt> is a <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <tt class="literal"><span class="pre">first</span></tt> is an iterator pointing to the
first element of <tt class="literal"><span class="pre">s</span></tt>; otherwise <tt class="literal"><span class="pre">first</span></tt> is <a class="reference internal" href="./void.html">void_</a>.</td>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">If <tt class="literal"><span class="pre">x</span></tt> is a <a class="reference" href="./forward-sequence.html">Forward Sequence</a>, <tt class="literal"><span class="pre">first</span></tt> is an iterator pointing to the
first element of <tt class="literal"><span class="pre">s</span></tt>; otherwise <tt class="literal"><span class="pre">first</span></tt> is <a class="refentry reference" href="./void.html"><tt class="refentry literal"><span class="pre">void_</span></tt></a>.</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body">If <tt class="literal"><span class="pre">first</span></tt> is an iterator, it is either dereferenceable or past-the-end; it
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body">If <tt class="literal"><span class="pre">first</span></tt> is an iterator, it is either dereferenceable or past-the-end; it
is past-the-end if and only if <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;x&gt;::value</span> <span class="pre">==</span> <span class="pre">0</span></tt>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id208">
<div class="section" id="begin-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id209">
<div class="section" id="begin-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt; unsigned char,unsigned short,
@@ -100,16 +103,15 @@ typedef <a href="./begin.html" class="identifier">begin</a>&lt;unsigned_types&gt
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./begin.html" class="identifier">begin</a>&lt;int&gt;::type, <a href="./void.html" class="identifier">void_</a> > ));
</pre>
</div>
<div class="section" id="id210">
<div class="section" id="begin-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./iterators.html">Iterators</a>, <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./end.html">end</a>, <a class="reference internal" href="./size.html">size</a>, <a class="reference internal" href="./empty.html">empty</a></p>
<p><a class="reference" href="./iterators.html">Iterators</a>, <a class="reference" href="./forward-sequence.html">Forward Sequence</a>, <a class="refentry reference" href="./end.html"><tt class="refentry literal"><span class="pre">end</span></tt></a>, <a class="refentry reference" href="./size.html"><tt class="refentry literal"><span class="pre">size</span></tt></a>, <a class="refentry reference" href="./empty.html"><tt class="refentry literal"><span class="pre">empty</span></tt></a></p>
<!-- modtime: November 13, 2004 01:25:11 +0000 -->
<!-- Sequences/Intrinsic Metafunctions//clear -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./back.html" class="navigation-link">Prev</a>&nbsp;<a href="./clear.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./back.html" class="navigation-link">Back</a>&nbsp;<a href="./clear.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+32 -30
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Bidirectional Iterator</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,70 +15,70 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./iterators.html" class="navigation-link">Iterators</a> / <a href="./iterators-concepts.html" class="navigation-link">Concepts</a> / <a href="./bidirectional-iterator.html" class="navigation-link">Bidirectional Iterator</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="bidirectional-iterator">
<h1><a class="toc-backref" href="./iterators-concepts.html#id1451">Bidirectional Iterator</a></h1>
<div class="section" id="id390">
<h1><a class="toc-backref" href="./iterators-concepts.html#id379" name="bidirectional-iterator">Bidirectional Iterator</a></h1>
<div class="section" id="iterators-bidirectional-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>A <a class="reference internal" href="./bidirectional-iterator.html">Bidirectional Iterator</a> is a <a class="reference internal" href="./forward-iterator.html">Forward Iterator</a> that provides a way to
<p>A <a class="reference" href="./bidirectional-iterator.html">Bidirectional Iterator</a> is a <a class="reference" href="./forward-iterator.html">Forward Iterator</a> that provides a way to
obtain an iterator to the previous element in a sequence.</p>
</div>
<div class="section" id="id391">
<div class="section" id="bidirectional-refinement-of">
<h3><a class="subsection-title" href="#refinement-of" name="refinement-of">Refinement of</a></h3>
<p><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></p>
<p><a class="reference" href="./forward-iterator.html">Forward Iterator</a></p>
</div>
<div class="section" id="id392">
<div class="section" id="bidirectional-definitions">
<h3><a class="subsection-title" href="#definitions" name="definitions">Definitions</a></h3>
<ul class="simple">
<li>a bidirectional iterator <tt class="literal"><span class="pre">i</span></tt> is <cite>decrementable</cite> if there is a &quot;previous&quot;
iterator, that is, if <tt class="literal"><span class="pre"><a href="./prior.html" class="identifier">prior</a>&lt;i&gt;::type</span></tt> expression is well-defined;
iterators pointing to the first element of the sequence are not
<li>a bidirectional iterator <tt class="literal"><span class="pre">i</span></tt> is <cite>decrementable</cite> if there is a &quot;previous&quot;
iterator, that is, if <tt class="literal"><span class="pre"><a href="./prior.html" class="identifier">prior</a>&lt;i&gt;::type</span></tt> expression is well-defined;
iterators pointing to the first element of the sequence are not
decrementable.</li>
</ul>
</div>
<div class="section" id="id393">
<div class="section" id="iterators-bidirectional-expression-requirements">
<h3><a class="subsection-title" href="#expression-requirements" name="expression-requirements">Expression requirements</a></h3>
<p>In addition to the requirements defined in <a class="reference internal" href="./forward-iterator.html">Forward Iterator</a>,
<p>In addition to the requirements defined in <a class="reference" href="./forward-iterator.html">Forward Iterator</a>,
the following requirements must be met.</p>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="25%" />
<col width="46%" />
<col width="29%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Type</th>
<th class="head">Complexity</th>
<tr><th>Expression</th>
<th>Type</th>
<th>Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a>&lt;i&gt;::type</span></tt></td>
<td><a class="reference internal" href="./bidirectional-iterator.html">Bidirectional Iterator</a></td>
<td><a class="reference" href="./bidirectional-iterator.html">Bidirectional Iterator</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./prior.html" class="identifier">prior</a>&lt;i&gt;::type</span></tt></td>
<td><a class="reference internal" href="./bidirectional-iterator.html">Bidirectional Iterator</a></td>
<td><a class="reference" href="./bidirectional-iterator.html">Bidirectional Iterator</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre">i::category</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a>, convertible
<td><a class="reference" href="./integral-constant.html">Integral Constant</a>, convertible
to <tt class="literal"><span class="pre">bidirectional_iterator_tag</span></tt></td>
<td>Constant time</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id394">
<div class="section" id="iterators-bidirectional-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<pre class="literal-block">
typedef <a href="./prior.html" class="identifier">prior</a>&lt;i&gt;::type j;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><tt class="literal"><span class="pre">i</span></tt> is decrementable</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><tt class="literal"><span class="pre">j</span></tt> is an iterator pointing to the previous element of the
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><tt class="literal"><span class="pre">j</span></tt> is an iterator pointing to the previous element of the
sequence</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><tt class="literal"><span class="pre">j</span></tt> is dereferenceable and incrementable</td>
@@ -83,26 +86,25 @@ sequence</td>
</tbody>
</table>
</div>
<div class="section" id="id395">
<div class="section" id="bidirectional-invariants">
<h3><a class="subsection-title" href="#invariants" name="invariants">Invariants</a></h3>
<p>For any bidirectional iterators <tt class="literal"><span class="pre">i</span></tt> and <tt class="literal"><span class="pre">j</span></tt> the following invariants
<p>For any bidirectional iterators <tt class="literal"><span class="pre">i</span></tt> and <tt class="literal"><span class="pre">j</span></tt> the following invariants
always hold:</p>
<ul class="simple">
<li>If <tt class="literal"><span class="pre">i</span></tt> is incrementable, then <tt class="literal"><span class="pre"><a href="./prior.html" class="identifier">prior</a>&lt;</span> <span class="pre"><a href="./next.html" class="identifier">next</a>&lt;i&gt;::type</span> <span class="pre">&gt;::type</span></tt> is a null
<li>If <tt class="literal"><span class="pre">i</span></tt> is incrementable, then <tt class="literal"><span class="pre"><a href="./prior.html" class="identifier">prior</a>&lt;</span> <span class="pre"><a href="./next.html" class="identifier">next</a>&lt;i&gt;::type</span> <span class="pre">&gt;::type</span></tt> is a null
operation; similarly, if <tt class="literal"><span class="pre">i</span></tt> is decrementable, <tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a>&lt;</span> <span class="pre"><a href="./prior.html" class="identifier">prior</a>&lt;i&gt;::type</span> <span class="pre">&gt;::type</span></tt>
is a null operation.</li>
</ul>
</div>
<div class="section" id="id396">
<div class="section" id="iterators-bidirectional-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./iterators.html">Iterators</a>, <a class="reference internal" href="./forward-iterator.html">Forward Iterator</a>, <a class="reference internal" href="./random-access-iterator.html">Random Access Iterator</a>, <a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a>, <a class="reference internal" href="./prior.html">prior</a></p>
<p><a class="reference" href="./iterators.html">Iterators</a>, <a class="reference" href="./forward-iterator.html">Forward Iterator</a>, <a class="reference" href="./random-access-iterator.html">Random Access Iterator</a>, <a class="reference" href="./bidirectional-sequence.html">Bidirectional Sequence</a>, <a class="refentry reference" href="./prior.html"><tt class="refentry literal"><span class="pre">prior</span></tt></a></p>
<!-- modtime: November 15, 2004 02:44:55 +0000 -->
<!-- Iterators/Concepts//Random Access Iterator |30 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./forward-iterator.html" class="navigation-link">Prev</a>&nbsp;<a href="./random-access-iterator.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./forward-iterator.html" class="navigation-link">Back</a>&nbsp;<a href="./random-access-iterator.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterators-concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+32 -30
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Bidirectional Sequence</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,39 +15,39 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./concepts.html" class="navigation-link">Concepts</a> / <a href="./bidirectional-sequence.html" class="navigation-link">Bidirectional Sequence</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="bidirectional-sequence">
<h1><a class="toc-backref" href="./concepts.html#id1396">Bidirectional Sequence</a></h1>
<div class="section" id="id1">
<h1><a class="toc-backref" href="./concepts.html#id325" name="bidirectional-sequence">Bidirectional Sequence</a></h1>
<div class="section" id="bidirectional-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>A <a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a> is a <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> whose iterators model
<a class="reference internal" href="./bidirectional-iterator.html">Bidirectional Iterator</a>.</p>
<p>A <a class="reference" href="./bidirectional-sequence.html">Bidirectional Sequence</a> is a <a class="reference" href="./forward-sequence.html">Forward Sequence</a> whose iterators model
<a class="reference" href="./bidirectional-iterator.html">Bidirectional Iterator</a>.</p>
</div>
<div class="section" id="refinement-of">
<h3>Refinement of</h3>
<p><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></p>
<h3><a class="subsection-title" href="#refinement-of" name="refinement-of">Refinement of</a></h3>
<p><a class="reference" href="./forward-sequence.html">Forward Sequence</a></p>
</div>
<div class="section" id="id2">
<div class="section" id="bidirectional-expression-requirements">
<h3><a class="subsection-title" href="#expression-requirements" name="expression-requirements">Expression requirements</a></h3>
<p>In addition to the requirements defined in <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>,
for any <a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a> <tt class="literal"><span class="pre">s</span></tt> the following must be met:</p>
<table border="1" class="docutils table">
<p>In addition to the requirements defined in <a class="reference" href="./forward-sequence.html">Forward Sequence</a>,
for any <a class="reference" href="./bidirectional-sequence.html">Bidirectional Sequence</a> <tt class="literal"><span class="pre">s</span></tt> the following must be met:</p>
<table border="1" class="table">
<colgroup>
<col width="30%" />
<col width="39%" />
<col width="30%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Type</th>
<th class="head">Complexity</th>
<tr><th>Expression</th>
<th>Type</th>
<th>Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt></td>
<td><a class="reference internal" href="./bidirectional-iterator.html">Bidirectional Iterator</a></td>
<td><a class="reference" href="./bidirectional-iterator.html">Bidirectional Iterator</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt></td>
<td><a class="reference internal" href="./bidirectional-iterator.html">Bidirectional Iterator</a></td>
<td><a class="reference" href="./bidirectional-iterator.html">Bidirectional Iterator</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./back.html" class="identifier">back</a>&lt;s&gt;::type</span></tt></td>
@@ -54,44 +57,43 @@ for any <a class="reference internal" href="./bidirectional-sequence.html">Bidir
</tbody>
</table>
</div>
<div class="section" id="id3">
<div class="section" id="bidirectional-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>.</p>
<table border="1" class="docutils table">
where they differ from, or are not defined in <a class="reference" href="./forward-sequence.html">Forward Sequence</a>.</p>
<table border="1" class="table">
<colgroup>
<col width="28%" />
<col width="72%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
<tr><th>Expression</th>
<th>Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./back.html" class="identifier">back</a>&lt;s&gt;::type</span></tt></td>
<td>The last element in the sequence; see <a class="reference internal" href="./back.html">back</a>.</td>
<td>The last element in the sequence; see <a class="refentry reference" href="./back.html"><tt class="refentry literal"><span class="pre">back</span></tt></a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id4">
<div class="section" id="bidirectional-models">
<h3><a class="subsection-title" href="#models" name="models">Models</a></h3>
<ul class="simple">
<li><a class="reference internal" href="./vector.html">vector</a></li>
<li><a class="reference internal" href="./range-c.html">range_c</a></li>
<li><a class="refentry reference" href="./vector.html"><tt class="refentry literal"><span class="pre">vector</span></tt></a></li>
<li><a class="refentry reference" href="./range-c.html"><tt class="refentry literal"><span class="pre">range_c</span></tt></a></li>
</ul>
</div>
<div class="section" id="id5">
<div class="section" id="bidirectional-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a>, <a class="reference internal" href="./bidirectional-iterator.html">Bidirectional Iterator</a>, <a class="reference internal" href="./begin.html">begin</a> / <a class="reference internal" href="./end.html">end</a>, <a class="reference internal" href="./back.html">back</a></p>
<p><a class="reference" href="./sequences.html">Sequences</a>, <a class="reference" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference" href="./random-access-sequence.html">Random Access Sequence</a>, <a class="reference" href="./bidirectional-iterator.html">Bidirectional Iterator</a>, <a class="refentry reference" href="./begin.html"><tt class="refentry literal"><span class="pre">begin</span></tt></a> / <a class="refentry reference" href="./end.html"><tt class="refentry literal"><span class="pre">end</span></tt></a>, <a class="refentry reference" href="./back.html"><tt class="refentry literal"><span class="pre">back</span></tt></a></p>
<!-- modtime: November 13, 2004 00:39:57 +0000 -->
<!-- Sequences/Concepts//Random Access Sequence |30 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./forward-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./random-access-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./forward-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./random-access-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+53 -51
View File
@@ -1,22 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: bind</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./lambda.html" class="navigation-link">Prev</a>&nbsp;<a href="./quote.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./lambda.html" class="navigation-link">Back</a>&nbsp;<a href="./quote.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./composition-and-argument-binding.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./composition-and-argument-binding.html" class="navigation-link">Composition and Argument Binding</a> / <a href="./bind.html" class="navigation-link">bind</a></td>
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./lambda.html" class="navigation-link">Prev</a>&nbsp;<a href="./quote.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./lambda.html" class="navigation-link">Back</a>&nbsp;<a href="./quote.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./composition-and-argument.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./composition-and-argument.html" class="navigation-link">Composition and Argument Binding</a> / <a href="./bind.html" class="navigation-link">bind</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="bind">
<h1><a class="toc-backref" href="./composition-and-argument-binding.html#id1531">bind</a></h1>
<div class="section" id="id929">
<h1><a class="toc-backref" href="./composition-and-argument.html#id457" name="bind">bind</a></h1>
<div class="section" id="bind-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
template&lt;
typename F
&gt;
struct bind0
@@ -25,7 +28,7 @@ struct bind0
// <em>...</em>
};
template&lt;
template&lt;
typename F, typename A1
&gt;
struct bind1
@@ -36,7 +39,7 @@ struct bind1
<em>...</em>
template&lt;
template&lt;
typename F, typename A1,<em>...</em> typename An
&gt;
struct <a href="./bind.html" class="identifier">bind</a><em>n</em>
@@ -45,7 +48,7 @@ struct <a href="./bind.html" class="identifier">bind</a><em>n</em>
// <em>...</em>
};
template&lt;
template&lt;
typename F
, typename A1 = <em>unspecified</em>
<em>...</em>
@@ -58,40 +61,40 @@ struct <a href="./bind.html" class="identifier">bind</a>
};
</pre>
</div>
<div class="section" id="id930">
<div class="section" id="bind-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./bind.html" class="identifier">bind</a></span></tt> is a higher-order primitive for <a class="reference internal" href="./metafunction-class.html">Metafunction Class</a> composition
and argument binding. In essence, it's a compile-time counterpart of
the similar run-time functionality provided by <a class="reference external" href="http://www.boost.org/libs/bind/bind.html" target="_top">Boost.Bind</a> and <a class="reference external" href="http://www.boost.org/libs/lambda/doc/index.html" target="_top">Boost.Lambda</a>
<p><tt class="literal"><span class="pre"><a href="./bind.html" class="identifier">bind</a></span></tt> is a higher-order primitive for <a class="reference" href="./metafunction-class.html">Metafunction Class</a> composition
and argument binding. In essence, it's a compile-time counterpart of
the similar run-time functionality provided by <a class="reference" href="http://www.boost.org/libs/bind/bind.html" target="_top">Boost.Bind</a> and <a class="reference" href="http://www.boost.org/libs/lambda/doc/index.html" target="_top">Boost.Lambda</a>
libraries.</p>
</div>
<div class="section" id="id931">
<div class="section" id="bind-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/bind.hpp" class="header">boost/mpl/bind.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id932">
<div class="section" id="bind-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./metafunction-class.html">Metafunction Class</a></p>
<p><a class="reference" href="./metafunction-class.html">Metafunction Class</a></p>
</div>
<div class="section" id="id933">
<div class="section" id="bind-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">F</span></tt></td>
<td><a class="reference internal" href="./metafunction-class.html">Metafunction Class</a></td>
<td><a class="reference" href="./metafunction-class.html">Metafunction Class</a></td>
<td>An metafunction class to perform binding on.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">A1</span></tt>,... <tt class="literal"><span class="pre">An</span></tt></td>
@@ -101,22 +104,22 @@ libraries.</p>
</tbody>
</table>
</div>
<div class="section" id="id934">
<div class="section" id="bind-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./metafunction-class.html">Metafunction Class</a> <tt class="literal"><span class="pre">f</span></tt> and arbitrary types <tt class="literal"><span class="pre">a1</span></tt>,... <tt class="literal"><span class="pre">an</span></tt>:</p>
<p>For any <a class="reference" href="./metafunction-class.html">Metafunction Class</a> <tt class="literal"><span class="pre">f</span></tt> and arbitrary types <tt class="literal"><span class="pre">a1</span></tt>,... <tt class="literal"><span class="pre">an</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./bind.html" class="identifier">bind</a>&lt;f,a1,...a<em>n</em>&gt; g;
typedef <a href="./bind.html" class="identifier">bind</a><em>n</em>&lt;f,a1,...a<em>n</em>&gt; g;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="./metafunction-class.html">Metafunction Class</a></td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./metafunction-class.html">Metafunction Class</a></td>
</tr>
</tbody>
</table>
<table class="docutils field-list" frame="void" id="bind-semantics" rules="none">
<a class="target" id="bind-semantics" name="bind-semantics"></a><table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
@@ -124,17 +127,17 @@ typedef <a href="./bind.html" class="identifier">bind</a><em>n</em>&lt;f,a1,...a
<pre class="literal-block">
struct g
{
template&lt;
template&lt;
typename U1 = <em>unspecified</em>
<em>...</em>
, typename U<em>n</em> = <em>unspecified</em>
&gt;
struct <a href="./apply.html" class="identifier">apply</a>
: <a href="./apply-wrap.html" class="identifier">apply_wrap</a><em>n</em>&lt;
typename h0&lt;f,U1,<em>...</em>U<em>n</em>&gt;::type
, typename h1&lt;a1,U1,<em>...</em>U<em>n</em>&gt;::type
typename h0&lt;f,U1,<em>...</em>U<em>n</em>&gt;::type
, typename h1&lt;a1,U1,<em>...</em>U<em>n</em>&gt;::type
<em>...</em>
, typename h<em>n</em>&lt;a<em>n</em>,U1,<em>...</em>U<em>n</em>&gt;::type
, typename h<em>n</em>&lt;a<em>n</em>,U1,<em>...</em>U<em>n</em>&gt;::type
>
{
};
@@ -147,14 +150,14 @@ template&lt; typename X, typename U1,<em>...</em> typename U<em>n</em> &gt; stru
{
};
</pre>
<p>if <tt class="literal"><span class="pre">f</span></tt> or <tt class="literal"><span class="pre">a</span></tt><em>k</em> is a <a class="reference internal" href="./terminology.html#bind-expression">bind expression</a> or a <a class="reference internal" href="./placeholders.html#placeholder">placeholder</a>, and</p>
<p>if <tt class="literal"><span class="pre">f</span></tt> or <tt class="literal"><span class="pre">a</span></tt><em>k</em> is a <a class="reference" href="./terminology.html#bind-expression">bind expression</a> or a <a class="reference" href="./placeholders.html">placeholder</a>, and</p>
<pre class="literal-block">
template&lt; typename X, typename U1,<em>...</em> typename U<em>n</em> &gt; struct h<em>k</em>
{
typedef X type;
};
</pre>
<p class="last">otherwise. [<em>Note:</em> Every <tt class="literal"><span class="pre">n</span></tt>th appearance of the <a class="reference internal" href="./placeholders.html">unnamed placeholder</a>
<p class="last">otherwise. [<em>Note:</em> Every <tt class="literal"><span class="pre">n</span></tt>th appearance of the <a class="reference" href="./placeholders.html">unnamed placeholder</a>
in the <tt class="literal"><span class="pre"><a href="./bind.html" class="identifier">bind</a>&lt;f,a1,...an&gt;</span></tt> specialization is replaced with the corresponding
numbered placeholder <tt class="literal"><span class="pre">_</span></tt><em>n</em><em>end note</em>]</p>
</td>
@@ -162,7 +165,7 @@ numbered placeholder <tt class="literal"><span class="pre">_</span></tt><em>n</e
</tbody>
</table>
</div>
<div class="section" id="id936">
<div class="section" id="bind-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
struct f1
@@ -182,26 +185,26 @@ struct f5
};
};
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">1</span></tt>&lt;
<a href="./bind.html" class="identifier">bind</a><tt class="literal"><span class="pre">1</span></tt>&lt;f1,<a href="./placeholders.html" class="identifier">_1</a>&gt;
, int
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">1</span></tt>&lt;
<a href="./bind.html" class="identifier">bind</a><tt class="literal"><span class="pre">1</span></tt>&lt;f1,_1&gt;
, int
&gt;::type r11;
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">5</span></tt>&lt;
<a href="./bind.html" class="identifier">bind</a><tt class="literal"><span class="pre">1</span></tt>&lt;f1,<a href="./placeholders.html" class="identifier">_5</a>&gt;
, void,void,void,void,int
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">5</span></tt>&lt;
<a href="./bind.html" class="identifier">bind</a><tt class="literal"><span class="pre">1</span></tt>&lt;f1,_5&gt;
, void,void,void,void,int
&gt;::type r12;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;r11,int&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;r12,int&gt; ));
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">5</span></tt>&lt;
<a href="./bind.html" class="identifier">bind</a><tt class="literal"><span class="pre">5</span></tt>&lt;f5,<a href="./placeholders.html" class="identifier">_1</a>,<a href="./placeholders.html" class="identifier">_2</a>,<a href="./placeholders.html" class="identifier">_3</a>,<a href="./placeholders.html" class="identifier">_4</a>,<a href="./placeholders.html" class="identifier">_5</a>&gt;
, void,void,void,void,int
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">5</span></tt>&lt;
<a href="./bind.html" class="identifier">bind</a><tt class="literal"><span class="pre">5</span></tt>&lt;f5,_1,_2,_3,_4,_5&gt;
, void,void,void,void,int
&gt;::type r51;
typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">5</span></tt>&lt;
<a href="./bind.html" class="identifier">bind</a><tt class="literal"><span class="pre">5</span></tt>&lt;f5,<a href="./placeholders.html" class="identifier">_5</a>,<a href="./placeholders.html" class="identifier">_4</a>,<a href="./placeholders.html" class="identifier">_3</a>,<a href="./placeholders.html" class="identifier">_2</a>,<a href="./placeholders.html" class="identifier">_1</a>&gt;
<a href="./bind.html" class="identifier">bind</a><tt class="literal"><span class="pre">5</span></tt>&lt;f5,_5,_4,_3,_2,_1&gt;
, int,void,void,void,void
&gt;::type r52;
@@ -209,17 +212,16 @@ typedef <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;r52,int&gt; ));
</pre>
</div>
<div class="section" id="id937">
<div class="section" id="bind-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./composition-and-argument-binding.html">Composition and Argument Binding</a>, <a class="reference internal" href="./invocation.html">invocation</a>, <a class="reference internal" href="./placeholders.html">Placeholders</a>, <a class="reference internal" href="./lambda.html">lambda</a>, <a class="reference internal" href="./quote.html">quote</a>,
<a class="reference internal" href="./protect.html">protect</a>, <a class="reference internal" href="./apply.html">apply</a>, <a class="reference internal" href="./apply-wrap.html">apply_wrap</a></p>
<p><a class="reference" href="./composition-and-argument.html">Composition and Argument Binding</a>, <a class="reference" href="./invocation.html">invocation</a>, <a class="reference" href="./placeholders.html">Placeholders</a>, <a class="refentry reference" href="./lambda.html"><tt class="refentry literal"><span class="pre">lambda</span></tt></a>, <a class="refentry reference" href="./quote.html"><tt class="refentry literal"><span class="pre">quote</span></tt></a>,
<a class="refentry reference" href="./protect.html"><tt class="refentry literal"><span class="pre">protect</span></tt></a>, <a class="refentry reference" href="./apply.html"><tt class="refentry literal"><span class="pre">apply</span></tt></a>, <a class="refentry reference" href="./apply-wrap.html"><tt class="refentry literal"><span class="pre">apply_wrap</span></tt></a></p>
<!-- modtime: November 13, 2004 01:59:44 +0000 -->
<!-- Metafunctions/Composition and Argument Binding//quote |40 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./lambda.html" class="navigation-link">Prev</a>&nbsp;<a href="./quote.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./lambda.html" class="navigation-link">Back</a>&nbsp;<a href="./quote.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./composition-and-argument-binding.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./lambda.html" class="navigation-link">Prev</a>&nbsp;<a href="./quote.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./lambda.html" class="navigation-link">Back</a>&nbsp;<a href="./quote.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./composition-and-argument.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
</tr></table></body>
</html>
+34 -34
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: bitand_</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./bitwise-operations.html" class="navigation-link">Bitwise Operations</a> / <a href="./bitand.html" class="navigation-link">bitand_</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="bitand">
<h1><a class="toc-backref" href="./bitwise-operations.html#id1554">bitand_</a></h1>
<div class="section" id="id1089">
<h1><a class="toc-backref" href="./bitwise-operations.html#id480" name="bitand">bitand_</a></h1>
<div class="section" id="bitand-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -29,59 +32,58 @@ struct <a href="./bitand.html" class="identifier">bitand_</a>
};
</pre>
</div>
<div class="section" id="id1090">
<div class="section" id="bitand-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the result of <em>bitwise and</em> (<tt class="literal"><span class="pre">&amp;</span></tt>) operation of its arguments.</p>
</div>
<div class="section" id="id1091">
<div class="section" id="bitand-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/bitand.hpp" class="header">boost/mpl/bitand.hpp</a>&gt;
#include &lt;<a href="../../../../boost/mpl/bitwise.hpp" class="header">boost/mpl/bitwise.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1092">
<div class="section" id="bitand-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
<p><a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
</div>
<div class="section" id="id1093">
<div class="section" id="bitand-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt>,... <tt class="literal"><span class="pre">Tn</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td><a class="reference" href="./integral-constant.html">Integral Constant</a></td>
<td>Operation's arguments.</td>
</tr>
</tbody>
</table>
<p>[<em>Note:</em> The requirements listed in this specification
are the ones imposed by the default implementation. See <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference internal" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
are the ones imposed by the default implementation. See <a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
</div>
<div class="section" id="id1094">
<div class="section" id="bitand-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <em>c</em><sub>1</sub>,<em>c</em><sub>2</sub>,... <em>c</em><sub>n</sub>:</p>
<p>For any <a class="reference" href="./integral-constant.html">Integral Constant</a>s <em>c</em><sub>1</sub>,<em>c</em><sub>2</sub>,... <em>c</em><sub>n</sub>:</p>
<pre class="literal-block">
typedef <a href="./bitand.html" class="identifier">bitand_</a>&lt;c1,<em>...</em>c<em>n</em>&gt;::type r;
typedef <a href="./bitand.html" class="identifier">bitand_</a>&lt;c1,<em>...</em>c<em>n</em>&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -89,8 +91,8 @@ typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;
typeof(c1::value &amp; c2::value)
, ( c1::value &amp; c2::value )
&gt; c;
typedef <a href="./bitand.html" class="identifier">bitand_</a>&lt;c,c3,<em>...</em>c<em>n</em>&gt;::type r;
typedef <a href="./bitand.html" class="identifier">bitand_</a>&lt;c,c3,<em>...</em>c<em>n</em>&gt;::type r;
</pre>
</td>
</tr>
@@ -100,12 +102,11 @@ typedef <a href="./bitand.html" class="identifier">bitand_</a>&lt;c,c3,<em>...</
<pre class="literal-block">
typedef <a href="./bitand.html" class="identifier">bitand_</a>&lt;c1,<em>...</em>c<em>n</em>&gt; r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -116,11 +117,11 @@ struct r : <a href="./bitand.html" class="identifier">bitand_</a>&lt;c1,<em>...<
</tbody>
</table>
</div>
<div class="section" id="id1095">
<div class="section" id="bitand-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id1096">
<div class="section" id="bitand-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigned,0&gt; u0;
@@ -137,16 +138,15 @@ typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigne
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitand.html" class="identifier">bitand_</a>&lt;u8,uffffffff&gt;::value), ==, 8 );
</pre>
</div>
<div class="section" id="id1097">
<div class="section" id="bitand-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./bitwise-operations.html">Bitwise Operations</a>, <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="reference internal" href="./numeric-cast.html">numeric_cast</a>, <a class="reference internal" href="./bitor.html">bitor_</a>, <a class="reference internal" href="./bitxor.html">bitxor_</a>, <a class="reference internal" href="./shift-left.html">shift_left</a></p>
<p><a class="reference" href="./bitwise-operations.html">Bitwise Operations</a>, <a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="refentry reference" href="./numeric-cast.html"><tt class="refentry literal"><span class="pre">numeric_cast</span></tt></a>, <a class="refentry reference" href="./bitor.html"><tt class="refentry literal"><span class="pre">bitor_</span></tt></a>, <a class="refentry reference" href="./bitxor.html"><tt class="refentry literal"><span class="pre">bitxor_</span></tt></a>, <a class="refentry reference" href="./shift-left.html"><tt class="refentry literal"><span class="pre">shift_left</span></tt></a></p>
<!-- modtime: November 10, 2004 04:44:32 +0000 -->
<!-- Metafunctions/Bitwise Operations//bitor_ -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./bitwise-operations.html" class="navigation-link">Prev</a>&nbsp;<a href="./bitor.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./bitor.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./bitwise-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+34 -34
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: bitor_</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./bitwise-operations.html" class="navigation-link">Bitwise Operations</a> / <a href="./bitor.html" class="navigation-link">bitor_</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="bitor">
<h1><a class="toc-backref" href="./bitwise-operations.html#id1555">bitor_</a></h1>
<div class="section" id="id1098">
<h1><a class="toc-backref" href="./bitwise-operations.html#id481" name="bitor">bitor_</a></h1>
<div class="section" id="bitor-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -29,59 +32,58 @@ struct <a href="./bitor.html" class="identifier">bitor_</a>
};
</pre>
</div>
<div class="section" id="id1099">
<div class="section" id="bitor-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the result of <em>bitwise or</em> (<tt class="literal"><span class="pre">|</span></tt>) operation of its arguments.</p>
</div>
<div class="section" id="id1100">
<div class="section" id="bitor-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/bitor.hpp" class="header">boost/mpl/bitor.hpp</a>&gt;
#include &lt;<a href="../../../../boost/mpl/bitwise.hpp" class="header">boost/mpl/bitwise.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1101">
<div class="section" id="bitor-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
<p><a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
</div>
<div class="section" id="id1102">
<div class="section" id="bitor-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt>,... <tt class="literal"><span class="pre">Tn</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td><a class="reference" href="./integral-constant.html">Integral Constant</a></td>
<td>Operation's arguments.</td>
</tr>
</tbody>
</table>
<p>[<em>Note:</em> The requirements listed in this specification
are the ones imposed by the default implementation. See <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference internal" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
are the ones imposed by the default implementation. See <a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
</div>
<div class="section" id="id1103">
<div class="section" id="bitor-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <em>c</em><sub>1</sub>,<em>c</em><sub>2</sub>,... <em>c</em><sub>n</sub>:</p>
<p>For any <a class="reference" href="./integral-constant.html">Integral Constant</a>s <em>c</em><sub>1</sub>,<em>c</em><sub>2</sub>,... <em>c</em><sub>n</sub>:</p>
<pre class="literal-block">
typedef <a href="./bitor.html" class="identifier">bitor_</a>&lt;c1,<em>...</em>c<em>n</em>&gt;::type r;
typedef <a href="./bitor.html" class="identifier">bitor_</a>&lt;c1,<em>...</em>c<em>n</em>&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -89,8 +91,8 @@ typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;
typeof(c1::value | c2::value)
, ( c1::value | c2::value )
&gt; c;
typedef <a href="./bitor.html" class="identifier">bitor_</a>&lt;c,c3,<em>...</em>c<em>n</em>&gt;::type r;
typedef <a href="./bitor.html" class="identifier">bitor_</a>&lt;c,c3,<em>...</em>c<em>n</em>&gt;::type r;
</pre>
</td>
</tr>
@@ -100,12 +102,11 @@ typedef <a href="./bitor.html" class="identifier">bitor_</a>&lt;c,c3,<em>...</em
<pre class="literal-block">
typedef <a href="./bitor.html" class="identifier">bitor_</a>&lt;c1,<em>...</em>c<em>n</em>&gt; r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -116,11 +117,11 @@ struct r : <a href="./bitor.html" class="identifier">bitor_</a>&lt;c1,<em>...</e
</tbody>
</table>
</div>
<div class="section" id="id1104">
<div class="section" id="bitor-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id1105">
<div class="section" id="bitor-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigned,0&gt; u0;
@@ -137,16 +138,15 @@ typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigne
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitor.html" class="identifier">bitor_</a>&lt;u8,uffffffff&gt;::value), ==, 0xffffffff );
</pre>
</div>
<div class="section" id="id1106">
<div class="section" id="bitor-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./bitwise-operations.html">Bitwise Operations</a>, <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="reference internal" href="./numeric-cast.html">numeric_cast</a>, <a class="reference internal" href="./bitand.html">bitand_</a>, <a class="reference internal" href="./bitxor.html">bitxor_</a>, <a class="reference internal" href="./shift-left.html">shift_left</a></p>
<p><a class="reference" href="./bitwise-operations.html">Bitwise Operations</a>, <a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="refentry reference" href="./numeric-cast.html"><tt class="refentry literal"><span class="pre">numeric_cast</span></tt></a>, <a class="refentry reference" href="./bitand.html"><tt class="refentry literal"><span class="pre">bitand_</span></tt></a>, <a class="refentry reference" href="./bitxor.html"><tt class="refentry literal"><span class="pre">bitxor_</span></tt></a>, <a class="refentry reference" href="./shift-left.html"><tt class="refentry literal"><span class="pre">shift_left</span></tt></a></p>
<!-- modtime: November 10, 2004 05:04:32 +0000 -->
<!-- Metafunctions/Bitwise Operations//bitxor_ -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./bitand.html" class="navigation-link">Prev</a>&nbsp;<a href="./bitxor.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./bitand.html" class="navigation-link">Back</a>&nbsp;<a href="./bitxor.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./bitwise-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+13 -11
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Bitwise Operations</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,20 +15,19 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./bitwise-operations.html" class="navigation-link">Bitwise Operations</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="bitwise-operations">
<h1><a class="toc-backref" href="./metafunctions.html#id1553">Bitwise Operations</a></h1>
<span class="target" id="label-metafunctions-bitwise-operations"></span><!-- Metafunctions/Bitwise Operations//bitand_ -->
<h1><a class="toc-backref" href="./metafunctions.html#id479" name="bitwise-operations">Bitwise Operations</a></h1>
<a class="target" id="id248" name="id248"></a><!-- modtime: November 08, 2004 08:24:29 +0000 -->
<!-- Metafunctions/Bitwise Operations//bitand_ -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./bitand.html" id="id1554">bitand_</a></li>
<li><a class="reference internal" href="./bitor.html" id="id1555">bitor_</a></li>
<li><a class="reference internal" href="./bitxor.html" id="id1556">bitxor_</a></li>
<li><a class="reference internal" href="./shift-left.html" id="id1557">shift_left</a></li>
<li><a class="reference internal" href="./shift-right.html" id="id1558">shift_right</a></li>
<li><a class="reference" href="./bitand.html" id="id480" name="id480">bitand_</a></li>
<li><a class="reference" href="./bitor.html" id="id481" name="id481">bitor_</a></li>
<li><a class="reference" href="./bitxor.html" id="id482" name="id482">bitxor_</a></li>
<li><a class="reference" href="./shift-left.html" id="id483" name="id483">shift_left</a></li>
<li><a class="reference" href="./shift-right.html" id="id484" name="id484">shift_right</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./not.html" class="navigation-link">Prev</a>&nbsp;<a href="./bitand.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./logical-operations.html" class="navigation-link">Back</a>&nbsp;<a href="./trivial.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+34 -34
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: bitxor_</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./bitwise-operations.html" class="navigation-link">Bitwise Operations</a> / <a href="./bitxor.html" class="navigation-link">bitxor_</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="bitxor">
<h1><a class="toc-backref" href="./bitwise-operations.html#id1556">bitxor_</a></h1>
<div class="section" id="id1107">
<h1><a class="toc-backref" href="./bitwise-operations.html#id482" name="bitxor">bitxor_</a></h1>
<div class="section" id="bitxor-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -29,59 +32,58 @@ struct <a href="./bitxor.html" class="identifier">bitxor_</a>
};
</pre>
</div>
<div class="section" id="id1108">
<div class="section" id="bitxor-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the result of <em>bitwise xor</em> (<tt class="literal"><span class="pre">^</span></tt>) operation of its arguments.</p>
</div>
<div class="section" id="id1109">
<div class="section" id="bitxor-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/bitxor.hpp" class="header">boost/mpl/bitxor.hpp</a>&gt;
#include &lt;<a href="../../../../boost/mpl/bitwise.hpp" class="header">boost/mpl/bitwise.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1110">
<div class="section" id="bitxor-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
<p><a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
</div>
<div class="section" id="id1111">
<div class="section" id="bitxor-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt>,... <tt class="literal"><span class="pre">Tn</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td><a class="reference" href="./integral-constant.html">Integral Constant</a></td>
<td>Operation's arguments.</td>
</tr>
</tbody>
</table>
<p>[<em>Note:</em> The requirements listed in this specification
are the ones imposed by the default implementation. See <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference internal" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
are the ones imposed by the default implementation. See <a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
</div>
<div class="section" id="id1112">
<div class="section" id="bitxor-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <em>c</em><sub>1</sub>,<em>c</em><sub>2</sub>,... <em>c</em><sub>n</sub>:</p>
<p>For any <a class="reference" href="./integral-constant.html">Integral Constant</a>s <em>c</em><sub>1</sub>,<em>c</em><sub>2</sub>,... <em>c</em><sub>n</sub>:</p>
<pre class="literal-block">
typedef <a href="./bitxor.html" class="identifier">bitxor_</a>&lt;c1,<em>...</em>c<em>n</em>&gt;::type r;
typedef <a href="./bitxor.html" class="identifier">bitxor_</a>&lt;c1,<em>...</em>c<em>n</em>&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -89,8 +91,8 @@ typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;
typeof(c1::value ^ c2::value)
, ( c1::value ^ c2::value )
&gt; c;
typedef <a href="./bitxor.html" class="identifier">bitxor_</a>&lt;c,c3,<em>...</em>c<em>n</em>&gt;::type r;
typedef <a href="./bitxor.html" class="identifier">bitxor_</a>&lt;c,c3,<em>...</em>c<em>n</em>&gt;::type r;
</pre>
</td>
</tr>
@@ -100,12 +102,11 @@ typedef <a href="./bitxor.html" class="identifier">bitxor_</a>&lt;c,c3,<em>...</
<pre class="literal-block">
typedef <a href="./bitxor.html" class="identifier">bitxor_</a>&lt;c1,<em>...</em>c<em>n</em>&gt; r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -116,11 +117,11 @@ struct r : <a href="./bitxor.html" class="identifier">bitxor_</a>&lt;c1,<em>...<
</tbody>
</table>
</div>
<div class="section" id="id1113">
<div class="section" id="bitxor-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id1114">
<div class="section" id="bitxor-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigned,0&gt; u0;
@@ -138,16 +139,15 @@ typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;unsigne
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./bitxor.html" class="identifier">bitxor_</a>&lt;u8,uffffffff&gt;::value), ==, 0xffffffff ^ 8 );
</pre>
</div>
<div class="section" id="id1115">
<div class="section" id="bitxor-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./bitwise-operations.html">Bitwise Operations</a>, <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="reference internal" href="./numeric-cast.html">numeric_cast</a>, <a class="reference internal" href="./bitand.html">bitand_</a>, <a class="reference internal" href="./bitor.html">bitor_</a>, <a class="reference internal" href="./shift-left.html">shift_left</a></p>
<p><a class="reference" href="./bitwise-operations.html">Bitwise Operations</a>, <a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="refentry reference" href="./numeric-cast.html"><tt class="refentry literal"><span class="pre">numeric_cast</span></tt></a>, <a class="refentry reference" href="./bitand.html"><tt class="refentry literal"><span class="pre">bitand_</span></tt></a>, <a class="refentry reference" href="./bitor.html"><tt class="refentry literal"><span class="pre">bitor_</span></tt></a>, <a class="refentry reference" href="./shift-left.html"><tt class="refentry literal"><span class="pre">shift_left</span></tt></a></p>
<!-- modtime: November 13, 2004 02:03:30 +0000 -->
<!-- Metafunctions/Bitwise Operations//shift_left -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./bitor.html" class="navigation-link">Prev</a>&nbsp;<a href="./shift-left.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./bitor.html" class="navigation-link">Back</a>&nbsp;<a href="./shift-left.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./bitwise-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+30 -28
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: bool_</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./data-types.html" class="navigation-link">Data Types</a> / <a href="./numeric.html" class="navigation-link">Numeric</a> / <a href="./bool.html" class="navigation-link">bool_</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="bool">
<h1><a class="toc-backref" href="./numeric.html#id1576">bool_</a></h1>
<div class="section" id="id1222">
<h1><a class="toc-backref" href="./numeric.html#id500" name="bool">bool_</a></h1>
<div class="section" id="bool-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -25,36 +28,36 @@ struct <a href="./bool.html" class="identifier">bool_</a>
// ...
};
typedef <a href="./bool.html" class="identifier">bool_</a>&lt;true&gt; <a href="./bool.html" class="identifier">true_</a>;
typedef <a href="./bool.html" class="identifier">bool_</a>&lt;false&gt; <a href="./bool.html" class="identifier">false_</a>;
typedef <a href="./bool.html" class="identifier">bool_</a>&lt;true&gt; true_;
typedef <a href="./bool.html" class="identifier">bool_</a>&lt;false&gt; false_;
</pre>
</div>
<div class="section" id="id1223">
<div class="section" id="bool-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>A boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a> wrapper.</p>
<p>A boolean <a class="reference" href="./integral-constant.html">Integral Constant</a> wrapper.</p>
</div>
<div class="section" id="id1224">
<div class="section" id="bool-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/bool.hpp" class="header">boost/mpl/bool.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1225">
<div class="section" id="bool-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./integral-constant.html">Integral Constant</a></p>
<p><a class="reference" href="./integral-constant.html">Integral Constant</a></p>
</div>
<div class="section" id="id1226">
<div class="section" id="bool-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="21%" />
<col width="42%" />
<col width="37%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
@@ -65,49 +68,48 @@ typedef <a href="./bool.html" class="identifier">bool_</a>&lt;false&gt; <a href=
</tbody>
</table>
</div>
<div class="section" id="id1227">
<div class="section" id="bool-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
where they differ from, or are not defined in <a class="reference" href="./integral-constant.html">Integral Constant</a>.</p>
<p>For arbitrary integral constant <tt class="literal"><span class="pre">c</span></tt>:</p>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="24%" />
<col width="76%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
<tr><th>Expression</th>
<th>Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./bool.html" class="identifier">bool_</a>&lt;c&gt;</span></tt></td>
<td>An <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">x</span></tt> such that <tt class="literal"><span class="pre">x::value</span> <span class="pre">==</span> <span class="pre">c</span></tt>
<td>An <a class="reference" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">x</span></tt> such that <tt class="literal"><span class="pre">x::value</span> <span class="pre">==</span> <span class="pre">c</span></tt>
and <tt class="literal"><span class="pre">x::<a href="./value-type.html" class="identifier">value_type</a></span></tt> is identical to <tt class="literal"><span class="pre">bool</span></tt>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1228">
<div class="section" id="bool-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./bool.html" class="identifier">bool_</a>&lt;true&gt;::<a href="./value-type.html" class="identifier">value_type</a>, bool &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./bool.html" class="identifier">bool_</a>&lt;true&gt;, <a href="./bool.html" class="identifier">true_</a> &gt; )); }
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./bool.html" class="identifier">bool_</a>&lt;true&gt;, <a class="reference" href="./bool.html"><tt class="literal"><span class="pre">true_</span></tt></a> &gt; )); }
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./bool.html" class="identifier">bool_</a>&lt;true&gt;::type, <a href="./bool.html" class="identifier">bool_</a>&lt;true&gt; &gt; ));
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./bool.html" class="identifier">bool_</a>&lt;true&gt;::value, ==, true );
assert( <a href="./bool.html" class="identifier">bool_</a>&lt;true&gt;() == true );
</pre>
</div>
<div class="section" id="id1229">
<div class="section" id="bool-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./data-types.html">Data Types</a>, <a class="reference internal" href="./integral-constant.html">Integral Constant</a>, <a class="reference internal" href="./int.html">int_</a>, <a class="reference internal" href="./long.html">long_</a>, <a class="reference internal" href="./integral-c.html">integral_c</a></p>
<p><a class="reference" href="./data-types.html">Data Types</a>, <a class="reference" href="./integral-constant.html">Integral Constant</a>, <a class="refentry reference" href="./int.html"><tt class="refentry literal"><span class="pre">int_</span></tt></a>, <a class="refentry reference" href="./long.html"><tt class="refentry literal"><span class="pre">long_</span></tt></a>, <a class="refentry reference" href="./integral-c.html"><tt class="refentry literal"><span class="pre">integral_c</span></tt></a></p>
<!-- modtime: November 10, 2004 04:44:19 +0000 -->
<!-- Data Types/Numeric//int_ |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./numeric.html" class="navigation-link">Prev</a>&nbsp;<a href="./int.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./int.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./numeric.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
@@ -1,27 +1,28 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Broken Compiler Workarounds</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./limit-unrolling.html" class="navigation-link">Prev</a>&nbsp;<a href="./aux-lambda-support.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./macros.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./broken-compiler-workarounds.html" class="navigation-link">Broken Compiler Workarounds</a></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./broken-compiler.html" class="navigation-link">Broken Compiler Workarounds</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="broken-compiler-workarounds">
<h1><a class="toc-backref" href="./macros.html#id1608">Broken Compiler Workarounds</a></h1>
<!-- Macros/Broken Compiler Workarounds//BOOST_MPL_AUX_LAMBDA_SUPPORT -->
<div class="section" id="broken-compiler">
<h1><a class="toc-backref" href="./macros.html#id527" name="broken-compiler">Broken Compiler Workarounds</a></h1>
<a class="target" id="label-macros-broken" name="label-macros-broken"></a><!-- Macros/Broken Compiler Workarounds//BOOST_MPL_AUX_LAMBDA_SUPPORT -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./aux-lambda-support.html" id="id1609">BOOST_MPL_AUX_LAMBDA_SUPPORT</a></li>
<li><a class="reference" href="./aux-lambda-support.html" id="id528" name="id528">BOOST_MPL_AUX_LAMBDA_SUPPORT</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./limit-unrolling.html" class="navigation-link">Prev</a>&nbsp;<a href="./aux-lambda-support.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./macros.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
-137
View File
@@ -1,137 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: c_str</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./string-operations.html" class="navigation-link">Prev</a>&nbsp;<a href="./miscellaneous.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./string-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./string-operations.html" class="navigation-link">String Operations</a> / <a href="./c-str.html" class="navigation-link">c_str</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="c-str">
<h1><a class="toc-backref" href="./string-operations.html#id1562">c_str</a></h1>
<div class="section" id="id1137">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Sequence
&gt;
struct <a href="./c-str.html" class="identifier">c_str</a>
{
typedef <em>unspecified</em> type;
static char const value[];
};
</pre>
</div>
<div class="section" id="id1138">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./c-str.html" class="identifier">c_str</a></span></tt> converts the <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> of <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <tt class="literal"><span class="pre">Sequence</span></tt>
into a null-terminated byte string containing an equivalent sequence.</p>
</div>
<div class="section" id="id1139">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/string.hpp" class="header">boost/mpl/string.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1140">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./metafunction.html">Metafunction</a></p>
</div>
<div class="section" id="id1141">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> of
<a class="reference internal" href="./integral-constant.html">Integral Constant</a>s</td>
<td>A sequence to be converted into a
null-terminated byte string.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1142">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<div class="expression-semantics compound">
<p class="compound-first">For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> of <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <tt class="literal"><span class="pre">s</span></tt>,</p>
<pre class="compound-middle literal-block">
<a href="./c-str.html" class="identifier">c_str</a>&lt;s&gt;::value;
</pre>
<table class="compound-last docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A null-terminated byte string.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span> <span class="pre">&lt;=</span> <span class="pre">BOOST_MPL_STRING_MAX_LENGTH</span></tt>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
char const value[] = {
<a href="./at.html" class="identifier">at</a>&lt;s, 0&gt;::type::value
, ...
, <a href="./at.html" class="identifier">at</a>&lt;s, <a href="./size.html" class="identifier">size</a>&lt;s&gt;::value-1&gt;::type::value
, '\0'
};
</pre>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="id1143">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="47%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Sequence archetype</th>
<th class="head">Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td>Linear.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1144">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector-c.html" class="identifier">vector_c</a>&lt;char,'h','e','l','l','o'&gt; hello;
assert( 0 == std::strcmp( <a href="./c-str.html" class="identifier">c_str</a>&lt;hello&gt;::value, &quot;hello&quot; ) );
</pre>
</div>
<div class="section" id="id1145">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./integral-constant.html">Integral Constant</a>, <a class="reference internal" href="./string.html">string</a></p>
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./string-operations.html" class="navigation-link">Prev</a>&nbsp;<a href="./miscellaneous.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./string-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2009 Eric Niebler</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>
+49
View File
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Concepts</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Prev</a>&nbsp;<a href="./components.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./components.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./categorized-index.html" class="navigation-link">Categorized Index</a> / <a href="./categorized-concepts.html" class="navigation-link">Concepts</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="categorized-concepts">
<h1><a class="toc-backref" href="./categorized-index.html#id531" name="categorized-concepts">Concepts</a></h1>
<ul class="simple">
<li><a class="reference" href="./associative-sequence.html">Associative Sequence</a></li>
<li><a class="reference" href="./back-extensible-sequence.html">Back Extensible Sequence</a></li>
<li><a class="reference" href="./bidirectional-iterator.html">Bidirectional Iterator</a></li>
<li><a class="reference" href="./bidirectional-sequence.html">Bidirectional Sequence</a></li>
<li><a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a></li>
<li><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a></li>
<li><a class="reference" href="./forward-iterator.html">Forward Iterator</a></li>
<li><a class="reference" href="./forward-sequence.html">Forward Sequence</a></li>
<li><a class="reference" href="./front-extensible-sequence.html">Front Extensible Sequence</a></li>
<li><a class="reference" href="./inserter.html">Inserter</a></li>
<li><a class="reference" href="./integral-constant.html">Integral Constant</a></li>
<li><a class="reference" href="./integral-sequence-wrapper.html">Integral Sequence Wrapper</a></li>
<li><a class="reference" href="./lambda-expression.html">Lambda Expression</a></li>
<li><a class="reference" href="./metafunction.html">Metafunction</a></li>
<li><a class="reference" href="./metafunction-class.html">Metafunction Class</a></li>
<li><a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a></li>
<li><a class="reference" href="./placeholder-expression.html">Placeholder Expression</a></li>
<li><a class="reference" href="./random-access-iterator.html">Random Access Iterator</a></li>
<li><a class="reference" href="./random-access-sequence.html">Random Access Sequence</a></li>
<li><a class="reference" href="./reversible-algorithm.html">Reversible Algorithm</a></li>
<li><a class="reference" href="./tag-dispatched.html">Tag Dispatched Metafunction</a></li>
<li><a class="reference" href="./trivial-metafunction.html">Trivial Metafunction</a></li>
<li><a class="reference" href="./variadic-sequence.html">Variadic Sequence</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Prev</a>&nbsp;<a href="./components.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./components.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
</tr></table></body>
</html>
@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Concepts</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Prev</a>&nbsp;<a href="./components.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./components.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./categorized-index.html" class="navigation-link">Categorized Index</a> / <a href="./categorized-index-concepts.html" class="navigation-link">Concepts</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="id1391">
<h1><a class="toc-backref" href="./categorized-index.html#id1612"><a class="subsection-title" href="#concepts" name="concepts">Concepts</a></a></h1>
<ul class="simple" id="label-categorized-index-concepts">
<li><a class="reference internal" href="./associative-sequence.html">Associative Sequence</a></li>
<li><a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a></li>
<li><a class="reference internal" href="./bidirectional-iterator.html">Bidirectional Iterator</a></li>
<li><a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a></li>
<li><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></li>
<li><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></li>
<li><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></li>
<li><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></li>
<li><a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a></li>
<li><a class="reference internal" href="./inserter.html">Inserter</a></li>
<li><a class="reference internal" href="./integral-constant.html">Integral Constant</a></li>
<li><a class="reference internal" href="./integral-sequence-wrapper.html">Integral Sequence Wrapper</a></li>
<li><a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></li>
<li><a class="reference internal" href="./metafunction.html">Metafunction</a></li>
<li><a class="reference internal" href="./metafunction-class.html">Metafunction Class</a></li>
<li><a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a></li>
<li><a class="reference internal" href="./placeholder-expression.html">Placeholder Expression</a></li>
<li><a class="reference internal" href="./random-access-iterator.html">Random Access Iterator</a></li>
<li><a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a></li>
<li><a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a></li>
<li><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></li>
<li><a class="reference internal" href="./trivial-metafunction.html">Trivial Metafunction</a></li>
<li><a class="reference internal" href="./variadic-sequence.html">Variadic Sequence</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Prev</a>&nbsp;<a href="./components.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./components.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>
+11 -10
View File
@@ -1,27 +1,28 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Categorized Index</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./terminology.html" class="navigation-link">Prev</a>&nbsp;<a href="./categorized-index-concepts.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./terminology.html" class="navigation-link">Back</a>&nbsp;<a href="./acknowledgements.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="../refmanual.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./terminology.html" class="navigation-link">Prev</a>&nbsp;<a href="./categorized-concepts.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./terminology.html" class="navigation-link">Back</a>&nbsp;<a href="./acknowledgements.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="../refmanual.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./categorized-index.html" class="navigation-link">Categorized Index</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="categorized-index">
<h1><a class="toc-backref" href="../refmanual.html#id1611">Categorized Index</a></h1>
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./categorized-index-concepts.html" id="id1612">Concepts</a></li>
<li><a class="reference internal" href="./components.html" id="id1613">Components</a></li>
<h1><a class="toc-backref" href="../refmanual.html#id530" name="categorized-index">Categorized Index</a></h1>
<a class="target" id="label-categorized-index" name="label-categorized-index"></a><a class="target" id="categorized" name="categorized"></a><ul class="toc simple" id="outline">
<li><a class="reference" href="./categorized-concepts.html" id="id531" name="id531">Concepts</a></li>
<li><a class="reference" href="./components.html" id="id532" name="id532">Components</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./terminology.html" class="navigation-link">Prev</a>&nbsp;<a href="./categorized-index-concepts.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./terminology.html" class="navigation-link">Back</a>&nbsp;<a href="./acknowledgements.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="../refmanual.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./terminology.html" class="navigation-link">Prev</a>&nbsp;<a href="./categorized-concepts.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./terminology.html" class="navigation-link">Back</a>&nbsp;<a href="./acknowledgements.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="../refmanual.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
</tr></table></body>
</html>
@@ -1,39 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./cfg-no-has-xxx.html" class="navigation-link">Prev</a>&nbsp;<a href="./limit-metafunction-arity.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./cfg-no-has-xxx.html" class="navigation-link">Back</a>&nbsp;<a href="./limit-metafunction-arity.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./configuration.html" class="navigation-link">Configuration</a> / <a href="./cfg-no-has-xxx-template.html" class="navigation-link">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-cfg-no-has-xxx-template">
<h1><a class="toc-backref" href="./configuration.html#id1600">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a></h1>
<div class="section" id="id1350">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
// #define <a href="./cfg-no-has-xxx-template.html" class="identifier">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a>
</pre>
</div>
<div class="section" id="id1351">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./cfg-no-has-xxx-template.html" class="identifier">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a></span></tt> is a boolean configuration
macro signaling availability of the <a class="reference internal" href="./has-xxx-template-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a> /
<a class="reference internal" href="./has-xxx-template-named-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a> introspection macros'
functionality on a particular compiler.</p>
</div>
<div class="section" id="id1352">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./macros.html">Macros</a>, <a class="reference internal" href="./configuration.html">Configuration</a>, <a class="reference internal" href="./has-xxx-template-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a>, <a class="reference internal" href="./has-xxx-template-named-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a></p>
<!-- Macros/Configuration//BOOST_MPL_LIMIT_METAFUNCTION_ARITY |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./cfg-no-has-xxx.html" class="navigation-link">Prev</a>&nbsp;<a href="./limit-metafunction-arity.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./cfg-no-has-xxx.html" class="navigation-link">Back</a>&nbsp;<a href="./limit-metafunction-arity.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"></div></td></tr></table></body>
</html>
+18 -20
View File
@@ -1,45 +1,43 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_CFG_NO_HAS_XXX</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./cfg-no-preprocessed-headers.html" class="navigation-link">Prev</a>&nbsp;<a href="./cfg-no-has-xxx-template.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./cfg-no-preprocessed-headers.html" class="navigation-link">Back</a>&nbsp;<a href="./cfg-no-has-xxx-template.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./cfg-no-preprocessed.html" class="navigation-link">Prev</a>&nbsp;<a href="./limit-metafunction-arity.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./cfg-no-preprocessed.html" class="navigation-link">Back</a>&nbsp;<a href="./limit-metafunction-arity.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./configuration.html" class="navigation-link">Configuration</a> / <a href="./cfg-no-has-xxx.html" class="navigation-link">BOOST_MPL_CFG_NO_HAS_XXX</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-cfg-no-has-xxx">
<h1><a class="toc-backref" href="./configuration.html#id1599">BOOST_MPL_CFG_NO_HAS_XXX</a></h1>
<div class="section" id="id1347">
<div class="section" id="cfg-no-has-xxx">
<h1><a class="toc-backref" href="./configuration.html#id520" name="cfg-no-has-xxx">BOOST_MPL_CFG_NO_HAS_XXX</a></h1>
<div class="section" id="configuration-cfg-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
// #define <a href="./cfg-no-has-xxx.html" class="identifier">BOOST_MPL_CFG_NO_HAS_XXX</a>
</pre>
</div>
<div class="section" id="id1348">
<div class="section" id="configuration-cfg-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./cfg-no-has-xxx.html" class="identifier">BOOST_MPL_CFG_NO_HAS_XXX</a></span></tt> is an boolean configuration macro
signaling availability of the <a class="reference internal" href="./has-xxx-trait-def.html">BOOST_MPL_HAS_XXX_TRAIT_DEF</a> /
<a class="reference internal" href="./has-xxx-trait-named-def.html">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a> introspection macros' functionality
<p><tt class="literal"><span class="pre"><a href="./cfg-no-has-xxx.html" class="identifier">BOOST_MPL_CFG_NO_HAS_XXX</a></span></tt> is an boolean configuration macro
signaling availability of the <a class="refentry reference" href="./has-xxx-trait-def.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_HAS_XXX_TRAIT_DEF</span></tt></a> /
<a class="refentry reference" href="./has-xxx-trait-named-def.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</span></tt></a> introspection macros' functionality
on a particular compiler.</p>
</div>
<div class="section" id="id1349">
<div class="section" id="configuration-cfg-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./macros.html">Macros</a>, <a class="reference internal" href="./configuration.html">Configuration</a>, <a class="reference internal" href="./has-xxx-trait-def.html">BOOST_MPL_HAS_XXX_TRAIT_DEF</a>, <a class="reference internal" href="./has-xxx-trait-named-def.html">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a></p>
<!-- Macros/Configuration//BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE |20 -->
<!-- Copyright Daniel Walker 2007. -->
<!-- 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) -->
<p><a class="reference" href="./macros.html">Macros</a>, <a class="reference" href="./configuration.html">Configuration</a>, <a class="refentry reference" href="./has-xxx-trait-def.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_HAS_XXX_TRAIT_DEF</span></tt></a>, <a class="refentry reference" href="./has-xxx-trait-named-def.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</span></tt></a></p>
<!-- modtime: November 10, 2004 04:44:13 +0000 -->
<!-- Macros/Configuration//BOOST_MPL_LIMIT_METAFUNCTION_ARITY |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./cfg-no-preprocessed-headers.html" class="navigation-link">Prev</a>&nbsp;<a href="./cfg-no-has-xxx-template.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./cfg-no-preprocessed-headers.html" class="navigation-link">Back</a>&nbsp;<a href="./cfg-no-has-xxx-template.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./cfg-no-preprocessed.html" class="navigation-link">Prev</a>&nbsp;<a href="./limit-metafunction-arity.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./cfg-no-preprocessed.html" class="navigation-link">Back</a>&nbsp;<a href="./limit-metafunction-arity.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
</tr></table></body>
</html>
@@ -1,47 +1,49 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Prev</a>&nbsp;<a href="./cfg-no-has-xxx.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./cfg-no-has-xxx.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./configuration.html" class="navigation-link">Configuration</a> / <a href="./cfg-no-preprocessed-headers.html" class="navigation-link">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./configuration.html" class="navigation-link">Configuration</a> / <a href="./cfg-no-preprocessed.html" class="navigation-link">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-cfg-no-preprocessed-headers">
<h1><a class="toc-backref" href="./configuration.html#id1598">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a></h1>
<div class="section" id="id1343">
<span id="boost-mpl-cfg-no-preprocessed"></span><h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<div class="section" id="cfg-no-preprocessed">
<h1><a class="toc-backref" href="./configuration.html#id519" name="cfg-no-preprocessed">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a></h1>
<a class="target" id="id294" name="id294"></a><div class="section" id="cfg-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
// #define <a href="./cfg-no-preprocessed-headers.html" class="identifier">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a>
// #define <a href="./cfg-no-preprocessed.html" class="identifier">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a>
</pre>
</div>
<div class="section" id="id1344">
<div class="section" id="cfg-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./cfg-no-preprocessed-headers.html" class="identifier">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a></span></tt> is an boolean configuration macro
<p><tt class="literal"><span class="pre"><a href="./cfg-no-preprocessed.html" class="identifier">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a></span></tt> is an boolean configuration macro
regulating library's internal use of preprocessed headers. When defined, it
instructs the MPL to discard the pre-generated headers found in
<tt class="literal"><span class="pre">boost/mpl/aux_/preprocessed</span></tt> directory and use <a class="reference external" href="http://boost-consulting.com/tmpbook/preprocessor.html" target="_top">preprocessor
metaprogramming</a> techniques to generate the necessary versions of the
instructs the MPL to discard the pre-generated headers found in
<tt class="literal"><span class="pre">boost/mpl/aux_/preprocessed</span></tt> directory and use <a class="reference" href="http://boost-consulting.com/tmpbook/preprocessor.html" target="_top">preprocessor
metaprogramming</a> techniques to generate the necessary versions of the
library components on the fly.</p>
<p>In this implementation of the library, the macro is not defined by default.
To change the default configuration, define
<tt class="literal"><span class="pre"><a href="./cfg-no-preprocessed-headers.html" class="identifier">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a></span></tt> before including any library
To change the default configuration, define
<tt class="literal"><span class="pre"><a href="./cfg-no-preprocessed.html" class="identifier">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a></span></tt> before including any library
header.</p>
</div>
<div class="section" id="id1346">
<div class="section" id="cfg-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./macros.html">Macros</a>, <a class="reference internal" href="./configuration.html">Configuration</a></p>
<p><a class="reference" href="./macros.html">Macros</a>, <a class="reference" href="./configuration.html">Configuration</a></p>
<!-- modtime: November 15, 2004 01:55:35 +0000 -->
<!-- Macros/Configuration//BOOST_MPL_CFG_NO_HAS_XXX |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Prev</a>&nbsp;<a href="./cfg-no-has-xxx.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./cfg-no-has-xxx.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./configuration.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
-112
View File
@@ -1,112 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: char_</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./integral-c.html" class="navigation-link">Prev</a>&nbsp;<a href="./data-types-miscellaneous.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./integral-c.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./numeric.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./data-types.html" class="navigation-link">Data Types</a> / <a href="./numeric.html" class="navigation-link">Numeric</a> / <a href="./char.html" class="navigation-link">char_</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="char">
<h1><a class="toc-backref" href="./numeric.html#id1581">char_</a></h1>
<div class="section" id="id1262">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
char N
&gt;
struct <a href="./char.html" class="identifier">char_</a>
{
// <em>unspecified</em>
// ...
};
</pre>
</div>
<div class="section" id="id1263">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>An <a class="reference internal" href="./integral-constant.html">Integral Constant</a> wrapper for <tt class="literal"><span class="pre">char</span></tt>.</p>
</div>
<div class="section" id="id1264">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/char.hpp" class="header">boost/mpl/char.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1265">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./integral-constant.html">Integral Constant</a></p>
</div>
<div class="section" id="id1266">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="21%" />
<col width="42%" />
<col width="37%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">N</span></tt></td>
<td>A character constant</td>
<td>A value to wrap.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1267">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
<p>For arbitrary character constant <tt class="literal"><span class="pre">c</span></tt>:</p>
<table border="1" class="docutils table">
<colgroup>
<col width="24%" />
<col width="76%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./char.html" class="identifier">char_</a>&lt;c&gt;</span></tt></td>
<td>An <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">x</span></tt> such that <tt class="literal"><span class="pre">x::value</span> <span class="pre">==</span> <span class="pre">c</span></tt>
and <tt class="literal"><span class="pre">x::<a href="./value-type.html" class="identifier">value_type</a></span></tt> is identical to <tt class="literal"><span class="pre">char</span></tt>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1268">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./char.html" class="identifier">char_</a>&lt;'c'&gt; c;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; c::<a href="./value-type.html" class="identifier">value_type</a>, char &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; c::type, c &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./next.html" class="identifier">next</a>&lt; c &gt;::type, <a href="./char.html" class="identifier">char_</a>&lt;'d'&gt; &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./prior.html" class="identifier">prior</a>&lt; c &gt;::type, <a href="./char.html" class="identifier">char_</a>&lt;'b'&gt; &gt; ));
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (c::value), ==, 'c' );
assert( c() == 'c' );
</pre>
</div>
<div class="section" id="id1269">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./data-types.html">Data Types</a>, <a class="reference internal" href="./integral-constant.html">Integral Constant</a>, <a class="reference internal" href="./int.html">int_</a>, <a class="reference internal" href="./size-t.html">size_t</a>, <a class="reference internal" href="./integral-c.html">integral_c</a></p>
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./integral-c.html" class="navigation-link">Prev</a>&nbsp;<a href="./data-types-miscellaneous.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./integral-c.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./numeric.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2009 Eric Niebler</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>
+18 -17
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Classes</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,29 +15,27 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./classes.html" class="navigation-link">Classes</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="classes">
<h1><a class="toc-backref" href="./sequences.html#id1405">Classes</a></h1>
<p id="label-sequences-classes">The MPL provides a large number of predefined general-purpose sequence
<h1><a class="toc-backref" href="./sequences.html#id334" name="classes">Classes</a></h1>
<a class="target" id="label-sequences-classes" name="label-sequences-classes"></a><p>The MPL provides a large number of predefined general-purpose sequence
classes covering most of the typical metaprogramming needs out-of-box.</p>
<!-- For all library-supplied sequences a publicly-derived class with no additional
<!-- For all library-supplied sequences a publicly-derived class with no additional
members is equivalent except for type identity. -->
<!-- modtime: October 25, 2004 06:16:07 +0000 -->
<!-- Sequences/Classes//vector |10 -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./vector.html" id="id1406">vector</a></li>
<li><a class="reference internal" href="./list.html" id="id1407">list</a></li>
<li><a class="reference internal" href="./deque.html" id="id1408">deque</a></li>
<li><a class="reference internal" href="./set.html" id="id1409">set</a></li>
<li><a class="reference internal" href="./map.html" id="id1410">map</a></li>
<li><a class="reference internal" href="./range-c.html" id="id1411">range_c</a></li>
<li><a class="reference internal" href="./vector-c.html" id="id1412">vector_c</a></li>
<li><a class="reference internal" href="./list-c.html" id="id1413">list_c</a></li>
<li><a class="reference internal" href="./set-c.html" id="id1414">set_c</a></li>
<li><a class="reference internal" href="./string.html" id="id1415">string</a></li>
<li><a class="reference" href="./vector.html" id="id335" name="id335">vector</a></li>
<li><a class="reference" href="./list.html" id="id336" name="id336">list</a></li>
<li><a class="reference" href="./deque.html" id="id337" name="id337">deque</a></li>
<li><a class="reference" href="./set.html" id="id338" name="id338">set</a></li>
<li><a class="reference" href="./map.html" id="id339" name="id339">map</a></li>
<li><a class="reference" href="./range-c.html" id="id340" name="id340">range_c</a></li>
<li><a class="reference" href="./vector-c.html" id="id341" name="id341">vector_c</a></li>
<li><a class="reference" href="./list-c.html" id="id342" name="id342">list_c</a></li>
<li><a class="reference" href="./set-c.html" id="id343" name="id343">set_c</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./variadic-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./vector.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Back</a>&nbsp;<a href="./views.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./sequences.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+31 -31
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: clear</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./clear.html" class="navigation-link">clear</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="clear">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1429">clear</a></h1>
<div class="section" id="id211">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id357" name="clear">clear</a></h1>
<div class="section" id="clear-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -25,73 +28,71 @@ struct <a href="./clear.html" class="identifier">clear</a>
};
</pre>
</div>
<div class="section" id="id212">
<div class="section" id="clear-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns an empty sequence <a class="reference internal" href="./terminology.html#concept-identical">concept-identical</a> to <tt class="literal"><span class="pre">Sequence</span></tt>.</p>
<p>Returns an empty sequence <a class="reference" href="./terminology.html#concept-identical">concept-identical</a> to <tt class="literal"><span class="pre">Sequence</span></tt>.</p>
</div>
<div class="section" id="id213">
<div class="section" id="clear-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/clear.hpp" class="header">boost/mpl/clear.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id214">
<div class="section" id="clear-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
<p><a class="reference" href="./tag-dispatched.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id215">
<div class="section" id="clear-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="17%" />
<col width="39%" />
<col width="44%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> or
<a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a> or
<a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a></td>
<td>A sequence to get an empty &quot;copy&quot; of.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id216">
<div class="section" id="clear-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> or <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p>
<p>For any <a class="reference" href="./extensible-sequence.html">Extensible Sequence</a> or <a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./clear.html" class="identifier">clear</a>&lt;s&gt;::type t;
typedef <a href="./clear.html" class="identifier">clear</a>&lt;s&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> or <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a> or <a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="literal-block">
<pre class="last literal-block">
typedef <a href="./erase.html" class="identifier">erase</a>&lt; s, <a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type, <a href="./end.html" class="identifier">end</a>&lt;s&gt;::type &gt;::type t;
</pre>
</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><p class="first last"><tt class="literal"><span class="pre"><a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt>.</p>
</td>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><tt class="literal"><span class="pre"><a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id217">
<div class="section" id="clear-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id218">
<div class="section" id="clear-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector-c.html" class="identifier">vector_c</a>&lt;int,1,3,5,7,9,11&gt; odds;
@@ -100,16 +101,15 @@ typedef <a href="./clear.html" class="identifier">clear</a>&lt;odds&gt;::type no
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./empty.html" class="identifier">empty</a>&lt;nothing&gt; ));
</pre>
</div>
<div class="section" id="id219">
<div class="section" id="clear-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>, <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a>, <a class="reference internal" href="./erase.html">erase</a>, <a class="reference internal" href="./empty.html">empty</a>, <a class="reference internal" href="./begin.html">begin</a>, <a class="reference internal" href="./end.html">end</a></p>
<p><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a>, <a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a>, <a class="refentry reference" href="./erase.html"><tt class="refentry literal"><span class="pre">erase</span></tt></a>, <a class="refentry reference" href="./empty.html"><tt class="refentry literal"><span class="pre">empty</span></tt></a>, <a class="refentry reference" href="./begin.html"><tt class="refentry literal"><span class="pre">begin</span></tt></a>, <a class="refentry reference" href="./end.html"><tt class="refentry literal"><span class="pre">end</span></tt></a></p>
<!-- modtime: November 13, 2004 01:25:47 +0000 -->
<!-- Sequences/Intrinsic Metafunctions//empty -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./begin.html" class="navigation-link">Prev</a>&nbsp;<a href="./empty.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./begin.html" class="navigation-link">Back</a>&nbsp;<a href="./empty.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+14 -12
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Comparisons</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,21 +15,20 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./comparisons.html" class="navigation-link">Comparisons</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="comparisons">
<h1><a class="toc-backref" href="./metafunctions.html#id1542">Comparisons</a></h1>
<span class="target" id="label-metafunctions-comparisons"></span><!-- Metafunctions/Comparisons//less |10 -->
<h1><a class="toc-backref" href="./metafunctions.html#id468" name="comparisons">Comparisons</a></h1>
<a class="target" id="id235" name="id235"></a><!-- modtime: November 08, 2004 06:50:08 +0000 -->
<!-- Metafunctions/Comparisons//less |10 -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./less.html" id="id1543">less</a></li>
<li><a class="reference internal" href="./less-equal.html" id="id1544">less_equal</a></li>
<li><a class="reference internal" href="./greater.html" id="id1545">greater</a></li>
<li><a class="reference internal" href="./greater-equal.html" id="id1546">greater_equal</a></li>
<li><a class="reference internal" href="./equal-to.html" id="id1547">equal_to</a></li>
<li><a class="reference internal" href="./not-equal-to.html" id="id1548">not_equal_to</a></li>
<li><a class="reference" href="./less.html" id="id469" name="id469">less</a></li>
<li><a class="reference" href="./less-equal.html" id="id470" name="id470">less_equal</a></li>
<li><a class="reference" href="./greater.html" id="id471" name="id471">greater</a></li>
<li><a class="reference" href="./greater-equal.html" id="id472" name="id472">greater_equal</a></li>
<li><a class="reference" href="./equal-to.html" id="id473" name="id473">equal_to</a></li>
<li><a class="reference" href="./not-equal-to.html" id="id474" name="id474">not_equal_to</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./negate.html" class="navigation-link">Prev</a>&nbsp;<a href="./less.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./arithmetic-operations.html" class="navigation-link">Back</a>&nbsp;<a href="./logical-operations.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+159 -166
View File
@@ -1,183 +1,176 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Components</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./categorized-index-concepts.html" class="navigation-link">Prev</a>&nbsp;<a href="./acknowledgements.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index-concepts.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./categorized-concepts.html" class="navigation-link">Prev</a>&nbsp;<a href="./acknowledgements.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-concepts.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./categorized-index.html" class="navigation-link">Categorized Index</a> / <a href="./components.html" class="navigation-link">Components</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="components">
<h1><a class="toc-backref" href="./categorized-index.html#id1613">Components</a></h1>
<ul class="simple" id="label-categorized-index-components">
<li><a class="reference internal" href="./assert.html">BOOST_MPL_ASSERT</a></li>
<li><a class="reference internal" href="./assert-msg.html">BOOST_MPL_ASSERT_MSG</a></li>
<li><a class="reference internal" href="./assert-not.html">BOOST_MPL_ASSERT_NOT</a></li>
<li><a class="reference internal" href="./assert-relation.html">BOOST_MPL_ASSERT_RELATION</a></li>
<li><a class="reference internal" href="./aux-lambda-support.html">BOOST_MPL_AUX_LAMBDA_SUPPORT</a></li>
<li><a class="reference internal" href="./cfg-no-has-xxx.html">BOOST_MPL_CFG_NO_HAS_XXX</a></li>
<li><a class="reference internal" href="./cfg-no-has-xxx-template.html">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a></li>
<li><a class="reference internal" href="./cfg-no-preprocessed-headers.html">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a></li>
<li><a class="reference internal" href="./has-xxx-template-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a></li>
<li><a class="reference internal" href="./has-xxx-template-named-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a></li>
<li><a class="reference internal" href="./has-xxx-trait-def.html">BOOST_MPL_HAS_XXX_TRAIT_DEF</a></li>
<li><a class="reference internal" href="./has-xxx-trait-named-def.html">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a></li>
<li><a class="reference internal" href="./limit-list-size.html">BOOST_MPL_LIMIT_LIST_SIZE</a></li>
<li><a class="reference internal" href="./limit-map-size.html">BOOST_MPL_LIMIT_MAP_SIZE</a></li>
<li><a class="reference internal" href="./limit-metafunction-arity.html">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</a></li>
<li><a class="reference internal" href="./limit-set-size.html">BOOST_MPL_LIMIT_SET_SIZE</a></li>
<li><a class="reference internal" href="./limit-string-size.html">BOOST_MPL_LIMIT_STRING_SIZE</a></li>
<li><a class="reference internal" href="./limit-unrolling.html">BOOST_MPL_LIMIT_UNROLLING</a></li>
<li><a class="reference internal" href="./limit-vector-size.html">BOOST_MPL_LIMIT_VECTOR_SIZE</a></li>
<li><a class="reference internal" href="./trivial-metafunctions-summary.html">Trivial Metafunctions Summary</a></li>
<li><a class="reference internal" href="./placeholders.html">_1</a>, <a class="reference internal" href="./placeholders.html">_2</a>, <a class="reference internal" href="./placeholders.html">_3</a>,<em>...</em></li>
<li><a class="reference internal" href="./accumulate.html">accumulate</a></li>
<li><a class="reference internal" href="./advance.html">advance</a></li>
<li><a class="reference internal" href="./always.html">always</a></li>
<li><a class="reference internal" href="./and.html">and_</a></li>
<li><a class="reference internal" href="./apply.html">apply</a></li>
<li><a class="reference internal" href="./apply-wrap.html">apply_wrap</a></li>
<li><a class="reference internal" href="./arg.html">arg</a></li>
<li><a class="reference internal" href="./at.html">at</a></li>
<li><a class="reference internal" href="./at-c.html">at_c</a></li>
<li><a class="reference internal" href="./back.html">back</a></li>
<li><a class="reference internal" href="./back-inserter.html">back_inserter</a></li>
<li><a class="reference internal" href="./begin.html">begin</a></li>
<li><a class="reference internal" href="./bind.html">bind</a></li>
<li><a class="reference internal" href="./bitand.html">bitand_</a></li>
<li><a class="reference internal" href="./bitor.html">bitor_</a></li>
<li><a class="reference internal" href="./bitxor.html">bitxor_</a></li>
<li><a class="reference internal" href="./bool.html">bool_</a></li>
<li><a class="reference internal" href="./c-str.html">c_str</a></li>
<li><a class="reference internal" href="./char.html">char_</a></li>
<li><a class="reference internal" href="./clear.html">clear</a></li>
<li><a class="reference internal" href="./contains.html">contains</a></li>
<li><a class="reference internal" href="./copy.html">copy</a></li>
<li><a class="reference internal" href="./copy-if.html">copy_if</a></li>
<li><a class="reference internal" href="./count.html">count</a></li>
<li><a class="reference internal" href="./count-if.html">count_if</a></li>
<li><a class="reference internal" href="./deque.html">deque</a></li>
<li><a class="reference internal" href="./deref.html">deref</a></li>
<li><a class="reference internal" href="./distance.html">distance</a></li>
<li><a class="reference internal" href="./divides.html">divides</a></li>
<li><a class="reference internal" href="./empty.html">empty</a></li>
<li><a class="reference internal" href="./empty-base.html">empty_base</a></li>
<li><a class="reference internal" href="./empty-sequence.html">empty_sequence</a></li>
<li><a class="reference internal" href="./end.html">end</a></li>
<li><a class="reference internal" href="./equal.html">equal</a></li>
<li><a class="reference internal" href="./equal-to.html">equal_to</a></li>
<li><a class="reference internal" href="./erase.html">erase</a></li>
<li><a class="reference internal" href="./erase-key.html">erase_key</a></li>
<li><a class="reference internal" href="./eval-if.html">eval_if</a></li>
<li><a class="reference internal" href="./eval-if-c.html">eval_if_c</a></li>
<li><a class="reference internal" href="./filter-view.html">filter_view</a></li>
<li><a class="reference internal" href="./find.html">find</a></li>
<li><a class="reference internal" href="./find-if.html">find_if</a></li>
<li><a class="reference internal" href="./fold.html">fold</a></li>
<li><a class="reference internal" href="./for-each.html">for_each</a></li>
<li><a class="reference internal" href="./front.html">front</a></li>
<li><a class="reference internal" href="./front-inserter.html">front_inserter</a></li>
<li><a class="reference internal" href="./greater.html">greater</a></li>
<li><a class="reference internal" href="./greater-equal.html">greater_equal</a></li>
<li><a class="reference internal" href="./has-key.html">has_key</a></li>
<li><a class="reference internal" href="./identity.html">identity</a></li>
<li><a class="reference internal" href="./if.html">if_</a></li>
<li><a class="reference internal" href="./if-c.html">if_c</a></li>
<li><a class="reference internal" href="./inherit.html">inherit</a></li>
<li><a class="reference internal" href="./inherit-linearly.html">inherit_linearly</a></li>
<li><a class="reference internal" href="./insert.html">insert</a></li>
<li><a class="reference internal" href="./insert-range.html">insert_range</a></li>
<li><a class="reference internal" href="./inserter.html">Inserter</a></li>
<li><a class="reference internal" href="./int.html">int_</a></li>
<li><a class="reference internal" href="./integral-c.html">integral_c</a></li>
<li><a class="reference internal" href="./is-sequence.html">is_sequence</a></li>
<li><a class="reference internal" href="./iter-fold.html">iter_fold</a></li>
<li><a class="reference internal" href="./iterator-category.html">iterator_category</a></li>
<li><a class="reference internal" href="./iterator-range.html">iterator_range</a></li>
<li><a class="reference internal" href="./joint-view.html">joint_view</a></li>
<li><a class="reference internal" href="./key-type.html">key_type</a></li>
<li><a class="reference internal" href="./lambda.html">lambda</a></li>
<li><a class="reference internal" href="./less.html">less</a></li>
<li><a class="reference internal" href="./less-equal.html">less_equal</a></li>
<li><a class="reference internal" href="./list.html">list</a></li>
<li><a class="reference internal" href="./list-c.html">list_c</a></li>
<li><a class="reference internal" href="./long.html">long_</a></li>
<li><a class="reference internal" href="./lower-bound.html">lower_bound</a></li>
<li><a class="reference internal" href="./map.html">map</a></li>
<li><a class="reference internal" href="./max.html">max</a></li>
<li><a class="reference internal" href="./max-element.html">max_element</a></li>
<li><a class="reference internal" href="./min.html">min</a></li>
<li><a class="reference internal" href="./min-element.html">min_element</a></li>
<li><a class="reference internal" href="./minus.html">minus</a></li>
<li><a class="reference internal" href="./modulus.html">modulus</a></li>
<li><a class="reference internal" href="./negate.html">negate</a></li>
<li><a class="reference internal" href="./next.html">next</a></li>
<li><a class="reference internal" href="./not.html">not_</a></li>
<li><a class="reference internal" href="./not-equal-to.html">not_equal_to</a></li>
<li><a class="reference internal" href="./numeric-cast.html">numeric_cast</a></li>
<li><a class="reference internal" href="./or.html">or_</a></li>
<li><a class="reference internal" href="./order.html">order</a></li>
<li><a class="reference internal" href="./pair.html">pair</a></li>
<li><a class="reference internal" href="./partition.html">partition</a></li>
<li><a class="reference internal" href="./plus.html">plus</a></li>
<li><a class="reference internal" href="./pop-back.html">pop_back</a></li>
<li><a class="reference internal" href="./pop-front.html">pop_front</a></li>
<li><a class="reference internal" href="./prior.html">prior</a></li>
<li><a class="reference internal" href="./protect.html">protect</a></li>
<li><a class="reference internal" href="./push-back.html">push_back</a></li>
<li><a class="reference internal" href="./push-front.html">push_front</a></li>
<li><a class="reference internal" href="./quote.html">quote</a></li>
<li><a class="reference internal" href="./range-c.html">range_c</a></li>
<li><a class="reference internal" href="./remove.html">remove</a></li>
<li><a class="reference internal" href="./remove-if.html">remove_if</a></li>
<li><a class="reference internal" href="./replace.html">replace</a></li>
<li><a class="reference internal" href="./replace-if.html">replace_if</a></li>
<li><a class="reference internal" href="./reverse.html">reverse</a></li>
<li><a class="reference internal" href="./reverse-copy.html">reverse_copy</a></li>
<li><a class="reference internal" href="./reverse-copy-if.html">reverse_copy_if</a></li>
<li><a class="reference internal" href="./reverse-fold.html">reverse_fold</a></li>
<li><a class="reference internal" href="./reverse-iter-fold.html">reverse_iter_fold</a></li>
<li><a class="reference internal" href="./reverse-partition.html">reverse_partition</a></li>
<li><a class="reference internal" href="./reverse-remove.html">reverse_remove</a></li>
<li><a class="reference internal" href="./reverse-remove-if.html">reverse_remove_if</a></li>
<li><a class="reference internal" href="./reverse-replace.html">reverse_replace</a></li>
<li><a class="reference internal" href="./reverse-replace-if.html">reverse_replace_if</a></li>
<li><a class="reference internal" href="./reverse-stable-partition.html">reverse_stable_partition</a></li>
<li><a class="reference internal" href="./reverse-transform.html">reverse_transform</a></li>
<li><a class="reference internal" href="./reverse-unique.html">reverse_unique</a></li>
<li><a class="reference internal" href="./sequence-tag.html">sequence_tag</a></li>
<li><a class="reference internal" href="./set.html">set</a></li>
<li><a class="reference internal" href="./set-c.html">set_c</a></li>
<li><a class="reference internal" href="./shift-left.html">shift_left</a></li>
<li><a class="reference internal" href="./shift-right.html">shift_right</a></li>
<li><a class="reference internal" href="./single-view.html">single_view</a></li>
<li><a class="reference internal" href="./size.html">size</a></li>
<li><a class="reference internal" href="./size-t.html">size_t</a></li>
<li><a class="reference internal" href="./sizeof.html">sizeof_</a></li>
<li><a class="reference internal" href="./sort.html">sort</a></li>
<li><a class="reference internal" href="./stable-partition.html">stable_partition</a></li>
<li><a class="reference internal" href="./string.html">string</a></li>
<li><a class="reference internal" href="./times.html">times</a></li>
<li><a class="reference internal" href="./transform.html">transform</a></li>
<li><a class="reference internal" href="./transform-view.html">transform_view</a></li>
<li><a class="reference internal" href="./unique.html">unique</a></li>
<li><a class="reference internal" href="./unpack-args.html">unpack_args</a></li>
<li><a class="reference internal" href="./upper-bound.html">upper_bound</a></li>
<li><a class="reference internal" href="./value-type.html">value_type</a></li>
<li><a class="reference internal" href="./vector.html">vector</a></li>
<li><a class="reference internal" href="./vector-c.html">vector_c</a></li>
<li><a class="reference internal" href="./void.html">void_</a></li>
<li><a class="reference internal" href="./zip-view.html">zip_view</a></li>
<h1><a class="toc-backref" href="./categorized-index.html#id532" name="components">Components</a></h1>
<ul class="simple">
<li><a class="refentry reference" href="./assert.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_ASSERT</span></tt></a></li>
<li><a class="refentry reference" href="./assert-msg.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_ASSERT_MSG</span></tt></a></li>
<li><a class="refentry reference" href="./assert-not.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_ASSERT_NOT</span></tt></a></li>
<li><a class="refentry reference" href="./assert-relation.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_ASSERT_RELATION</span></tt></a></li>
<li><a class="refentry reference" href="./aux-lambda-support.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_AUX_LAMBDA_SUPPORT</span></tt></a></li>
<li><a class="refentry reference" href="./cfg-no-has-xxx.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_CFG_NO_HAS_XXX</span></tt></a></li>
<li><a class="refentry reference" href="./cfg-no-preprocessed.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</span></tt></a></li>
<li><a class="refentry reference" href="./has-xxx-trait-def.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_HAS_XXX_TRAIT_DEF</span></tt></a></li>
<li><a class="refentry reference" href="./has-xxx-trait-named-def.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</span></tt></a></li>
<li><a class="refentry reference" href="./limit-list-size.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_LIMIT_LIST_SIZE</span></tt></a></li>
<li><a class="refentry reference" href="./limit-map-size.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_LIMIT_MAP_SIZE</span></tt></a></li>
<li><a class="refentry reference" href="./limit-metafunction-arity.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</span></tt></a></li>
<li><a class="refentry reference" href="./limit-set-size.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_LIMIT_SET_SIZE</span></tt></a></li>
<li><a class="refentry reference" href="./limit-unrolling.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_LIMIT_UNROLLING</span></tt></a></li>
<li><a class="refentry reference" href="./limit-vector-size.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_LIMIT_VECTOR_SIZE</span></tt></a></li>
<li><a class="refentry reference" href="./placeholders.html"><tt class="refentry literal"><span class="pre">_1</span></tt></a>, <a class="refentry reference" href="./placeholders.html"><tt class="refentry literal"><span class="pre">_2</span></tt></a>, <a class="refentry reference" href="./placeholders.html"><tt class="refentry literal"><span class="pre">_3</span></tt></a>,<em>...</em></li>
<li><a class="refentry reference" href="./accumulate.html"><tt class="refentry literal"><span class="pre">accumulate</span></tt></a></li>
<li><a class="refentry reference" href="./advance.html"><tt class="refentry literal"><span class="pre">advance</span></tt></a></li>
<li><a class="refentry reference" href="./always.html"><tt class="refentry literal"><span class="pre">always</span></tt></a></li>
<li><a class="refentry reference" href="./and.html"><tt class="refentry literal"><span class="pre">and_</span></tt></a></li>
<li><a class="refentry reference" href="./apply.html"><tt class="refentry literal"><span class="pre">apply</span></tt></a></li>
<li><a class="refentry reference" href="./apply-wrap.html"><tt class="refentry literal"><span class="pre">apply_wrap</span></tt></a></li>
<li><a class="refentry reference" href="./arg.html"><tt class="refentry literal"><span class="pre">arg</span></tt></a></li>
<li><a class="refentry reference" href="./at.html"><tt class="refentry literal"><span class="pre">at</span></tt></a></li>
<li><a class="refentry reference" href="./at-c.html"><tt class="refentry literal"><span class="pre">at_c</span></tt></a></li>
<li><a class="refentry reference" href="./back.html"><tt class="refentry literal"><span class="pre">back</span></tt></a></li>
<li><a class="refentry reference" href="./back-inserter.html"><tt class="refentry literal"><span class="pre">back_inserter</span></tt></a></li>
<li><a class="refentry reference" href="./begin.html"><tt class="refentry literal"><span class="pre">begin</span></tt></a></li>
<li><a class="refentry reference" href="./bind.html"><tt class="refentry literal"><span class="pre">bind</span></tt></a></li>
<li><a class="refentry reference" href="./bitand.html"><tt class="refentry literal"><span class="pre">bitand_</span></tt></a></li>
<li><a class="refentry reference" href="./bitor.html"><tt class="refentry literal"><span class="pre">bitor_</span></tt></a></li>
<li><a class="refentry reference" href="./bitxor.html"><tt class="refentry literal"><span class="pre">bitxor_</span></tt></a></li>
<li><a class="refentry reference" href="./bool.html"><tt class="refentry literal"><span class="pre">bool_</span></tt></a></li>
<li><a class="refentry reference" href="./clear.html"><tt class="refentry literal"><span class="pre">clear</span></tt></a></li>
<li><a class="refentry reference" href="./contains.html"><tt class="refentry literal"><span class="pre">contains</span></tt></a></li>
<li><a class="refentry reference" href="./copy.html"><tt class="refentry literal"><span class="pre">copy</span></tt></a></li>
<li><a class="refentry reference" href="./copy-if.html"><tt class="refentry literal"><span class="pre">copy_if</span></tt></a></li>
<li><a class="refentry reference" href="./count.html"><tt class="refentry literal"><span class="pre">count</span></tt></a></li>
<li><a class="refentry reference" href="./count-if.html"><tt class="refentry literal"><span class="pre">count_if</span></tt></a></li>
<li><a class="refentry reference" href="./deque.html"><tt class="refentry literal"><span class="pre">deque</span></tt></a></li>
<li><a class="refentry reference" href="./deref.html"><tt class="refentry literal"><span class="pre">deref</span></tt></a></li>
<li><a class="refentry reference" href="./distance.html"><tt class="refentry literal"><span class="pre">distance</span></tt></a></li>
<li><a class="refentry reference" href="./divides.html"><tt class="refentry literal"><span class="pre">divides</span></tt></a></li>
<li><a class="refentry reference" href="./empty.html"><tt class="refentry literal"><span class="pre">empty</span></tt></a></li>
<li><a class="refentry reference" href="./empty-base.html"><tt class="refentry literal"><span class="pre">empty_base</span></tt></a></li>
<li><a class="refentry reference" href="./empty-sequence.html"><tt class="refentry literal"><span class="pre">empty_sequence</span></tt></a></li>
<li><a class="refentry reference" href="./end.html"><tt class="refentry literal"><span class="pre">end</span></tt></a></li>
<li><a class="refentry reference" href="./equal.html"><tt class="refentry literal"><span class="pre">equal</span></tt></a></li>
<li><a class="refentry reference" href="./equal-to.html"><tt class="refentry literal"><span class="pre">equal_to</span></tt></a></li>
<li><a class="refentry reference" href="./erase.html"><tt class="refentry literal"><span class="pre">erase</span></tt></a></li>
<li><a class="refentry reference" href="./erase-key.html"><tt class="refentry literal"><span class="pre">erase_key</span></tt></a></li>
<li><a class="refentry reference" href="./eval-if.html"><tt class="refentry literal"><span class="pre">eval_if</span></tt></a></li>
<li><a class="refentry reference" href="./eval-if-c.html"><tt class="refentry literal"><span class="pre">eval_if_c</span></tt></a></li>
<li><a class="refentry reference" href="./filter-view.html"><tt class="refentry literal"><span class="pre">filter_view</span></tt></a></li>
<li><a class="refentry reference" href="./find.html"><tt class="refentry literal"><span class="pre">find</span></tt></a></li>
<li><a class="refentry reference" href="./find-if.html"><tt class="refentry literal"><span class="pre">find_if</span></tt></a></li>
<li><a class="refentry reference" href="./fold.html"><tt class="refentry literal"><span class="pre">fold</span></tt></a></li>
<li><a class="refentry reference" href="./front.html"><tt class="refentry literal"><span class="pre">front</span></tt></a></li>
<li><a class="refentry reference" href="./front-inserter.html"><tt class="refentry literal"><span class="pre">front_inserter</span></tt></a></li>
<li><a class="refentry reference" href="./greater.html"><tt class="refentry literal"><span class="pre">greater</span></tt></a></li>
<li><a class="refentry reference" href="./greater-equal.html"><tt class="refentry literal"><span class="pre">greater_equal</span></tt></a></li>
<li><a class="refentry reference" href="./has-key.html"><tt class="refentry literal"><span class="pre">has_key</span></tt></a></li>
<li><a class="refentry reference" href="./identity.html"><tt class="refentry literal"><span class="pre">identity</span></tt></a></li>
<li><a class="refentry reference" href="./if.html"><tt class="refentry literal"><span class="pre">if_</span></tt></a></li>
<li><a class="refentry reference" href="./if-c.html"><tt class="refentry literal"><span class="pre">if_c</span></tt></a></li>
<li><a class="refentry reference" href="./inherit.html"><tt class="refentry literal"><span class="pre">inherit</span></tt></a></li>
<li><a class="refentry reference" href="./inherit-linearly.html"><tt class="refentry literal"><span class="pre">inherit_linearly</span></tt></a></li>
<li><a class="refentry reference" href="./insert.html"><tt class="refentry literal"><span class="pre">insert</span></tt></a></li>
<li><a class="refentry reference" href="./insert-range.html"><tt class="refentry literal"><span class="pre">insert_range</span></tt></a></li>
<li><a class="refentry reference" href="./inserters-inserter.html"><tt class="refentry literal"><span class="pre">inserter</span></tt></a></li>
<li><a class="refentry reference" href="./int.html"><tt class="refentry literal"><span class="pre">int_</span></tt></a></li>
<li><a class="refentry reference" href="./integral-c.html"><tt class="refentry literal"><span class="pre">integral_c</span></tt></a></li>
<li><a class="refentry reference" href="./is-sequence.html"><tt class="refentry literal"><span class="pre">is_sequence</span></tt></a></li>
<li><a class="refentry reference" href="./iter-fold.html"><tt class="refentry literal"><span class="pre">iter_fold</span></tt></a></li>
<li><a class="refentry reference" href="./iterator-category.html"><tt class="refentry literal"><span class="pre">iterator_category</span></tt></a></li>
<li><a class="refentry reference" href="./iterator-range.html"><tt class="refentry literal"><span class="pre">iterator_range</span></tt></a></li>
<li><a class="refentry reference" href="./joint-view.html"><tt class="refentry literal"><span class="pre">joint_view</span></tt></a></li>
<li><a class="refentry reference" href="./key-type.html"><tt class="refentry literal"><span class="pre">key_type</span></tt></a></li>
<li><a class="refentry reference" href="./lambda.html"><tt class="refentry literal"><span class="pre">lambda</span></tt></a></li>
<li><a class="refentry reference" href="./less.html"><tt class="refentry literal"><span class="pre">less</span></tt></a></li>
<li><a class="refentry reference" href="./less-equal.html"><tt class="refentry literal"><span class="pre">less_equal</span></tt></a></li>
<li><a class="refentry reference" href="./list.html"><tt class="refentry literal"><span class="pre">list</span></tt></a></li>
<li><a class="refentry reference" href="./list-c.html"><tt class="refentry literal"><span class="pre">list_c</span></tt></a></li>
<li><a class="refentry reference" href="./long.html"><tt class="refentry literal"><span class="pre">long_</span></tt></a></li>
<li><a class="refentry reference" href="./lower-bound.html"><tt class="refentry literal"><span class="pre">lower_bound</span></tt></a></li>
<li><a class="refentry reference" href="./map.html"><tt class="refentry literal"><span class="pre">map</span></tt></a></li>
<li><a class="refentry reference" href="./max.html"><tt class="refentry literal"><span class="pre">max</span></tt></a></li>
<li><a class="refentry reference" href="./max-element.html"><tt class="refentry literal"><span class="pre">max_element</span></tt></a></li>
<li><a class="refentry reference" href="./min.html"><tt class="refentry literal"><span class="pre">min</span></tt></a></li>
<li><a class="refentry reference" href="./min-element.html"><tt class="refentry literal"><span class="pre">min_element</span></tt></a></li>
<li><a class="refentry reference" href="./minus.html"><tt class="refentry literal"><span class="pre">minus</span></tt></a></li>
<li><a class="refentry reference" href="./modulus.html"><tt class="refentry literal"><span class="pre">modulus</span></tt></a></li>
<li><a class="refentry reference" href="./negate.html"><tt class="refentry literal"><span class="pre">negate</span></tt></a></li>
<li><a class="refentry reference" href="./next.html"><tt class="refentry literal"><span class="pre">next</span></tt></a></li>
<li><a class="refentry reference" href="./not.html"><tt class="refentry literal"><span class="pre">not_</span></tt></a></li>
<li><a class="refentry reference" href="./not-equal-to.html"><tt class="refentry literal"><span class="pre">not_equal_to</span></tt></a></li>
<li><a class="refentry reference" href="./numeric-cast.html"><tt class="refentry literal"><span class="pre">numeric_cast</span></tt></a></li>
<li><a class="refentry reference" href="./or.html"><tt class="refentry literal"><span class="pre">or_</span></tt></a></li>
<li><a class="refentry reference" href="./order.html"><tt class="refentry literal"><span class="pre">order</span></tt></a></li>
<li><a class="refentry reference" href="./pair.html"><tt class="refentry literal"><span class="pre">pair</span></tt></a></li>
<li><a class="refentry reference" href="./partition.html"><tt class="refentry literal"><span class="pre">partition</span></tt></a></li>
<li><a class="refentry reference" href="./plus.html"><tt class="refentry literal"><span class="pre">plus</span></tt></a></li>
<li><a class="refentry reference" href="./pop-back.html"><tt class="refentry literal"><span class="pre">pop_back</span></tt></a></li>
<li><a class="refentry reference" href="./pop-front.html"><tt class="refentry literal"><span class="pre">pop_front</span></tt></a></li>
<li><a class="refentry reference" href="./prior.html"><tt class="refentry literal"><span class="pre">prior</span></tt></a></li>
<li><a class="refentry reference" href="./protect.html"><tt class="refentry literal"><span class="pre">protect</span></tt></a></li>
<li><a class="refentry reference" href="./push-back.html"><tt class="refentry literal"><span class="pre">push_back</span></tt></a></li>
<li><a class="refentry reference" href="./push-front.html"><tt class="refentry literal"><span class="pre">push_front</span></tt></a></li>
<li><a class="refentry reference" href="./quote.html"><tt class="refentry literal"><span class="pre">quote</span></tt></a></li>
<li><a class="refentry reference" href="./range-c.html"><tt class="refentry literal"><span class="pre">range_c</span></tt></a></li>
<li><a class="refentry reference" href="./remove.html"><tt class="refentry literal"><span class="pre">remove</span></tt></a></li>
<li><a class="refentry reference" href="./remove-if.html"><tt class="refentry literal"><span class="pre">remove_if</span></tt></a></li>
<li><a class="refentry reference" href="./replace.html"><tt class="refentry literal"><span class="pre">replace</span></tt></a></li>
<li><a class="refentry reference" href="./replace-if.html"><tt class="refentry literal"><span class="pre">replace_if</span></tt></a></li>
<li><a class="refentry reference" href="./reverse.html"><tt class="refentry literal"><span class="pre">reverse</span></tt></a></li>
<li><a class="refentry reference" href="./reverse-copy.html"><tt class="refentry literal"><span class="pre">reverse_copy</span></tt></a></li>
<li><a class="refentry reference" href="./reverse-copy-if.html"><tt class="refentry literal"><span class="pre">reverse_copy_if</span></tt></a></li>
<li><a class="refentry reference" href="./reverse-fold.html"><tt class="refentry literal"><span class="pre">reverse_fold</span></tt></a></li>
<li><a class="refentry reference" href="./reverse-iter-fold.html"><tt class="refentry literal"><span class="pre">reverse_iter_fold</span></tt></a></li>
<li><a class="refentry reference" href="./reverse-partition.html"><tt class="refentry literal"><span class="pre">reverse_partition</span></tt></a></li>
<li><a class="refentry reference" href="./reverse-remove.html"><tt class="refentry literal"><span class="pre">reverse_remove</span></tt></a></li>
<li><a class="refentry reference" href="./reverse-remove-if.html"><tt class="refentry literal"><span class="pre">reverse_remove_if</span></tt></a></li>
<li><a class="refentry reference" href="./reverse-replace.html"><tt class="refentry literal"><span class="pre">reverse_replace</span></tt></a></li>
<li><a class="refentry reference" href="./reverse-replace-if.html"><tt class="refentry literal"><span class="pre">reverse_replace_if</span></tt></a></li>
<li><a class="refentry reference" href="./reverse-stable-partition.html"><tt class="refentry literal"><span class="pre">reverse_stable_partition</span></tt></a></li>
<li><a class="refentry reference" href="./reverse-transform.html"><tt class="refentry literal"><span class="pre">reverse_transform</span></tt></a></li>
<li><a class="refentry reference" href="./reverse-unique.html"><tt class="refentry literal"><span class="pre">reverse_unique</span></tt></a></li>
<li><a class="refentry reference" href="./sequence-tag.html"><tt class="refentry literal"><span class="pre">sequence_tag</span></tt></a></li>
<li><a class="refentry reference" href="./set.html"><tt class="refentry literal"><span class="pre">set</span></tt></a></li>
<li><a class="refentry reference" href="./set-c.html"><tt class="refentry literal"><span class="pre">set_c</span></tt></a></li>
<li><a class="refentry reference" href="./shift-left.html"><tt class="refentry literal"><span class="pre">shift_left</span></tt></a></li>
<li><a class="refentry reference" href="./shift-right.html"><tt class="refentry literal"><span class="pre">shift_right</span></tt></a></li>
<li><a class="refentry reference" href="./single-view.html"><tt class="refentry literal"><span class="pre">single_view</span></tt></a></li>
<li><a class="refentry reference" href="./size.html"><tt class="refentry literal"><span class="pre">size</span></tt></a></li>
<li><a class="refentry reference" href="./size-t.html"><tt class="refentry literal"><span class="pre">size_t</span></tt></a></li>
<li><a class="refentry reference" href="./sizeof.html"><tt class="refentry literal"><span class="pre">sizeof_</span></tt></a></li>
<li><a class="refentry reference" href="./sort.html"><tt class="refentry literal"><span class="pre">sort</span></tt></a></li>
<li><a class="refentry reference" href="./stable-partition.html"><tt class="refentry literal"><span class="pre">stable_partition</span></tt></a></li>
<li><a class="refentry reference" href="./times.html"><tt class="refentry literal"><span class="pre">times</span></tt></a></li>
<li><a class="refentry reference" href="./transform.html"><tt class="refentry literal"><span class="pre">transform</span></tt></a></li>
<li><a class="refentry reference" href="./transform-view.html"><tt class="refentry literal"><span class="pre">transform_view</span></tt></a></li>
<li><a class="refentry reference" href="./unique.html"><tt class="refentry literal"><span class="pre">unique</span></tt></a></li>
<li><a class="refentry reference" href="./unpack-args.html"><tt class="refentry literal"><span class="pre">unpack_args</span></tt></a></li>
<li><a class="refentry reference" href="./upper-bound.html"><tt class="refentry literal"><span class="pre">upper_bound</span></tt></a></li>
<li><a class="refentry reference" href="./value-type.html"><tt class="refentry literal"><span class="pre">value_type</span></tt></a></li>
<li><a class="refentry reference" href="./vector.html"><tt class="refentry literal"><span class="pre">vector</span></tt></a></li>
<li><a class="refentry reference" href="./vector-c.html"><tt class="refentry literal"><span class="pre">vector_c</span></tt></a></li>
<li><a class="refentry reference" href="./void.html"><tt class="refentry literal"><span class="pre">void_</span></tt></a></li>
<li><a class="refentry reference" href="./zip-view.html"><tt class="refentry literal"><span class="pre">zip_view</span></tt></a></li>
</ul>
<!-- modtime: November 10, 2004 05:07:51 +0000 -->
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./categorized-index-concepts.html" class="navigation-link">Prev</a>&nbsp;<a href="./acknowledgements.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index-concepts.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./categorized-concepts.html" class="navigation-link">Prev</a>&nbsp;<a href="./acknowledgements.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-concepts.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./categorized-index.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
</tr></table></body>
</html>
@@ -1,32 +1,34 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Composition and Argument Binding</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./unpack-args.html" class="navigation-link">Prev</a>&nbsp;<a href="./placeholders.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./invocation.html" class="navigation-link">Back</a>&nbsp;<a href="./arithmetic-operations.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./composition-and-argument-binding.html" class="navigation-link">Composition and Argument Binding</a></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./composition-and-argument.html" class="navigation-link">Composition and Argument Binding</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="composition-and-argument-binding">
<h1><a class="toc-backref" href="./metafunctions.html#id1528">Composition and Argument Binding</a></h1>
<span class="target" id="label-metafunctions-composition-and-argument-binding"></span><!-- Metafunctions/Composition and Argument Binding//_1,_2,..._n |10 -->
<div class="section" id="composition-and-argument">
<h1><a class="toc-backref" href="./metafunctions.html#id454" name="composition-and-argument">Composition and Argument Binding</a></h1>
<a class="target" id="id217" name="id217"></a><!-- modtime: November 07, 2004 18:47:40 +0000 -->
<!-- Metafunctions/Composition and Argument Binding//_1,_2,..._n |10 -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./placeholders.html" id="id1529">Placeholders</a></li>
<li><a class="reference internal" href="./lambda.html" id="id1530">lambda</a></li>
<li><a class="reference internal" href="./bind.html" id="id1531">bind</a></li>
<li><a class="reference internal" href="./quote.html" id="id1532">quote</a></li>
<li><a class="reference internal" href="./arg.html" id="id1533">arg</a></li>
<li><a class="reference internal" href="./protect.html" id="id1534">protect</a></li>
<li><a class="reference" href="./placeholders.html" id="id455" name="id455">Placeholders</a></li>
<li><a class="reference" href="./lambda.html" id="id456" name="id456">lambda</a></li>
<li><a class="reference" href="./bind.html" id="id457" name="id457">bind</a></li>
<li><a class="reference" href="./quote.html" id="id458" name="id458">quote</a></li>
<li><a class="reference" href="./arg.html" id="id459" name="id459">arg</a></li>
<li><a class="reference" href="./protect.html" id="id460" name="id460">protect</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./unpack-args.html" class="navigation-link">Prev</a>&nbsp;<a href="./placeholders.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./invocation.html" class="navigation-link">Back</a>&nbsp;<a href="./arithmetic-operations.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+24 -22
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Concepts</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,15 +15,15 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./concepts.html" class="navigation-link">Concepts</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="concepts">
<h1><a class="toc-backref" href="./sequences.html#id1394">Concepts</a></h1>
<p id="label-sequences-concepts">The taxonomy of sequence concepts in MPL parallels the taxonomy of the MPL
<a class="reference internal" href="./iterators.html">Iterators</a>, with two additional classification dimensions:
<h1><a class="toc-backref" href="./sequences.html#id323" name="concepts">Concepts</a></h1>
<a class="target" id="label-sequences-concepts" name="label-sequences-concepts"></a><p>The taxonomy of sequence concepts in MPL parallels the taxonomy of the MPL
<a class="reference" href="./iterators.html">Iterators</a>, with two additional classification dimensions:
<cite>extensibility</cite> and <cite>associativeness</cite>.</p>
<!-- The latter two are orthogonal to
sequence traversal characteristics, but not to each other, meaning that
a sequence can be characterized as both `Bidirectional`__
and `Back Extensible`__, or `Bidirectional`__ and
`Extensible Associative`__, but not as `Bidirectional`__,
<!-- The latter two are orthogonal to
sequence traversal characteristics, but not to each other, meaning that
a sequence can be characterized as both `Bidirectional`__
and `Back Extensible`__, or `Bidirectional`__ and
`Extensible Associative`__, but not as `Bidirectional`__,
`Back Extensible`__ *and* `Extensible Associative`__.
__ `Bidirectional Sequence`_
@@ -35,24 +38,23 @@ __ `Extensible Associative Sequence`_
Two utility concepts, |Variadic Sequence| and |Integral Sequence Wrapper|,
are not applicable in generic contexts, but are used to group together
the common parts of different sequence classes' specifications. -->
<!-- modtime: November 05, 2004 05:11:22 +0000 -->
<!-- Sequences/Concepts//Forward Sequence |10 -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./forward-sequence.html" id="id1395">Forward Sequence</a></li>
<li><a class="reference internal" href="./bidirectional-sequence.html" id="id1396">Bidirectional Sequence</a></li>
<li><a class="reference internal" href="./random-access-sequence.html" id="id1397">Random Access Sequence</a></li>
<li><a class="reference internal" href="./extensible-sequence.html" id="id1398">Extensible Sequence</a></li>
<li><a class="reference internal" href="./front-extensible-sequence.html" id="id1399">Front Extensible Sequence</a></li>
<li><a class="reference internal" href="./back-extensible-sequence.html" id="id1400">Back Extensible Sequence</a></li>
<li><a class="reference internal" href="./associative-sequence.html" id="id1401">Associative Sequence</a></li>
<li><a class="reference internal" href="./extensible-associative-sequence.html" id="id1402">Extensible Associative Sequence</a></li>
<li><a class="reference internal" href="./integral-sequence-wrapper.html" id="id1403">Integral Sequence Wrapper</a></li>
<li><a class="reference internal" href="./variadic-sequence.html" id="id1404">Variadic Sequence</a></li>
<li><a class="reference" href="./forward-sequence.html" id="id324" name="id324">Forward Sequence</a></li>
<li><a class="reference" href="./bidirectional-sequence.html" id="id325" name="id325">Bidirectional Sequence</a></li>
<li><a class="reference" href="./random-access-sequence.html" id="id326" name="id326">Random Access Sequence</a></li>
<li><a class="reference" href="./extensible-sequence.html" id="id327" name="id327">Extensible Sequence</a></li>
<li><a class="reference" href="./front-extensible-sequence.html" id="id328" name="id328">Front Extensible Sequence</a></li>
<li><a class="reference" href="./back-extensible-sequence.html" id="id329" name="id329">Back Extensible Sequence</a></li>
<li><a class="reference" href="./associative-sequence.html" id="id330" name="id330">Associative Sequence</a></li>
<li><a class="reference" href="./extensible-associative.html" id="id331" name="id331">Extensible Associative Sequence</a></li>
<li><a class="reference" href="./integral-sequence-wrapper.html" id="id332" name="id332">Integral Sequence Wrapper</a></li>
<li><a class="reference" href="./variadic-sequence.html" id="id333" name="id333">Variadic Sequence</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./sequences.html" class="navigation-link">Prev</a>&nbsp;<a href="./forward-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./classes.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./sequences.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+18 -18
View File
@@ -1,36 +1,36 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Configuration</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-xxx-trait-named-def.html" class="navigation-link">Prev</a>&nbsp;<a href="./cfg-no-preprocessed-headers.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Back</a>&nbsp;<a href="./broken-compiler-workarounds.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./macros.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-xxx-trait-named-def.html" class="navigation-link">Prev</a>&nbsp;<a href="./cfg-no-preprocessed.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Back</a>&nbsp;<a href="./broken-compiler.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./macros.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./configuration.html" class="navigation-link">Configuration</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="configuration">
<h1><a class="toc-backref" href="./macros.html#id1597">Configuration</a></h1>
<span class="target" id="label-macros-configuration"></span><!-- Macros/Configuration//BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS |10 -->
<h1><a class="toc-backref" href="./macros.html#id518" name="configuration">Configuration</a></h1>
<a class="target" id="id293" name="id293"></a><!-- modtime: November 04, 2004 12:12:12 +0000 -->
<!-- Macros/Configuration//BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS |10 -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./cfg-no-preprocessed-headers.html" id="id1598">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a></li>
<li><a class="reference internal" href="./cfg-no-has-xxx.html" id="id1599">BOOST_MPL_CFG_NO_HAS_XXX</a></li>
<li><a class="reference internal" href="./cfg-no-has-xxx-template.html" id="id1600">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a></li>
<li><a class="reference internal" href="./limit-metafunction-arity.html" id="id1601">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</a></li>
<li><a class="reference internal" href="./limit-vector-size.html" id="id1602">BOOST_MPL_LIMIT_VECTOR_SIZE</a></li>
<li><a class="reference internal" href="./limit-list-size.html" id="id1603">BOOST_MPL_LIMIT_LIST_SIZE</a></li>
<li><a class="reference internal" href="./limit-set-size.html" id="id1604">BOOST_MPL_LIMIT_SET_SIZE</a></li>
<li><a class="reference internal" href="./limit-map-size.html" id="id1605">BOOST_MPL_LIMIT_MAP_SIZE</a></li>
<li><a class="reference internal" href="./limit-string-size.html" id="id1606">BOOST_MPL_LIMIT_STRING_SIZE</a></li>
<li><a class="reference internal" href="./limit-unrolling.html" id="id1607">BOOST_MPL_LIMIT_UNROLLING</a></li>
<li><a class="reference" href="./cfg-no-preprocessed.html" id="id519" name="id519">BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS</a></li>
<li><a class="reference" href="./cfg-no-has-xxx.html" id="id520" name="id520">BOOST_MPL_CFG_NO_HAS_XXX</a></li>
<li><a class="reference" href="./limit-metafunction-arity.html" id="id521" name="id521">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</a></li>
<li><a class="reference" href="./limit-vector-size.html" id="id522" name="id522">BOOST_MPL_LIMIT_VECTOR_SIZE</a></li>
<li><a class="reference" href="./limit-list-size.html" id="id523" name="id523">BOOST_MPL_LIMIT_LIST_SIZE</a></li>
<li><a class="reference" href="./limit-set-size.html" id="id524" name="id524">BOOST_MPL_LIMIT_SET_SIZE</a></li>
<li><a class="reference" href="./limit-map-size.html" id="id525" name="id525">BOOST_MPL_LIMIT_MAP_SIZE</a></li>
<li><a class="reference" href="./limit-unrolling.html" id="id526" name="id526">BOOST_MPL_LIMIT_UNROLLING</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-xxx-trait-named-def.html" class="navigation-link">Prev</a>&nbsp;<a href="./cfg-no-preprocessed-headers.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Back</a>&nbsp;<a href="./broken-compiler-workarounds.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./macros.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-xxx-trait-named-def.html" class="navigation-link">Prev</a>&nbsp;<a href="./cfg-no-preprocessed.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Back</a>&nbsp;<a href="./broken-compiler.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./macros.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
</tr></table></body>
</html>
+26 -25
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: contains</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./querying-algorithms.html" class="navigation-link">Querying Algorithms</a> / <a href="./contains.html" class="navigation-link">contains</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="contains">
<h1><a class="toc-backref" href="./querying-algorithms.html#id1477">contains</a></h1>
<div class="section" id="id551">
<h1><a class="toc-backref" href="./querying-algorithms.html#id405" name="contains">contains</a></h1>
<div class="section" id="contains-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -26,34 +29,34 @@ struct <a href="./contains.html" class="identifier">contains</a>
};
</pre>
</div>
<div class="section" id="id552">
<div class="section" id="contains-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns a true-valued <a class="reference internal" href="./integral-constant.html">Integral Constant</a> if one or more elements in <tt class="literal"><span class="pre">Sequence</span></tt>
<p>Returns a true-valued <a class="reference" href="./integral-constant.html">Integral Constant</a> if one or more elements in <tt class="literal"><span class="pre">Sequence</span></tt>
are identical to <tt class="literal"><span class="pre">T</span></tt>.</p>
</div>
<div class="section" id="id553">
<div class="section" id="contains-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/contains.hpp" class="header">boost/mpl/contains.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id554">
<div class="section" id="contains-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="19%" />
<col width="35%" />
<col width="45%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td><a class="reference" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to be examined.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">T</span></tt></td>
@@ -63,22 +66,21 @@ are identical to <tt class="literal"><span class="pre">T</span></tt>.</p>
</tbody>
</table>
</div>
<div class="section" id="id555">
<div class="section" id="contains-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> and arbitrary type <tt class="literal"><span class="pre">t</span></tt>:</p>
<p>For any <a class="reference" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> and arbitrary type <tt class="literal"><span class="pre">t</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./contains.html" class="identifier">contains</a>&lt;s,t&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./not.html" class="identifier">not_</a>&lt; is_same&lt;
typedef <a href="./not.html" class="identifier">not_</a>&lt; is_same&lt;
<a href="./find.html" class="identifier">find</a>&lt;s,t&gt;::type
, <a href="./end.html" class="identifier">end</a>&lt;s&gt;::type
&gt; &gt;::type r;
@@ -88,27 +90,26 @@ typedef <a href="./not.html" class="identifier">not_</a>&lt; is_same&lt;
</tbody>
</table>
</div>
<div class="section" id="id556">
<div class="section" id="contains-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. At most <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> comparisons for identity.</p>
</div>
<div class="section" id="id557">
<div class="section" id="contains-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;char,int,unsigned,long,unsigned long&gt; types;
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./contains.html" class="identifier">contains</a>&lt;types,bool&gt; ));
</pre>
</div>
<div class="section" id="id558">
<div class="section" id="contains-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./querying-algorithms.html">Querying Algorithms</a>, <a class="reference internal" href="./find.html">find</a>, <a class="reference internal" href="./find-if.html">find_if</a>, <a class="reference internal" href="./count.html">count</a>, <a class="reference internal" href="./lower-bound.html">lower_bound</a></p>
<p><a class="reference" href="./querying-algorithms.html">Querying Algorithms</a>, <a class="refentry reference" href="./find.html"><tt class="refentry literal"><span class="pre">find</span></tt></a>, <a class="refentry reference" href="./find-if.html"><tt class="refentry literal"><span class="pre">find_if</span></tt></a>, <a class="refentry reference" href="./count.html"><tt class="refentry literal"><span class="pre">count</span></tt></a>, <a class="refentry reference" href="./lower-bound.html"><tt class="refentry literal"><span class="pre">lower_bound</span></tt></a></p>
<!-- modtime: November 13, 2004 01:52:38 +0000 -->
<!-- Algorithms/Querying Algorithms//count |40 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./find-if.html" class="navigation-link">Prev</a>&nbsp;<a href="./count.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./find-if.html" class="navigation-link">Back</a>&nbsp;<a href="./count.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+39 -38
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: copy_if</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./transformation-algorithms.html" class="navigation-link">Transformation Algorithms</a> / <a href="./copy-if.html" class="navigation-link">copy_if</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="copy-if">
<h1><a class="toc-backref" href="./transformation-algorithms.html#id1487">copy_if</a></h1>
<div class="section" id="id624">
<h1><a class="toc-backref" href="./transformation-algorithms.html#id415" name="copy-if">copy_if</a></h1>
<div class="section" id="transformation-copy-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -27,69 +30,68 @@ struct <a href="./copy-if.html" class="identifier">copy_if</a>
};
</pre>
</div>
<div class="section" id="id625">
<div class="section" id="transformation-copy-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns a filtered copy of the original sequence containing the elements that satisfy
<p>Returns a filtered copy of the original sequence containing the elements that satisfy
the predicate <tt class="literal"><span class="pre">Pred</span></tt>.</p>
<p>[<em>Note:</em> This wording applies to a no-inserter version(s) of the algorithm. See the
<cite>Expression semantics</cite> subsection for a precise specification of the algorithm's
<p>[<em>Note:</em> This wording applies to a no-inserter version(s) of the algorithm. See the
<cite>Expression semantics</cite> subsection for a precise specification of the algorithm's
details in all cases — <em>end note</em>]</p>
</div>
<div class="section" id="id626">
<div class="section" id="transformation-copy-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/copy_if.hpp" class="header">boost/mpl/copy_if.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id627">
<div class="section" id="transformation-copy-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a></p>
<p><a class="reference" href="./reversible-algorithm.html">Reversible Algorithm</a></p>
</div>
<div class="section" id="id628">
<div class="section" id="transformation-copy-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="19%" />
<col width="40%" />
<col width="40%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td><a class="reference" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to copy.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Pred</span></tt></td>
<td>Unary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td>Unary <a class="reference" href="./lambda-expression.html">Lambda Expression</a></td>
<td>A copying condition.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">In</span></tt></td>
<td><a class="reference internal" href="./inserter.html">Inserter</a></td>
<td><a class="reference" href="./inserter.html">Inserter</a></td>
<td>An inserter.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id629">
<div class="section" id="transformation-copy-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a>.</p>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, an unary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">pred</span></tt>, and
an <a class="reference internal" href="./inserter.html">Inserter</a> <tt class="literal"><span class="pre">in</span></tt>:</p>
where they differ from, or are not defined in <a class="reference" href="./reversible-algorithm.html">Reversible Algorithm</a>.</p>
<p>For any <a class="reference" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, an unary <a class="reference" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">pred</span></tt>, and
an <a class="reference" href="./inserter.html">Inserter</a> <tt class="literal"><span class="pre">in</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./copy-if.html" class="identifier">copy_if</a>&lt;s,pred,in&gt;::type r;
typedef <a href="./copy-if.html" class="identifier">copy_if</a>&lt;s,pred,in&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">A type.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -100,9 +102,9 @@ typedef <a href="./fold.html" class="identifier">fold</a>&lt;
s
, in::state
, <a href="./eval-if.html" class="identifier">eval_if</a>&lt;
<a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">1</span></tt>&lt;p,<a href="./placeholders.html" class="identifier">_2</a>&gt;
, <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">2</span></tt>&lt;op,<a href="./placeholders.html" class="identifier">_1</a>,<a href="./placeholders.html" class="identifier">_2</a>&gt;
, <a href="./identity.html" class="identifier">identity</a>&lt;<a href="./placeholders.html" class="identifier">_1</a>&gt;
<a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">1</span></tt>&lt;p,_2&gt;
, <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">2</span></tt>&lt;op,_1,_2&gt;
, <a href="./identity.html" class="identifier">identity</a>&lt;_1&gt;
&gt;
&gt;::type r;
</pre>
@@ -111,17 +113,17 @@ typedef <a href="./fold.html" class="identifier">fold</a>&lt;
</tbody>
</table>
</div>
<div class="section" id="id630">
<div class="section" id="transformation-copy-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. Exactly <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> applications of <tt class="literal"><span class="pre">pred</span></tt>, and at
<p>Linear. Exactly <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> applications of <tt class="literal"><span class="pre">pred</span></tt>, and at
most <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> applications of <tt class="literal"><span class="pre">in::operation</span></tt>.</p>
</div>
<div class="section" id="id631">
<div class="section" id="transformation-copy-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./copy-if.html" class="identifier">copy_if</a>&lt;
<a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,10&gt;
, <a href="./less.html" class="identifier">less</a>&lt; <a href="./placeholders.html" class="identifier">_1</a>, <a href="./int.html" class="identifier">int_</a>&lt;5&gt; &gt;
, <a href="./less.html" class="identifier">less</a>&lt; _1, <a href="./int.html" class="identifier">int_</a>&lt;5&gt; &gt;
, <a href="./back-inserter.html" class="identifier">back_inserter</a>&lt; <a href="./vector.html" class="identifier">vector</a>&lt;&gt; &gt;
&gt;::type result;
@@ -129,16 +131,15 @@ typedef <a href="./copy-if.html" class="identifier">copy_if</a>&lt;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./equal.html" class="identifier">equal</a>&lt;result,<a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,5&gt; > ));
</pre>
</div>
<div class="section" id="id632">
<div class="section" id="transformation-copy-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./transformation-algorithms.html">Transformation Algorithms</a>, <a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a>, <a class="reference internal" href="./reverse-copy-if.html">reverse_copy_if</a>, <a class="reference internal" href="./copy.html">copy</a>, <a class="reference internal" href="./remove-if.html">remove_if</a>, <a class="reference internal" href="./replace-if.html">replace_if</a></p>
<p><a class="reference" href="./transformation-algorithms.html">Transformation Algorithms</a>, <a class="reference" href="./reversible-algorithm.html">Reversible Algorithm</a>, <a class="refentry reference" href="./reverse-copy-if.html"><tt class="refentry literal"><span class="pre">reverse_copy_if</span></tt></a>, <a class="refentry reference" href="./copy.html"><tt class="refentry literal"><span class="pre">copy</span></tt></a>, <a class="refentry reference" href="./remove-if.html"><tt class="refentry literal"><span class="pre">remove_if</span></tt></a>, <a class="refentry reference" href="./replace-if.html"><tt class="refentry literal"><span class="pre">replace_if</span></tt></a></p>
<!-- modtime: November 13, 2004 01:54:56 +0000 -->
<!-- Algorithms/Transformation Algorithms//transform |30 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./copy.html" class="navigation-link">Prev</a>&nbsp;<a href="./transform.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./copy.html" class="navigation-link">Back</a>&nbsp;<a href="./transform.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./transformation-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+31 -30
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: copy</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./transformation-algorithms.html" class="navigation-link">Transformation Algorithms</a> / <a href="./copy.html" class="navigation-link">copy</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="copy">
<h1><a class="toc-backref" href="./transformation-algorithms.html#id1486">copy</a></h1>
<div class="section" id="id615">
<h1><a class="toc-backref" href="./transformation-algorithms.html#id414" name="copy">copy</a></h1>
<div class="section" id="copy-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -26,63 +29,62 @@ struct <a href="./copy.html" class="identifier">copy</a>
};
</pre>
</div>
<div class="section" id="id616">
<div class="section" id="copy-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns a copy of the original sequence.</p>
<p>[<em>Note:</em> This wording applies to a no-inserter version(s) of the algorithm. See the
<cite>Expression semantics</cite> subsection for a precise specification of the algorithm's
<p>[<em>Note:</em> This wording applies to a no-inserter version(s) of the algorithm. See the
<cite>Expression semantics</cite> subsection for a precise specification of the algorithm's
details in all cases — <em>end note</em>]</p>
</div>
<div class="section" id="id617">
<div class="section" id="copy-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/copy.hpp" class="header">boost/mpl/copy.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id618">
<div class="section" id="copy-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a></p>
<p><a class="reference" href="./reversible-algorithm.html">Reversible Algorithm</a></p>
</div>
<div class="section" id="id619">
<div class="section" id="copy-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="21%" />
<col width="37%" />
<col width="42%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td><a class="reference" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to copy.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">In</span></tt></td>
<td><a class="reference internal" href="./inserter.html">Inserter</a></td>
<td><a class="reference" href="./inserter.html">Inserter</a></td>
<td>An inserter.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id620">
<div class="section" id="copy-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a>.</p>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and an <a class="reference internal" href="./inserter.html">Inserter</a> <tt class="literal"><span class="pre">in</span></tt>:</p>
where they differ from, or are not defined in <a class="reference" href="./reversible-algorithm.html">Reversible Algorithm</a>.</p>
<p>For any <a class="reference" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and an <a class="reference" href="./inserter.html">Inserter</a> <tt class="literal"><span class="pre">in</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./copy.html" class="identifier">copy</a>&lt;s,in&gt;::type r;
typedef <a href="./copy.html" class="identifier">copy</a>&lt;s,in&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">A type.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -93,11 +95,11 @@ typedef <a href="./fold.html" class="identifier">fold</a>&lt; s,in::state,in::op
</tbody>
</table>
</div>
<div class="section" id="id621">
<div class="section" id="copy-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. Exactly <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> applications of <tt class="literal"><span class="pre">in::operation</span></tt>.</p>
</div>
<div class="section" id="id622">
<div class="section" id="copy-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector-c.html" class="identifier">vector_c</a>&lt;int,0,1,2,3,4,5,6,7,8,9&gt; numbers;
@@ -110,16 +112,15 @@ typedef <a href="./copy.html" class="identifier">copy</a>&lt;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./equal.html" class="identifier">equal</a>&lt; result,<a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,20&gt; > ));
</pre>
</div>
<div class="section" id="id623">
<div class="section" id="copy-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./transformation-algorithms.html">Transformation Algorithms</a>, <a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a>, <a class="reference internal" href="./reverse-copy.html">reverse_copy</a>, <a class="reference internal" href="./copy-if.html">copy_if</a>, <a class="reference internal" href="./transform.html">transform</a></p>
<p><a class="reference" href="./transformation-algorithms.html">Transformation Algorithms</a>, <a class="reference" href="./reversible-algorithm.html">Reversible Algorithm</a>, <a class="refentry reference" href="./reverse-copy.html"><tt class="refentry literal"><span class="pre">reverse_copy</span></tt></a>, <a class="refentry reference" href="./copy-if.html"><tt class="refentry literal"><span class="pre">copy_if</span></tt></a>, <a class="refentry reference" href="./transform.html"><tt class="refentry literal"><span class="pre">transform</span></tt></a></p>
<!-- modtime: November 13, 2004 01:54:21 +0000 -->
<!-- Algorithms/Transformation Algorithms//copy_if |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./transformation-algorithms.html" class="navigation-link">Prev</a>&nbsp;<a href="./copy-if.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./copy-if.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./transformation-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+29 -28
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: count_if</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./querying-algorithms.html" class="navigation-link">Querying Algorithms</a> / <a href="./count-if.html" class="navigation-link">count_if</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="count-if">
<h1><a class="toc-backref" href="./querying-algorithms.html#id1479">count_if</a></h1>
<div class="section" id="id567">
<h1><a class="toc-backref" href="./querying-algorithms.html#id407" name="count-if">count_if</a></h1>
<div class="section" id="querying-count-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -26,62 +29,61 @@ struct <a href="./count-if.html" class="identifier">count_if</a>
};
</pre>
</div>
<div class="section" id="id568">
<div class="section" id="querying-count-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the number of elements in <tt class="literal"><span class="pre">Sequence</span></tt> that satisfy the predicate <tt class="literal"><span class="pre">Pred</span></tt>.</p>
</div>
<div class="section" id="id569">
<div class="section" id="querying-count-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/count_if.hpp" class="header">boost/mpl/count_if.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id570">
<div class="section" id="querying-count-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="19%" />
<col width="38%" />
<col width="43%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td><a class="reference" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to be examined.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Pred</span></tt></td>
<td>Unary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td>Unary <a class="reference" href="./lambda-expression.html">Lambda Expression</a></td>
<td>A count condition.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id571">
<div class="section" id="querying-count-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> and unary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">pred</span></tt>:</p>
<p>For any <a class="reference" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> and unary <a class="reference" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">pred</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./count-if.html" class="identifier">count_if</a>&lt;s,pred&gt;::type n;
typedef <a href="./count-if.html" class="identifier">count_if</a>&lt;s,pred&gt;::type n;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./lambda.html" class="identifier">lambda</a>&lt;pred&gt;::type p;
typedef <a href="./fold.html" class="identifier">fold</a>&lt;
typedef <a href="./fold.html" class="identifier">fold</a>&lt;
s
, <a href="./long.html" class="identifier">long_</a>&lt;0&gt;
, <a href="./if.html" class="identifier">if_</a>&lt; <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">1</span></tt>&lt;p,<a href="./placeholders.html" class="identifier">_2</a>&gt;, <a href="./next.html" class="identifier">next</a>&lt;<a href="./placeholders.html" class="identifier">_1</a>&gt;, <a href="./placeholders.html" class="identifier">_1</a> &gt;
, <a href="./if.html" class="identifier">if_</a>&lt; <a href="./apply-wrap.html" class="identifier">apply_wrap</a><tt class="literal"><span class="pre">1</span></tt>&lt;p,_2&gt;, <a href="./next.html" class="identifier">next</a>&lt;_1&gt;, _1 &gt;
&gt;::type n;
</pre>
</td>
@@ -89,30 +91,29 @@ typedef <a href="./fold.html" class="identifier">fold</a>&lt;
</tbody>
</table>
</div>
<div class="section" id="id572">
<div class="section" id="querying-count-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. Exactly <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> applications of <tt class="literal"><span class="pre">pred</span></tt>.</p>
</div>
<div class="section" id="id573">
<div class="section" id="querying-count-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;int,char,long,short,char,long,double,long&gt; types;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./count-if.html" class="identifier">count_if</a>&lt; types, is_float&lt;_&gt; &gt;::value), ==, 1 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./count-if.html" class="identifier">count_if</a>&lt; types, is_same&lt;_,char&gt; &gt;::value), ==, 2 );
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./count-if.html" class="identifier">count_if</a>&lt; types, is_same&lt;_,void&gt; &gt;::value), ==, 0 );
</pre>
</div>
<div class="section" id="id574">
<div class="section" id="querying-count-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./querying-algorithms.html">Querying Algorithms</a>, <a class="reference internal" href="./count.html">count</a>, <a class="reference internal" href="./find.html">find</a>, <a class="reference internal" href="./find-if.html">find_if</a>, <a class="reference internal" href="./contains.html">contains</a></p>
<p><a class="reference" href="./querying-algorithms.html">Querying Algorithms</a>, <a class="refentry reference" href="./count.html"><tt class="refentry literal"><span class="pre">count</span></tt></a>, <a class="refentry reference" href="./find.html"><tt class="refentry literal"><span class="pre">find</span></tt></a>, <a class="refentry reference" href="./find-if.html"><tt class="refentry literal"><span class="pre">find_if</span></tt></a>, <a class="refentry reference" href="./contains.html"><tt class="refentry literal"><span class="pre">contains</span></tt></a></p>
<!-- modtime: November 10, 2004 04:43:18 +0000 -->
<!-- Algorithms/Querying Algorithms//lower_bound |60 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./count.html" class="navigation-link">Prev</a>&nbsp;<a href="./lower-bound.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./count.html" class="navigation-link">Back</a>&nbsp;<a href="./lower-bound.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+24 -23
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: count</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./querying-algorithms.html" class="navigation-link">Querying Algorithms</a> / <a href="./count.html" class="navigation-link">count</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="count">
<h1><a class="toc-backref" href="./querying-algorithms.html#id1478">count</a></h1>
<div class="section" id="id559">
<h1><a class="toc-backref" href="./querying-algorithms.html#id406" name="count">count</a></h1>
<div class="section" id="count-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -26,33 +29,33 @@ struct <a href="./count.html" class="identifier">count</a>
};
</pre>
</div>
<div class="section" id="id560">
<div class="section" id="count-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the number of elements in a <tt class="literal"><span class="pre">Sequence</span></tt> that are identical to <tt class="literal"><span class="pre">T</span></tt>.</p>
</div>
<div class="section" id="id561">
<div class="section" id="count-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/count.hpp" class="header">boost/mpl/count.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id562">
<div class="section" id="count-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="19%" />
<col width="35%" />
<col width="45%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td><a class="reference" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to be examined.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">T</span></tt></td>
@@ -62,18 +65,17 @@ struct <a href="./count.html" class="identifier">count</a>
</tbody>
</table>
</div>
<div class="section" id="id563">
<div class="section" id="count-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> and arbitrary type <tt class="literal"><span class="pre">t</span></tt>:</p>
<p>For any <a class="reference" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> and arbitrary type <tt class="literal"><span class="pre">t</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./count.html" class="identifier">count</a>&lt;s,t&gt;::type n;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -84,11 +86,11 @@ typedef <a href="./count-if.html" class="identifier">count_if</a>&lt; s,is_same&
</tbody>
</table>
</div>
<div class="section" id="id564">
<div class="section" id="count-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. Exactly <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> comparisons for identity.</p>
</div>
<div class="section" id="id565">
<div class="section" id="count-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;int,char,long,short,char,short,double,long&gt; types;
@@ -97,16 +99,15 @@ typedef <a href="./count.html" class="identifier">count</a>&lt;types, short&gt;:
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( n::value, ==, 2 );
</pre>
</div>
<div class="section" id="id566">
<div class="section" id="count-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./querying-algorithms.html">Querying Algorithms</a>, <a class="reference internal" href="./count-if.html">count_if</a>, <a class="reference internal" href="./find.html">find</a>, <a class="reference internal" href="./find-if.html">find_if</a>, <a class="reference internal" href="./contains.html">contains</a>, <a class="reference internal" href="./lower-bound.html">lower_bound</a></p>
<p><a class="reference" href="./querying-algorithms.html">Querying Algorithms</a>, <a class="refentry reference" href="./count-if.html"><tt class="refentry literal"><span class="pre">count_if</span></tt></a>, <a class="refentry reference" href="./find.html"><tt class="refentry literal"><span class="pre">find</span></tt></a>, <a class="refentry reference" href="./find-if.html"><tt class="refentry literal"><span class="pre">find_if</span></tt></a>, <a class="refentry reference" href="./contains.html"><tt class="refentry literal"><span class="pre">contains</span></tt></a>, <a class="refentry reference" href="./lower-bound.html"><tt class="refentry literal"><span class="pre">lower_bound</span></tt></a></p>
<!-- modtime: November 13, 2004 01:52:16 +0000 -->
<!-- Algorithms/Querying Algorithms//count_if |50 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./contains.html" class="navigation-link">Prev</a>&nbsp;<a href="./count-if.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./contains.html" class="navigation-link">Back</a>&nbsp;<a href="./count-if.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
@@ -1,27 +1,28 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Concepts</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./data-types.html" class="navigation-link">Prev</a>&nbsp;<a href="./integral-constant.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./numeric.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./data-types.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./data-types.html" class="navigation-link">Data Types</a> / <a href="./data-types-concepts.html" class="navigation-link">Concepts</a></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./data-types.html" class="navigation-link">Data Types</a> / <a href="./data-concepts.html" class="navigation-link">Concepts</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="id1216">
<h1><a class="toc-backref" href="./data-types.html#id1573"><a class="subsection-title" href="#concepts" name="concepts">Concepts</a></a></h1>
<!-- Data Types/Concepts//Integral Constant -->
<div class="section" id="data-concepts">
<h1><a class="toc-backref" href="./data-types.html#id497" name="data-concepts">Concepts</a></h1>
<a class="target" id="label-data-types-concepts" name="label-data-types-concepts"></a><!-- Data Types/Concepts//Integral Constant -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./integral-constant.html" id="id1574">Integral Constant</a></li>
<li><a class="reference" href="./integral-constant.html" id="id498" name="id498">Integral Constant</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./data-types.html" class="navigation-link">Prev</a>&nbsp;<a href="./integral-constant.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./numeric.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./data-types.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+30
View File
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Miscellaneous</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./integral-c.html" class="navigation-link">Prev</a>&nbsp;<a href="./pair.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./numeric.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./data-types.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./data-types.html" class="navigation-link">Data Types</a> / <a href="./data-miscellaneous.html" class="navigation-link">Miscellaneous</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="data-miscellaneous">
<h1><a class="toc-backref" href="./data-types.html#id505" name="data-miscellaneous">Miscellaneous</a></h1>
<a class="target" id="id279" name="id279"></a><!-- Data Types/Miscellaneous//pair |10 -->
<ul class="toc simple" id="outline">
<li><a class="reference" href="./pair.html" id="id506" name="id506">pair</a></li>
<li><a class="reference" href="./empty-base.html" id="id507" name="id507">empty_base</a></li>
<li><a class="reference" href="./void.html" id="id508" name="id508">void_</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./integral-c.html" class="navigation-link">Prev</a>&nbsp;<a href="./pair.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./numeric.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./data-types.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
</tr></table></body>
</html>
@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Miscellaneous</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./char.html" class="navigation-link">Prev</a>&nbsp;<a href="./pair.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./numeric.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./data-types.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./data-types.html" class="navigation-link">Data Types</a> / <a href="./data-types-miscellaneous.html" class="navigation-link">Miscellaneous</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="id1270">
<h1><a class="toc-backref" href="./data-types.html#id1582"><a class="subsection-title" href="#miscellaneous" name="miscellaneous">Miscellaneous</a></a></h1>
<!-- Data Types/Miscellaneous//pair |10 -->
<ul class="toc simple" id="outline">
<li><a class="reference internal" href="./pair.html" id="id1583">pair</a></li>
<li><a class="reference internal" href="./empty-base.html" id="id1584">empty_base</a></li>
<li><a class="reference internal" href="./void.html" id="id1585">void_</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./char.html" class="navigation-link">Prev</a>&nbsp;<a href="./pair.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./numeric.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./data-types.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>
+13 -11
View File
@@ -1,28 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Data Types</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./sizeof.html" class="navigation-link">Prev</a>&nbsp;<a href="./data-types-concepts.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Back</a>&nbsp;<a href="./macros.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="../refmanual.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./sizeof.html" class="navigation-link">Prev</a>&nbsp;<a href="./data-concepts.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Back</a>&nbsp;<a href="./macros.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="../refmanual.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./data-types.html" class="navigation-link">Data Types</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="data-types">
<h1><a class="toc-backref" href="../refmanual.html#id1572">Data Types</a></h1>
<span class="target" id="data"><span id="label-data-types"></span></span><ul class="toc simple" id="outline">
<li><a class="reference internal" href="./data-types-concepts.html" id="id1573">Concepts</a></li>
<li><a class="reference internal" href="./numeric.html" id="id1575">Numeric</a></li>
<li><a class="reference internal" href="./data-types-miscellaneous.html" id="id1582">Miscellaneous</a></li>
<h1><a class="toc-backref" href="../refmanual.html#id496" name="data-types">Data Types</a></h1>
<a class="target" id="label-data-types" name="label-data-types"></a><a class="target" id="data" name="data"></a><!-- modtime: November 08, 2004 09:39:06 +0000 -->
<ul class="toc simple" id="outline">
<li><a class="reference" href="./data-concepts.html" id="id497" name="id497">Concepts</a></li>
<li><a class="reference" href="./numeric.html" id="id499" name="id499">Numeric</a></li>
<li><a class="reference" href="./data-miscellaneous.html" id="id505" name="id505">Miscellaneous</a></li>
</ul>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./sizeof.html" class="navigation-link">Prev</a>&nbsp;<a href="./data-types-concepts.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Back</a>&nbsp;<a href="./macros.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="../refmanual.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./sizeof.html" class="navigation-link">Prev</a>&nbsp;<a href="./data-concepts.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./metafunctions.html" class="navigation-link">Back</a>&nbsp;<a href="./macros.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="../refmanual.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
</tr></table></body>
</html>
+24 -22
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: deque</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,35 +15,35 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./classes.html" class="navigation-link">Classes</a> / <a href="./deque.html" class="navigation-link">deque</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="deque">
<h1><a class="toc-backref" href="./classes.html#id1408">deque</a></h1>
<div class="section" id="id64">
<h1><a class="toc-backref" href="./classes.html#id337" name="deque">deque</a></h1>
<div class="section" id="deque-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./deque.html" class="identifier">deque</a></span></tt> is a <a class="reference internal" href="./variadic-sequence.html">variadic</a>, <a class="reference internal" href="./random-access-sequence.html">random access</a>, <a class="reference internal" href="./extensible-sequence.html">extensible</a> sequence of types that
supports constant-time insertion and removal of elements at both ends, and
linear-time insertion and removal of elements in the middle. In this implementation
of the library, <tt class="literal"><span class="pre"><a href="./deque.html" class="identifier">deque</a></span></tt> is a synonym for <a class="reference internal" href="./vector.html">vector</a>.</p>
<p><tt class="literal"><span class="pre"><a href="./deque.html" class="identifier">deque</a></span></tt> is a <a class="reference" href="./variadic-sequence.html">variadic</a>, <a class="reference" href="./random-access-sequence.html">random access</a>, <a class="reference" href="./extensible-sequence.html">extensible</a> sequence of types that
supports constant-time insertion and removal of elements at both ends, and
linear-time insertion and removal of elements in the middle. In this implementation
of the library, <tt class="literal"><span class="pre"><a href="./deque.html" class="identifier">deque</a></span></tt> is a synonym for <a class="refentry reference" href="./vector.html"><tt class="refentry literal"><span class="pre">vector</span></tt></a>.</p>
</div>
<div class="section" id="id67">
<div class="section" id="deque-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/deque.hpp" class="header">boost/mpl/deque.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id68">
<div class="section" id="deque-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<ul class="simple">
<li><a class="reference internal" href="./variadic-sequence.html">Variadic Sequence</a></li>
<li><a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a></li>
<li><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></li>
<li><a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a></li>
<li><a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a></li>
<li><a class="reference" href="./variadic-sequence.html">Variadic Sequence</a></li>
<li><a class="reference" href="./random-access-sequence.html">Random Access Sequence</a></li>
<li><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a></li>
<li><a class="reference" href="./back-extensible-sequence.html">Back Extensible Sequence</a></li>
<li><a class="reference" href="./front-extensible-sequence.html">Front Extensible Sequence</a></li>
</ul>
</div>
<div class="section" id="id69">
<div class="section" id="deque-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>See <a class="reference internal" href="./vector.html">vector</a> specification.</p>
<p>See <a class="refentry reference" href="./vector.html"><tt class="refentry literal"><span class="pre">vector</span></tt></a> specification.</p>
</div>
<div class="section" id="id70">
<div class="section" id="deque-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./deque.html" class="identifier">deque</a>&lt;float,double,long double&gt; floats;
@@ -49,16 +52,15 @@ typedef <a href="./push-back.html" class="identifier">push_back</a>&lt;floats,in
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./at-c.html" class="identifier">at_c</a>&lt;types,3&gt;::type, int > ));
</pre>
</div>
<div class="section" id="id71">
<div class="section" id="deque-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./vector.html">vector</a>, <a class="reference internal" href="./list.html">list</a>, <a class="reference internal" href="./set.html">set</a></p>
<p><a class="reference" href="./sequences.html">Sequences</a>, <a class="refentry reference" href="./vector.html"><tt class="refentry literal"><span class="pre">vector</span></tt></a>, <a class="refentry reference" href="./list.html"><tt class="refentry literal"><span class="pre">list</span></tt></a>, <a class="refentry reference" href="./set.html"><tt class="refentry literal"><span class="pre">set</span></tt></a></p>
<!-- modtime: November 15, 2004 01:17:18 +0000 -->
<!-- Sequences/Classes//set |40 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./list.html" class="navigation-link">Prev</a>&nbsp;<a href="./set.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./list.html" class="navigation-link">Back</a>&nbsp;<a href="./set.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./classes.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+27 -27
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: deref</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./iterators.html" class="navigation-link">Iterators</a> / <a href="./iterator-metafunctions.html" class="navigation-link">Iterator Metafunctions</a> / <a href="./deref.html" class="navigation-link">deref</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="deref">
<h1><a class="toc-backref" href="./iterator-metafunctions.html#id1458">deref</a></h1>
<div class="section" id="id437">
<h1><a class="toc-backref" href="./iterator-metafunctions.html#id386" name="deref">deref</a></h1>
<div class="section" id="deref-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -25,56 +28,54 @@ struct <a href="./deref.html" class="identifier">deref</a>
};
</pre>
</div>
<div class="section" id="id438">
<div class="section" id="deref-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Dereferences an iterator.</p>
</div>
<div class="section" id="id439">
<div class="section" id="deref-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/deref.hpp" class="header">boost/mpl/deref.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id440">
<div class="section" id="deref-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="19%" />
<col width="35%" />
<col width="45%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Iterator</span></tt></td>
<td><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></td>
<td><a class="reference" href="./forward-iterator.html">Forward Iterator</a></td>
<td>The iterator to dereference.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id441">
<div class="section" id="deref-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-iterator.html">Forward Iterator</a>s <tt class="literal"><span class="pre">iter</span></tt>:</p>
<p>For any <a class="reference" href="./forward-iterator.html">Forward Iterator</a>s <tt class="literal"><span class="pre">iter</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./deref.html" class="identifier">deref</a>&lt;iter&gt;::type t;
typedef <a href="./deref.html" class="identifier">deref</a>&lt;iter&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">A type.</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">iter</span></tt> is dereferenceable.</p>
</td>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><tt class="literal"><span class="pre">iter</span></tt> is dereferenceable.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">t</span></tt> is identical to the element referenced by <tt class="literal"><span class="pre">iter</span></tt>. If <tt class="literal"><span class="pre">iter</span></tt> is
a user-defined iterator, the library-provided default implementation is
a user-defined iterator, the library-provided default implementation is
equivalent to</p>
<pre class="last literal-block">
typedef iter::type t;
@@ -84,11 +85,11 @@ typedef iter::type t;
</tbody>
</table>
</div>
<div class="section" id="id442">
<div class="section" id="deref-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id443">
<div class="section" id="deref-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;char,short,int,long&gt; types;
@@ -97,16 +98,15 @@ typedef <a href="./begin.html" class="identifier">begin</a>&lt;types&gt;::type i
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./deref.html" class="identifier">deref</a>&lt;iter&gt;::type, char > ));
</pre>
</div>
<div class="section" id="id444">
<div class="section" id="deref-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./iterators.html">Iterators</a>, <a class="reference internal" href="./begin.html">begin</a> / <a class="reference internal" href="./end.html">end</a>, <a class="reference internal" href="./next.html">next</a></p>
<p><a class="reference" href="./iterators.html">Iterators</a>, <a class="refentry reference" href="./begin.html"><tt class="refentry literal"><span class="pre">begin</span></tt></a> / <a class="refentry reference" href="./end.html"><tt class="refentry literal"><span class="pre">end</span></tt></a>, <a class="refentry reference" href="./next.html"><tt class="refentry literal"><span class="pre">next</span></tt></a></p>
<!-- modtime: November 11, 2004 11:17:11 +0000 -->
<!-- Iterators/Iterator Metafunctions//iterator_category |60 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./prior.html" class="navigation-link">Prev</a>&nbsp;<a href="./iterator-category.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./prior.html" class="navigation-link">Back</a>&nbsp;<a href="./iterator-category.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterator-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+34 -35
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: distance</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./iterators.html" class="navigation-link">Iterators</a> / <a href="./iterator-metafunctions.html" class="navigation-link">Iterator Metafunctions</a> / <a href="./distance.html" class="navigation-link">distance</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="distance">
<h1><a class="toc-backref" href="./iterator-metafunctions.html#id1455">distance</a></h1>
<div class="section" id="id412">
<h1><a class="toc-backref" href="./iterator-metafunctions.html#id383" name="distance">distance</a></h1>
<div class="section" id="distance-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -26,84 +29,81 @@ struct <a href="./distance.html" class="identifier">distance</a>
};
</pre>
</div>
<div class="section" id="id413">
<div class="section" id="distance-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the distance between <tt class="literal"><span class="pre">First</span></tt> and <tt class="literal"><span class="pre">Last</span></tt> iterators, that is, an
<a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">n</span></tt> such that <tt class="literal"><span class="pre"><a href="./advance.html" class="identifier">advance</a>&lt;First,n&gt;::type</span></tt> is
<p>Returns the distance between <tt class="literal"><span class="pre">First</span></tt> and <tt class="literal"><span class="pre">Last</span></tt> iterators, that is, an
<a class="reference" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">n</span></tt> such that <tt class="literal"><span class="pre"><a href="./advance.html" class="identifier">advance</a>&lt;First,n&gt;::type</span></tt> is
identical to <tt class="literal"><span class="pre">Last</span></tt>.</p>
</div>
<div class="section" id="id414">
<div class="section" id="distance-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/distance.hpp" class="header">boost/mpl/distance.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id415">
<div class="section" id="distance-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="19%" />
<col width="35%" />
<col width="45%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">First</span></tt>,
<tt class="literal"><span class="pre">Last</span></tt></td>
<td><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></td>
<td><a class="reference" href="./forward-iterator.html">Forward Iterator</a></td>
<td>Iterators to compute a
distance between.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id416">
<div class="section" id="distance-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model Of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
<p><a class="reference" href="./tag-dispatched.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id417">
<div class="section" id="distance-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-iterator.html">Forward Iterator</a>s <tt class="literal"><span class="pre">first</span></tt> and <tt class="literal"><span class="pre">last</span></tt>:</p>
<p>For any <a class="reference" href="./forward-iterator.html">Forward Iterator</a>s <tt class="literal"><span class="pre">first</span></tt> and <tt class="literal"><span class="pre">last</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./distance.html" class="identifier">distance</a>&lt;first,last&gt;::type n;
typedef <a href="./distance.html" class="identifier">distance</a>&lt;first,last&gt;::type n;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first">[<tt class="literal"><span class="pre">first</span></tt>, <tt class="literal"><span class="pre">last</span></tt>) is a valid range.</p>
</td>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body">[<tt class="literal"><span class="pre">first</span></tt>, <tt class="literal"><span class="pre">last</span></tt>) is a valid range.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="literal-block">
<pre class="last literal-block">
typedef <a href="./iter-fold.html" class="identifier">iter_fold</a>&lt;
<a href="./iterator-range.html" class="identifier">iterator_range</a>&lt;first,last&gt;
, <a href="./long.html" class="identifier">long_</a>&lt;0&gt;
, <a href="./next.html" class="identifier">next</a>&lt;<a href="./placeholders.html" class="identifier">_1</a>&gt;
, <a href="./next.html" class="identifier">next</a>&lt;_1&gt;
&gt;::type n;
</pre>
</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><p class="first last"><tt class="literal"><span class="pre">is_same&lt;</span> <span class="pre"><a href="./advance.html" class="identifier">advance</a>&lt;first,n&gt;::type,</span> <span class="pre">last</span> <span class="pre">&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt>.</p>
</td>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><tt class="literal"><span class="pre">is_same&lt;</span> <span class="pre"><a href="./advance.html" class="identifier">advance</a>&lt;first,n&gt;::type,</span> <span class="pre">last</span> <span class="pre">&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id418">
<div class="section" id="distance-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time if <tt class="literal"><span class="pre">first</span></tt> and <tt class="literal"><span class="pre">last</span></tt> are <a class="reference internal" href="./random-access-iterator.html">Random Access Iterator</a>s,
<p>Amortized constant time if <tt class="literal"><span class="pre">first</span></tt> and <tt class="literal"><span class="pre">last</span></tt> are <a class="reference" href="./random-access-iterator.html">Random Access Iterator</a>s,
otherwise linear time.</p>
</div>
<div class="section" id="id419">
<div class="section" id="distance-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,10&gt;::type range;
@@ -113,16 +113,15 @@ typedef <a href="./end.html" class="identifier">end</a>&lt;range&gt;::type last;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( (<a href="./distance.html" class="identifier">distance</a>&lt;first,last&gt;::value), ==, 10);
</pre>
</div>
<div class="section" id="id420">
<div class="section" id="distance-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./iterators.html">Iterators</a>, <a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a>, <a class="reference internal" href="./advance.html">advance</a>, <a class="reference internal" href="./next.html">next</a>, <a class="reference internal" href="./prior.html">prior</a></p>
<p><a class="reference" href="./iterators.html">Iterators</a>, <a class="reference" href="./tag-dispatched.html">Tag Dispatched Metafunction</a>, <a class="refentry reference" href="./advance.html"><tt class="refentry literal"><span class="pre">advance</span></tt></a>, <a class="refentry reference" href="./next.html"><tt class="refentry literal"><span class="pre">next</span></tt></a>, <a class="refentry reference" href="./prior.html"><tt class="refentry literal"><span class="pre">prior</span></tt></a></p>
<!-- modtime: November 11, 2004 11:16:46 +0000 -->
<!-- Iterators/Iterator Metafunctions//next |30 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./advance.html" class="navigation-link">Prev</a>&nbsp;<a href="./next.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./advance.html" class="navigation-link">Back</a>&nbsp;<a href="./next.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterator-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+36 -38
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: divides</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./arithmetic-operations.html" class="navigation-link">Arithmetic Operations</a> / <a href="./divides.html" class="navigation-link">divides</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="divides">
<h1><a class="toc-backref" href="./arithmetic-operations.html#id1539">divides</a></h1>
<div class="section" id="id987">
<h1><a class="toc-backref" href="./arithmetic-operations.html#id465" name="divides">divides</a></h1>
<div class="section" id="divides-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -29,62 +32,60 @@ struct <a href="./divides.html" class="identifier">divides</a>
};
</pre>
</div>
<div class="section" id="id988">
<div class="section" id="divides-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the quotient of its arguments.</p>
</div>
<div class="section" id="id989">
<div class="section" id="divides-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/divides.hpp" class="header">boost/mpl/divides.hpp</a>&gt;
#include &lt;<a href="../../../../boost/mpl/arithmetic.hpp" class="header">boost/mpl/arithmetic.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id990">
<div class="section" id="divides-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
<p><a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
</div>
<div class="section" id="id991">
<div class="section" id="divides-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt>,... <tt class="literal"><span class="pre">Tn</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td><a class="reference" href="./integral-constant.html">Integral Constant</a></td>
<td>Operation's arguments.</td>
</tr>
</tbody>
</table>
<p>[<em>Note:</em> The requirements listed in this specification
are the ones imposed by the default implementation. See <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference internal" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
are the ones imposed by the default implementation. See <a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
</div>
<div class="section" id="id992">
<div class="section" id="divides-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <em>c</em><sub>1</sub>,<em>c</em><sub>2</sub>,... <em>c</em><sub>n</sub>:</p>
<p>For any <a class="reference" href="./integral-constant.html">Integral Constant</a>s <em>c</em><sub>1</sub>,<em>c</em><sub>2</sub>,... <em>c</em><sub>n</sub>:</p>
<pre class="literal-block">
typedef <a href="./divides.html" class="identifier">divides</a>&lt;c1,<em>...</em>c<em>n</em>&gt;::type r;
typedef <a href="./divides.html" class="identifier">divides</a>&lt;c1,<em>...</em>c<em>n</em>&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">c2::value</span> <span class="pre">!=</span> <span class="pre">0</span></tt>, <em>...</em> <tt class="literal"><span class="pre">cn::value</span> <span class="pre">!=</span> <span class="pre">0</span></tt>.</p>
</td>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><tt class="literal"><span class="pre">c2::value</span> <span class="pre">!=</span> <span class="pre">0</span></tt>, <em>...</em> <tt class="literal"><span class="pre">cn::value</span> <span class="pre">!=</span> <span class="pre">0</span></tt>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -92,8 +93,8 @@ typedef <a href="./integral-c.html" class="identifier">integral_c</a>&lt;
typeof(c1::value / c2::value)
, ( c1::value / c2::value )
&gt; c;
typedef <a href="./divides.html" class="identifier">divides</a>&lt;c,c3,<em>...</em>c<em>n</em>&gt;::type r;
typedef <a href="./divides.html" class="identifier">divides</a>&lt;c,c3,<em>...</em>c<em>n</em>&gt;::type r;
</pre>
</td>
</tr>
@@ -103,15 +104,13 @@ typedef <a href="./divides.html" class="identifier">divides</a>&lt;c,c3,<em>...<
<pre class="literal-block">
typedef <a href="./divides.html" class="identifier">divides</a>&lt;c1,<em>...</em>c<em>n</em>&gt; r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">c2::value</span> <span class="pre">!=</span> <span class="pre">0</span></tt>, <em>...</em> <tt class="literal"><span class="pre">cn::value</span> <span class="pre">!=</span> <span class="pre">0</span></tt>.</p>
</td>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><tt class="literal"><span class="pre">c2::value</span> <span class="pre">!=</span> <span class="pre">0</span></tt>, <em>...</em> <tt class="literal"><span class="pre">cn::value</span> <span class="pre">!=</span> <span class="pre">0</span></tt>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -122,11 +121,11 @@ struct r : <a href="./divides.html" class="identifier">divides</a>&lt;c1,<em>...
</tbody>
</table>
</div>
<div class="section" id="id993">
<div class="section" id="divides-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id994">
<div class="section" id="divides-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./divides.html" class="identifier">divides</a>&lt; <a href="./int.html" class="identifier">int_</a>&lt;-10&gt;, <a href="./int.html" class="identifier">int_</a>&lt;3&gt;, <a href="./long.html" class="identifier">long_</a>&lt;1&gt; &gt;::type r;
@@ -134,16 +133,15 @@ typedef <a href="./divides.html" class="identifier">divides</a>&lt; <a href="./i
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; r::<a href="./value-type.html" class="identifier">value_type</a>, long > ));
</pre>
</div>
<div class="section" id="id995">
<div class="section" id="divides-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./arithmetic-operations.html">Arithmetic Operations</a>, <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="reference internal" href="./numeric-cast.html">numeric_cast</a>, <a class="reference internal" href="./times.html">times</a>, <a class="reference internal" href="./modulus.html">modulus</a>, <a class="reference internal" href="./plus.html">plus</a></p>
<p><a class="reference" href="./arithmetic-operations.html">Arithmetic Operations</a>, <a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="refentry reference" href="./numeric-cast.html"><tt class="refentry literal"><span class="pre">numeric_cast</span></tt></a>, <a class="refentry reference" href="./times.html"><tt class="refentry literal"><span class="pre">times</span></tt></a>, <a class="refentry reference" href="./modulus.html"><tt class="refentry literal"><span class="pre">modulus</span></tt></a>, <a class="refentry reference" href="./plus.html"><tt class="refentry literal"><span class="pre">plus</span></tt></a></p>
<!-- modtime: November 10, 2004 04:43:02 +0000 -->
<!-- Metafunctions/Arithmetic Operations//modulus |50 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./times.html" class="navigation-link">Prev</a>&nbsp;<a href="./modulus.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./times.html" class="navigation-link">Back</a>&nbsp;<a href="./modulus.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./arithmetic-operations.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+16 -14
View File
@@ -1,45 +1,47 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: empty_base</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./pair.html" class="navigation-link">Prev</a>&nbsp;<a href="./void.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./pair.html" class="navigation-link">Back</a>&nbsp;<a href="./void.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./data-types-miscellaneous.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./data-types.html" class="navigation-link">Data Types</a> / <a href="./data-types-miscellaneous.html" class="navigation-link">Miscellaneous</a> / <a href="./empty-base.html" class="navigation-link">empty_base</a></td>
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./pair.html" class="navigation-link">Prev</a>&nbsp;<a href="./void.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./pair.html" class="navigation-link">Back</a>&nbsp;<a href="./void.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./data-miscellaneous.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./data-types.html" class="navigation-link">Data Types</a> / <a href="./data-miscellaneous.html" class="navigation-link">Miscellaneous</a> / <a href="./empty-base.html" class="navigation-link">empty_base</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="empty-base">
<h1><a class="toc-backref" href="./data-types-miscellaneous.html#id1584">empty_base</a></h1>
<div class="section" id="id1276">
<h1><a class="toc-backref" href="./data-miscellaneous.html#id507" name="empty-base">empty_base</a></h1>
<div class="section" id="data-empty-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
struct <a href="./empty-base.html" class="identifier">empty_base</a> {};
</pre>
</div>
<div class="section" id="id1277">
<div class="section" id="data-empty-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>An empty base class. Inheritance from <a class="reference internal" href="./empty-base.html">empty_base</a> through the <a class="reference internal" href="./inherit.html">inherit</a>
<p>An empty base class. Inheritance from <a class="refentry reference" href="./empty-base.html"><tt class="refentry literal"><span class="pre">empty_base</span></tt></a> through the <a class="refentry reference" href="./inherit.html"><tt class="refentry literal"><span class="pre">inherit</span></tt></a>
metafunction is a no-op.</p>
</div>
<div class="section" id="id1278">
<div class="section" id="data-empty-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/empty_base.hpp" class="header">boost/mpl/empty_base.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1279">
<div class="section" id="data-empty-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./data-types.html">Data Types</a>, <a class="reference internal" href="./inherit.html">inherit</a>, <a class="reference internal" href="./inherit-linearly.html">inherit_linearly</a>, <a class="reference internal" href="./void.html">void_</a></p>
<p><a class="reference" href="./data-types.html">Data Types</a>, <a class="refentry reference" href="./inherit.html"><tt class="refentry literal"><span class="pre">inherit</span></tt></a>, <a class="refentry reference" href="./inherit-linearly.html"><tt class="refentry literal"><span class="pre">inherit_linearly</span></tt></a>, <a class="refentry reference" href="./void.html"><tt class="refentry literal"><span class="pre">void_</span></tt></a></p>
<!-- modtime: November 10, 2004 04:42:54 +0000 -->
<!-- Data Types/Miscellaneous//void_ |100 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./pair.html" class="navigation-link">Prev</a>&nbsp;<a href="./void.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./pair.html" class="navigation-link">Back</a>&nbsp;<a href="./void.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./data-types-miscellaneous.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./pair.html" class="navigation-link">Prev</a>&nbsp;<a href="./void.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./pair.html" class="navigation-link">Back</a>&nbsp;<a href="./void.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./data-miscellaneous.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
</tr></table></body>
</html>
+20 -18
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: empty_sequence</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./views.html" class="navigation-link">Views</a> / <a href="./empty-sequence.html" class="navigation-link">empty_sequence</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="empty-sequence">
<h1><a class="toc-backref" href="./views.html#id1417">empty_sequence</a></h1>
<div class="section" id="id120">
<h1><a class="toc-backref" href="./views.html#id345" name="empty-sequence">empty_sequence</a></h1>
<div class="section" id="empty-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
struct <a href="./empty-sequence.html" class="identifier">empty_sequence</a>
@@ -23,42 +26,42 @@ struct <a href="./empty-sequence.html" class="identifier">empty_sequence</a>
};
</pre>
</div>
<div class="section" id="id121">
<div class="section" id="empty-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Represents a sequence containing no elements.</p>
</div>
<div class="section" id="id122">
<div class="section" id="empty-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/empty_sequence.hpp" class="header">boost/mpl/empty_sequence.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id123">
<div class="section" id="empty-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a>.</p>
where they differ from, or are not defined in <a class="reference" href="./random-access-sequence.html">Random Access Sequence</a>.</p>
<p>In the following table, <tt class="literal"><span class="pre">s</span></tt> is an instance of <tt class="literal"><span class="pre"><a href="./empty-sequence.html" class="identifier">empty_sequence</a></span></tt>.</p>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
<tr><th>Expression</th>
<th>Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./empty-sequence.html" class="identifier">empty_sequence</a></span></tt></td>
<td>An empty <a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a>.</td>
<td>An empty <a class="reference" href="./random-access-sequence.html">Random Access Sequence</a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::type</span></tt></td>
<td><tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span> <span class="pre">==</span> <span class="pre">0</span></tt>; see <a class="reference internal" href="./random-access-sequence.html">Random Access Sequence</a>.</td>
<td><tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span> <span class="pre">==</span> <span class="pre">0</span></tt>; see <a class="reference" href="./random-access-sequence.html">Random Access Sequence</a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id124">
<div class="section" id="empty-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./begin.html" class="identifier">begin</a>&lt;<a href="./empty-sequence.html" class="identifier">empty_sequence</a>&gt;::type first;
@@ -75,16 +78,15 @@ typedef <a href="./transform-view.html" class="identifier">transform_view</a>&lt
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( <a href="./size.html" class="identifier">size</a>&lt;<a href="./empty-sequence.html" class="identifier">empty_sequence</a>&gt;::value, ==, 0 );
</pre>
</div>
<div class="section" id="id125">
<div class="section" id="empty-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./views.html">Views</a>, <a class="reference internal" href="./vector.html">vector</a>, <a class="reference internal" href="./list.html">list</a>, <a class="reference internal" href="./single-view.html">single_view</a></p>
<p><a class="reference" href="./sequences.html">Sequences</a>, <a class="reference" href="./views.html">Views</a>, <a class="refentry reference" href="./vector.html"><tt class="refentry literal"><span class="pre">vector</span></tt></a>, <a class="refentry reference" href="./list.html"><tt class="refentry literal"><span class="pre">list</span></tt></a>, <a class="refentry reference" href="./single-view.html"><tt class="refentry literal"><span class="pre">single_view</span></tt></a></p>
<!-- modtime: November 13, 2004 20:20:53 +0000 -->
<!-- Sequences/Views//filter_view -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./views.html" class="navigation-link">Prev</a>&nbsp;<a href="./filter-view.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./filter-view.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./views.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+28 -26
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: empty</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./empty.html" class="navigation-link">empty</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="empty">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1430">empty</a></h1>
<div class="section" id="id220">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id358" name="empty">empty</a></h1>
<div class="section" id="intrinsic-empty-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -25,54 +28,54 @@ struct <a href="./empty.html" class="identifier">empty</a>
};
</pre>
</div>
<div class="section" id="id221">
<div class="section" id="intrinsic-empty-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns an <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c</span></tt> such that <tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if
<p>Returns an <a class="reference" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c</span></tt> such that <tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if
and only if the sequence is empty.</p>
</div>
<div class="section" id="id222">
<div class="section" id="intrinsic-empty-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/empty.hpp" class="header">boost/mpl/empty.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id223">
<div class="section" id="empty-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
<p><a class="reference" href="./tag-dispatched.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id224">
<div class="section" id="empty-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="21%" />
<col width="32%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td><a class="reference" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to test.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id225">
<div class="section" id="intrinsic-empty-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p>
<p>For any <a class="reference" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::type c;
typedef <a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::type c;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">Boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">Boolean <a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">Equivalent to <tt class="literal"><span class="pre">typedef</span> <span class="pre">is_same&lt;</span> <span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type,<a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span> <span class="pre">&gt;::type</span> <span class="pre">c;</span></tt>.</td>
</tr>
@@ -81,11 +84,11 @@ typedef <a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::type c;
</tbody>
</table>
</div>
<div class="section" id="id226">
<div class="section" id="empty-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id227">
<div class="section" id="intrinsic-empty-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,0&gt; empty_range;
@@ -95,16 +98,15 @@ typedef <a href="./vector.html" class="identifier">vector</a>&lt;long,float,doub
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>( <a href="./empty.html" class="identifier">empty</a>&lt;types&gt; );
</pre>
</div>
<div class="section" id="id228">
<div class="section" id="intrinsic-empty-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./integral-constant.html">Integral Constant</a>, <a class="reference internal" href="./size.html">size</a>, <a class="reference internal" href="./begin.html">begin</a> / <a class="reference internal" href="./end.html">end</a></p>
<p><a class="reference" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference" href="./integral-constant.html">Integral Constant</a>, <a class="refentry reference" href="./size.html"><tt class="refentry literal"><span class="pre">size</span></tt></a>, <a class="refentry reference" href="./begin.html"><tt class="refentry literal"><span class="pre">begin</span></tt></a> / <a class="refentry reference" href="./end.html"><tt class="refentry literal"><span class="pre">end</span></tt></a></p>
<!-- modtime: November 15, 2004 02:43:18 +0000 -->
<!-- Sequences/Intrinsic Metafunctions//end -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./clear.html" class="navigation-link">Prev</a>&nbsp;<a href="./end.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./clear.html" class="navigation-link">Back</a>&nbsp;<a href="./end.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+29 -27
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: end</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./end.html" class="navigation-link">end</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="end">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1431">end</a></h1>
<div class="section" id="id229">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id359" name="end">end</a></h1>
<div class="section" id="end-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -25,33 +28,33 @@ struct <a href="./end.html" class="identifier">end</a>
};
</pre>
</div>
<div class="section" id="id230">
<div class="section" id="end-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the sequence's past-the-end iterator. If the argument is not a
<a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, returns <a class="reference internal" href="./void.html">void_</a>.</p>
<p>Returns the sequence's past-the-end iterator. If the argument is not a
<a class="reference" href="./forward-sequence.html">Forward Sequence</a>, returns <a class="refentry reference" href="./void.html"><tt class="refentry literal"><span class="pre">void_</span></tt></a>.</p>
</div>
<div class="section" id="id231">
<div class="section" id="end-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/begin_end.hpp" class="header">boost/mpl/begin_end.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id232">
<div class="section" id="end-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
<p><a class="reference" href="./tag-dispatched.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id233">
<div class="section" id="end-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="19%" />
<col width="23%" />
<col width="58%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
@@ -63,31 +66,31 @@ returned.</td>
</tbody>
</table>
</div>
<div class="section" id="id234">
<div class="section" id="end-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any arbitrary type <tt class="literal"><span class="pre">x</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./end.html" class="identifier">end</a>&lt;x&gt;::type last;
typedef <a href="./end.html" class="identifier">end</a>&lt;x&gt;::type last;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a> or <a class="reference internal" href="./void.html">void_</a>.</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./forward-iterator.html">Forward Iterator</a> or <a class="refentry reference" href="./void.html"><tt class="refentry literal"><span class="pre">void_</span></tt></a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">If <tt class="literal"><span class="pre">x</span></tt> is <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <tt class="literal"><span class="pre">last</span></tt> is an iterator pointing one past the
last element in <tt class="literal"><span class="pre">s</span></tt>; otherwise <tt class="literal"><span class="pre">last</span></tt> is <a class="reference internal" href="./void.html">void_</a>.</td>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">If <tt class="literal"><span class="pre">x</span></tt> is <a class="reference" href="./forward-sequence.html">Forward Sequence</a>, <tt class="literal"><span class="pre">last</span></tt> is an iterator pointing one past the
last element in <tt class="literal"><span class="pre">s</span></tt>; otherwise <tt class="literal"><span class="pre">last</span></tt> is <a class="refentry reference" href="./void.html"><tt class="refentry literal"><span class="pre">void_</span></tt></a>.</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body">If <tt class="literal"><span class="pre">last</span></tt> is an iterator, it is past-the-end.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id235">
<div class="section" id="end-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id236">
<div class="section" id="end-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;long&gt; v;
@@ -97,16 +100,15 @@ typedef <a href="./end.html" class="identifier">end</a>&lt;v&gt;::type last;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./next.html" class="identifier">next</a>&lt;first&gt;::type, last > ));
</pre>
</div>
<div class="section" id="id237">
<div class="section" id="end-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./iterators.html">Iterators</a>, <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./begin.html">begin</a>, <a class="reference internal" href="./end.html">end</a>, <a class="reference internal" href="./next.html">next</a></p>
<p><a class="reference" href="./iterators.html">Iterators</a>, <a class="reference" href="./forward-sequence.html">Forward Sequence</a>, <a class="refentry reference" href="./begin.html"><tt class="refentry literal"><span class="pre">begin</span></tt></a>, <a class="refentry reference" href="./end.html"><tt class="refentry literal"><span class="pre">end</span></tt></a>, <a class="refentry reference" href="./next.html"><tt class="refentry literal"><span class="pre">next</span></tt></a></p>
<!-- modtime: November 13, 2004 01:26:54 +0000 -->
<!-- Sequences/Intrinsic Metafunctions//erase -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./empty.html" class="navigation-link">Prev</a>&nbsp;<a href="./erase.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./empty.html" class="navigation-link">Back</a>&nbsp;<a href="./erase.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+34 -34
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: equal_to</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./comparisons.html" class="navigation-link">Comparisons</a> / <a href="./equal-to.html" class="navigation-link">equal_to</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="equal-to">
<h1><a class="toc-backref" href="./comparisons.html#id1547">equal_to</a></h1>
<div class="section" id="id1050">
<h1><a class="toc-backref" href="./comparisons.html#id473" name="equal-to">equal_to</a></h1>
<div class="section" id="comparisons-equal-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -26,59 +29,58 @@ struct <a href="./equal-to.html" class="identifier">equal_to</a>
};
</pre>
</div>
<div class="section" id="id1051">
<div class="section" id="comparisons-equal-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns a true-valued <a class="reference internal" href="./integral-constant.html">Integral Constant</a> if <tt class="literal"><span class="pre">T1</span></tt> and <tt class="literal"><span class="pre">T2</span></tt> are equal.</p>
<p>Returns a true-valued <a class="reference" href="./integral-constant.html">Integral Constant</a> if <tt class="literal"><span class="pre">T1</span></tt> and <tt class="literal"><span class="pre">T2</span></tt> are equal.</p>
</div>
<div class="section" id="id1052">
<div class="section" id="comparisons-equal-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/equal_to.hpp" class="header">boost/mpl/equal_to.hpp</a>&gt;
#include &lt;<a href="../../../../boost/mpl/comparison.hpp" class="header">boost/mpl/comparison.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1053">
<div class="section" id="equal-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
<p><a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
</div>
<div class="section" id="id1054">
<div class="section" id="comparisons-equal-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td><a class="reference" href="./integral-constant.html">Integral Constant</a></td>
<td>Operation's arguments.</td>
</tr>
</tbody>
</table>
<p>[<em>Note:</em> The requirements listed in this specification
are the ones imposed by the default implementation. See <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference internal" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
are the ones imposed by the default implementation. See <a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
</div>
<div class="section" id="id1055">
<div class="section" id="comparisons-equal-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <tt class="literal"><span class="pre">c1</span></tt> and <tt class="literal"><span class="pre">c2</span></tt>:</p>
<p>For any <a class="reference" href="./integral-constant.html">Integral Constant</a>s <tt class="literal"><span class="pre">c1</span></tt> and <tt class="literal"><span class="pre">c2</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./equal-to.html" class="identifier">equal_to</a>&lt;c1,c2&gt;::type r;
typedef <a href="./equal-to.html" class="identifier">equal_to</a>&lt;c1,c2&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -90,14 +92,13 @@ typedef <a href="./bool.html" class="identifier">bool_</a>&lt; (c1::value == c2:
</table>
<!-- .......................................................................... -->
<pre class="literal-block">
typedef <a href="./equal-to.html" class="identifier">equal_to</a>&lt;c1,c2&gt; r;
typedef <a href="./equal-to.html" class="identifier">equal_to</a>&lt;c1,c2&gt; r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -108,11 +109,11 @@ struct r : <a href="./equal-to.html" class="identifier">equal_to</a>&lt;c1,c2&gt
</tbody>
</table>
</div>
<div class="section" id="id1056">
<div class="section" id="comparisons-equal-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id1057">
<div class="section" id="comparisons-equal-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./equal-to.html" class="identifier">equal_to</a>&lt; <a href="./int.html" class="identifier">int_</a>&lt;0&gt;, <a href="./int.html" class="identifier">int_</a>&lt;10&gt; &gt; ));
@@ -120,16 +121,15 @@ struct r : <a href="./equal-to.html" class="identifier">equal_to</a>&lt;c1,c2&gt
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./equal-to.html" class="identifier">equal_to</a>&lt; <a href="./long.html" class="identifier">long_</a>&lt;10&gt;, <a href="./int.html" class="identifier">int_</a>&lt;10&gt; > ));
</pre>
</div>
<div class="section" id="id1058">
<div class="section" id="comparisons-equal-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./comparisons.html">Comparisons</a>, <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="reference internal" href="./numeric-cast.html">numeric_cast</a>, <a class="reference internal" href="./not-equal-to.html">not_equal_to</a>, <a class="reference internal" href="./less.html">less</a></p>
<p><a class="reference" href="./comparisons.html">Comparisons</a>, <a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="refentry reference" href="./numeric-cast.html"><tt class="refentry literal"><span class="pre">numeric_cast</span></tt></a>, <a class="refentry reference" href="./not-equal-to.html"><tt class="refentry literal"><span class="pre">not_equal_to</span></tt></a>, <a class="refentry reference" href="./less.html"><tt class="refentry literal"><span class="pre">less</span></tt></a></p>
<!-- modtime: November 10, 2004 04:42:40 +0000 -->
<!-- Metafunctions/Comparisons//not_equal_to |60 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./greater-equal.html" class="navigation-link">Prev</a>&nbsp;<a href="./not-equal-to.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./greater-equal.html" class="navigation-link">Back</a>&nbsp;<a href="./not-equal-to.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./comparisons.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+29 -28
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: equal</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,14 +15,14 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./querying-algorithms.html" class="navigation-link">Querying Algorithms</a> / <a href="./equal.html" class="navigation-link">equal</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="equal">
<h1><a class="toc-backref" href="./querying-algorithms.html#id1484">equal</a></h1>
<div class="section" id="id607">
<h1><a class="toc-backref" href="./querying-algorithms.html#id412" name="equal">equal</a></h1>
<div class="section" id="equal-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
typename Seq1
, typename Seq2
, typename Pred = is_same&lt;<a href="./placeholders.html" class="identifier">_1</a>,<a href="./placeholders.html" class="identifier">_2</a>&gt;
, typename Pred = is_same&lt;_1,_2&gt;
&gt;
struct <a href="./equal.html" class="identifier">equal</a>
{
@@ -27,57 +30,56 @@ struct <a href="./equal.html" class="identifier">equal</a>
};
</pre>
</div>
<div class="section" id="id608">
<div class="section" id="equal-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns a true-valued <a class="reference internal" href="./integral-constant.html">Integral Constant</a> if the two sequences <tt class="literal"><span class="pre">Seq1</span></tt>
<p>Returns a true-valued <a class="reference" href="./integral-constant.html">Integral Constant</a> if the two sequences <tt class="literal"><span class="pre">Seq1</span></tt>
and <tt class="literal"><span class="pre">Seq2</span></tt> are identical when compared element-by-element.</p>
</div>
<div class="section" id="id609">
<div class="section" id="equal-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/equal.hpp" class="header">boost/mpl/equal.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id610">
<div class="section" id="equal-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="22%" />
<col width="36%" />
<col width="41%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Seq1</span></tt>, <tt class="literal"><span class="pre">Seq2</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td><a class="reference" href="./forward-sequence.html">Forward Sequence</a></td>
<td>Sequences to compare.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Pred</span></tt></td>
<td>Binary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td>Binary <a class="reference" href="./lambda-expression.html">Lambda Expression</a></td>
<td>A comparison criterion.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id611">
<div class="section" id="equal-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>s <tt class="literal"><span class="pre">s1</span></tt> and <tt class="literal"><span class="pre">s2</span></tt> and a binary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">pred</span></tt>:</p>
<p>For any <a class="reference" href="./forward-sequence.html">Forward Sequence</a>s <tt class="literal"><span class="pre">s1</span></tt> and <tt class="literal"><span class="pre">s2</span></tt> and a binary <a class="reference" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">pred</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./equal.html" class="identifier">equal</a>&lt;s1,s2,pred&gt;::type c;
typedef <a href="./equal.html" class="identifier">equal</a>&lt;s1,s2,pred&gt;::type c;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a></p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a></td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> is and only if <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s1&gt;::value</span> <span class="pre">==</span> <span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s2&gt;::value</span></tt>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> is and only if <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s1&gt;::value</span> <span class="pre">==</span> <span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s2&gt;::value</span></tt>
and for every iterator <tt class="literal"><span class="pre">i</span></tt> in [<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s1&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s1&gt;::type</span></tt>) <tt class="literal"><span class="pre"><a href="./deref.html" class="identifier">deref</a>&lt;i&gt;::type</span></tt> is identical to</p>
<pre class="last literal-block">
<a href="./advance.html" class="identifier">advance</a>&lt; <a href="./begin.html" class="identifier">begin</a>&lt;s2&gt;::type, <a href="./distance.html" class="identifier">distance</a>&lt; <a href="./begin.html" class="identifier">begin</a>&lt;s1&gt;::type,i &gt;::type &gt;::type
@@ -87,11 +89,11 @@ and for every iterator <tt class="literal"><span class="pre">i</span></tt> in [<
</tbody>
</table>
</div>
<div class="section" id="id612">
<div class="section" id="equal-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. At most <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s1&gt;::value</span></tt> comparisons.</p>
</div>
<div class="section" id="id613">
<div class="section" id="equal-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;char,int,unsigned,long,unsigned long&gt; s1;
@@ -100,15 +102,14 @@ typedef <a href="./list.html" class="identifier">list</a>&lt;char,int,unsigned,l
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./equal.html" class="identifier">equal</a>&lt;s1,s2&gt; ));
</pre>
</div>
<div class="section" id="id614">
<div class="section" id="equal-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./querying-algorithms.html">Querying Algorithms</a>, <a class="reference internal" href="./find.html">find</a>, <a class="reference internal" href="./find-if.html">find_if</a></p>
<p><a class="reference" href="./querying-algorithms.html">Querying Algorithms</a>, <a class="refentry reference" href="./find.html"><tt class="refentry literal"><span class="pre">find</span></tt></a>, <a class="refentry reference" href="./find-if.html"><tt class="refentry literal"><span class="pre">find_if</span></tt></a></p>
<!-- modtime: November 10, 2004 04:42:44 +0000 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./max-element.html" class="navigation-link">Prev</a>&nbsp;<a href="./transformation-algorithms.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./max-element.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+29 -27
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: erase_key</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./erase-key.html" class="navigation-link">erase_key</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="erase-key">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1433">erase_key</a></h1>
<div class="section" id="id247">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id361" name="erase-key">erase_key</a></h1>
<div class="section" id="intrinsic-erase-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -26,38 +29,38 @@ struct <a href="./erase-key.html" class="identifier">erase_key</a>
};
</pre>
</div>
<div class="section" id="id248">
<div class="section" id="intrinsic-erase-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Erases elements associated with the key <tt class="literal"><span class="pre">Key</span></tt> in the <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a>
<p>Erases elements associated with the key <tt class="literal"><span class="pre">Key</span></tt> in the <a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a>
<tt class="literal"><span class="pre">AssocSeq</span></tt> .</p>
</div>
<div class="section" id="id249">
<div class="section" id="intrinsic-erase-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/erase_key.hpp" class="header">boost/mpl/erase_key.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id250">
<div class="section" id="intrinsic-erase-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
<p><a class="reference" href="./tag-dispatched.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id251">
<div class="section" id="intrinsic-erase-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">AssocSeq</span></tt></td>
<td><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td><a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a></td>
<td>A sequence to erase elements from.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Key</span></tt></td>
@@ -67,19 +70,19 @@ struct <a href="./erase-key.html" class="identifier">erase_key</a>
</tbody>
</table>
</div>
<div class="section" id="id252">
<div class="section" id="intrinsic-erase-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and arbitrary type <tt class="literal"><span class="pre">key</span></tt>:</p>
<p>For any <a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and arbitrary type <tt class="literal"><span class="pre">key</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./erase-key.html" class="identifier">erase_key</a>&lt;s,key&gt;::type r;
typedef <a href="./erase-key.html" class="identifier">erase_key</a>&lt;s,key&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a>.</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><tt class="literal"><span class="pre">r</span></tt> is <a class="reference internal" href="./terminology.html#concept-identical">concept-identical</a> and equivalent to <tt class="literal"><span class="pre">s</span></tt> except that
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><tt class="literal"><span class="pre">r</span></tt> is <a class="reference" href="./terminology.html#concept-identical">concept-identical</a> and equivalent to <tt class="literal"><span class="pre">s</span></tt> except that
<tt class="literal"><span class="pre"><a href="./has-key.html" class="identifier">has_key</a>&lt;r,k&gt;::value</span> <span class="pre">==</span> <span class="pre">false</span></tt>.</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;r&gt;::value</span> <span class="pre">==</span> <span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span> <span class="pre">-</span> <span class="pre">1</span></tt>.</td>
@@ -87,11 +90,11 @@ typedef <a href="./erase-key.html" class="identifier">erase_key</a>&lt;s,key&gt;
</tbody>
</table>
</div>
<div class="section" id="id253">
<div class="section" id="intrinsic-erase-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id254">
<div class="section" id="intrinsic-erase-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./map.html" class="identifier">map</a>&lt; <a href="./pair.html" class="identifier">pair</a>&lt;int,unsigned&gt;, <a href="./pair.html" class="identifier">pair</a>&lt;char,long&gt; &gt; m;
@@ -102,16 +105,15 @@ typedef <a href="./erase-key.html" class="identifier">erase_key</a>&lt;m,char&gt
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./at.html" class="identifier">at</a>&lt;m1,int&gt;::type,unsigned > ));
</pre>
</div>
<div class="section" id="id255">
<div class="section" id="intrinsic-erase-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a>, <a class="reference internal" href="./erase.html">erase</a>, <a class="reference internal" href="./has-key.html">has_key</a>, <a class="reference internal" href="./insert.html">insert</a></p>
<p><a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a>, <a class="refentry reference" href="./erase.html"><tt class="refentry literal"><span class="pre">erase</span></tt></a>, <a class="refentry reference" href="./has-key.html"><tt class="refentry literal"><span class="pre">has_key</span></tt></a>, <a class="refentry reference" href="./insert.html"><tt class="refentry literal"><span class="pre">insert</span></tt></a></p>
<!-- modtime: November 10, 2004 04:42:33 +0000 -->
<!-- Sequences/Intrinsic Metafunctions//front -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./erase.html" class="navigation-link">Prev</a>&nbsp;<a href="./front.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./erase.html" class="navigation-link">Back</a>&nbsp;<a href="./front.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+45 -48
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: erase</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./erase.html" class="navigation-link">erase</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="erase">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1432">erase</a></h1>
<div class="section" id="id238">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id360" name="erase">erase</a></h1>
<div class="section" id="erase-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -27,74 +30,71 @@ struct <a href="./erase.html" class="identifier">erase</a>
};
</pre>
</div>
<div class="section" id="id239">
<div class="section" id="erase-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a></span></tt> performs a removal of one or more adjacent elements in the sequence
<p><tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a></span></tt> performs a removal of one or more adjacent elements in the sequence
starting from an arbitrary position.</p>
</div>
<div class="section" id="id240">
<div class="section" id="erase-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/erase.hpp" class="header">boost/mpl/erase.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id241">
<div class="section" id="erase-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
<p><a class="reference" href="./tag-dispatched.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id242">
<div class="section" id="erase-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> or
<a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a> or
<a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a></td>
<td>A sequence to erase from.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">First</span></tt></td>
<td><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></td>
<td><a class="reference" href="./forward-iterator.html">Forward Iterator</a></td>
<td>An iterator to the beginning of the range to
be erased.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Last</span></tt></td>
<td><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></td>
<td><a class="reference" href="./forward-iterator.html">Forward Iterator</a></td>
<td>An iterator past-the-end of the range to be
erased.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id243">
<div class="section" id="erase-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<div class="expression-semantics compound">
<p class="compound-first">For any <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and iterators <tt class="literal"><span class="pre">pos</span></tt>, <tt class="literal"><span class="pre">first</span></tt> and <tt class="literal"><span class="pre">last</span></tt> into <tt class="literal"><span class="pre">s</span></tt>:</p>
<p class="compound-first">For any <a class="reference" href="./extensible-sequence.html">Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and iterators <tt class="literal"><span class="pre">pos</span></tt>, <tt class="literal"><span class="pre">first</span></tt> and <tt class="literal"><span class="pre">last</span></tt> into <tt class="literal"><span class="pre">s</span></tt>:</p>
<pre class="compound-middle literal-block">
typedef <a href="./erase.html" class="identifier">erase</a>&lt;s,first,last&gt;::type r;
typedef <a href="./erase.html" class="identifier">erase</a>&lt;s,first,last&gt;::type r;
</pre>
<table class="compound-middle docutils field-list" frame="void" rules="none">
<table class="compound-middle field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a>.</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">[first,last)</span></tt> is a valid range in <tt class="literal"><span class="pre">s</span></tt>.</p>
</td>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><tt class="literal"><span class="pre">[first,last)</span></tt> is a valid range in <tt class="literal"><span class="pre">s</span></tt>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">r</span></tt> is a new sequence, <a class="reference internal" href="./terminology.html#concept-identical">concept-identical</a> to <tt class="literal"><span class="pre">s</span></tt>, of the following elements:
[<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">pos</span></tt>), [<tt class="literal"><span class="pre">last</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>).</p>
</td>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><tt class="literal"><span class="pre">r</span></tt> is a new sequence, <a class="reference" href="./terminology.html#concept-identical">concept-identical</a> to <tt class="literal"><span class="pre">s</span></tt>, of the following elements:
[<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">pos</span></tt>), [<tt class="literal"><span class="pre">last</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>).</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><p class="first">The relative order of the elements in <tt class="literal"><span class="pre">r</span></tt> is the same as in <tt class="literal"><span class="pre">s</span></tt>;</p>
<pre class="last literal-block">
@@ -108,15 +108,13 @@ typedef <a href="./erase.html" class="identifier">erase</a>&lt;s,first,last&gt;:
<pre class="compound-middle literal-block">
typedef <a href="./erase.html" class="identifier">erase</a>&lt;s,pos&gt;::type r;
</pre>
<table class="compound-last docutils field-list" frame="void" rules="none">
<table class="compound-last field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a>.</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">pos</span></tt> is a dereferenceable iterator in <tt class="literal"><span class="pre">s</span></tt>.</p>
</td>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><tt class="literal"><span class="pre">pos</span></tt> is a dereferenceable iterator in <tt class="literal"><span class="pre">s</span></tt>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -128,15 +126,15 @@ typedef <a href="./erase.html" class="identifier">erase</a>&lt; s,pos,<a href=".
</table>
</div>
<div class="expression-semantics compound">
<p class="compound-first">For any <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and iterator <tt class="literal"><span class="pre">pos</span></tt> into <tt class="literal"><span class="pre">s</span></tt>:</p>
<p class="compound-first">For any <a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and iterator <tt class="literal"><span class="pre">pos</span></tt> into <tt class="literal"><span class="pre">s</span></tt>:</p>
<pre class="compound-middle literal-block">
typedef <a href="./erase.html" class="identifier">erase</a>&lt;s,pos&gt;::type r;
</pre>
<table class="compound-last docutils field-list" frame="void" rules="none">
<table class="compound-last field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>.</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a>.</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><tt class="literal"><span class="pre">pos</span></tt> is a dereferenceable iterator to <tt class="literal"><span class="pre">s</span></tt>.</td>
</tr>
@@ -149,29 +147,29 @@ typedef <a href="./erase.html" class="identifier">erase</a>&lt;s,pos&gt;::type r
</table>
</div>
</div>
<div class="section" id="id244">
<div class="section" id="erase-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="45%" />
<col width="55%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Sequence archetype</th>
<th class="head">Complexity (the range form)</th>
<tr><th>Sequence archetype</th>
<th>Complexity (the range form)</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<tr><td><a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a></td>
<td>Amortized constant time.</td>
</tr>
<tr><td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></td>
<tr><td><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a></td>
<td>Quadratic in the worst case, linear at best.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id245">
<div class="section" id="erase-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector-c.html" class="identifier">vector_c</a>&lt;int,1,0,5,1,7,5,0,5&gt; values;
@@ -184,16 +182,15 @@ typedef <a href="./find.html" class="identifier">find</a>&lt;result, <a href="./
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; iter, <a href="./end.html" class="identifier">end</a>&lt;result&gt;::type > ));
</pre>
</div>
<div class="section" id="id246">
<div class="section" id="erase-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>, <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a>, <a class="reference internal" href="./erase-key.html">erase_key</a>, <a class="reference internal" href="./pop-front.html">pop_front</a>, <a class="reference internal" href="./pop-back.html">pop_back</a>, <a class="reference internal" href="./insert.html">insert</a></p>
<p><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a>, <a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a>, <a class="refentry reference" href="./erase-key.html"><tt class="refentry literal"><span class="pre">erase_key</span></tt></a>, <a class="refentry reference" href="./pop-front.html"><tt class="refentry literal"><span class="pre">pop_front</span></tt></a>, <a class="refentry reference" href="./pop-back.html"><tt class="refentry literal"><span class="pre">pop_back</span></tt></a>, <a class="refentry reference" href="./insert.html"><tt class="refentry literal"><span class="pre">insert</span></tt></a></p>
<!-- modtime: November 10, 2004 04:42:36 +0000 -->
<!-- Sequences/Intrinsic Metafunctions//erase_key -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./end.html" class="navigation-link">Prev</a>&nbsp;<a href="./erase-key.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./end.html" class="navigation-link">Back</a>&nbsp;<a href="./erase-key.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+25 -23
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: eval_if_c</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,11 +15,11 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./type-selection.html" class="navigation-link">Type Selection</a> / <a href="./eval-if-c.html" class="navigation-link">eval_if_c</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="eval-if-c">
<h1><a class="toc-backref" href="./type-selection.html#id1523">eval_if_c</a></h1>
<div class="section" id="id880">
<h1><a class="toc-backref" href="./type-selection.html#id449" name="eval-if-c">eval_if_c</a></h1>
<div class="section" id="type-eval-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
template&lt;
bool c
, typename F1
, typename F2
@@ -27,30 +30,30 @@ struct <a href="./eval-if-c.html" class="identifier">eval_if_c</a>
};
</pre>
</div>
<div class="section" id="id881">
<div class="section" id="type-eval-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Evaluates one of its two <a class="reference internal" href="./metafunction.html#nullary-metafunction">nullary-metafunction</a> arguments, <tt class="literal"><span class="pre">F1</span></tt> or <tt class="literal"><span class="pre">F2</span></tt>, depending
on the value of integral constant <tt class="literal"><span class="pre">c</span></tt>. <tt class="literal"><span class="pre"><a href="./eval-if-c.html" class="identifier">eval_if_c</a>&lt;c,f1,f2&gt;::type</span></tt> is a shorcut
<p>Evaluates one of its two <a class="reference" href="./metafunction.html#nullary-metafunction">nullary-metafunction</a> arguments, <tt class="literal"><span class="pre">F1</span></tt> or <tt class="literal"><span class="pre">F2</span></tt>, depending
on the value of integral constant <tt class="literal"><span class="pre">c</span></tt>. <tt class="literal"><span class="pre"><a href="./eval-if-c.html" class="identifier">eval_if_c</a>&lt;c,f1,f2&gt;::type</span></tt> is a shorcut
notation for <tt class="literal"><span class="pre"><a href="./eval-if.html" class="identifier">eval_if</a>&lt;</span> <span class="pre"><a href="./bool.html" class="identifier">bool_</a>&lt;c&gt;,f1,f2</span> <span class="pre">&gt;::type</span></tt>.</p>
</div>
<div class="section" id="id882">
<div class="section" id="type-eval-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/eval_if.hpp" class="header">boost/mpl/eval_if.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id883">
<div class="section" id="type-eval-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
@@ -59,19 +62,19 @@ notation for <tt class="literal"><span class="pre"><a href="./eval-if.html" clas
<td>An evaluation condition.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">F1</span></tt>, <tt class="literal"><span class="pre">F2</span></tt></td>
<td>Nullary <a class="reference internal" href="./metafunction.html">Metafunction</a></td>
<td>Nullary <a class="reference" href="./metafunction.html">Metafunction</a></td>
<td>Metafunctions to select for evaluation from.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id884">
<div class="section" id="type-eval-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any integral constant <tt class="literal"><span class="pre">c</span></tt> and nullary <a class="reference internal" href="./metafunction.html">Metafunction</a>s <tt class="literal"><span class="pre">f1</span></tt>, <tt class="literal"><span class="pre">f2</span></tt>:</p>
<p>For any integral constant <tt class="literal"><span class="pre">c</span></tt> and nullary <a class="reference" href="./metafunction.html">Metafunction</a>s <tt class="literal"><span class="pre">f1</span></tt>, <tt class="literal"><span class="pre">f2</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./eval-if-c.html" class="identifier">eval_if_c</a>&lt;c,f1,f2&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
@@ -82,7 +85,7 @@ typedef <a href="./eval-if-c.html" class="identifier">eval_if_c</a>&lt;c,f1,f2&g
</tbody>
</table>
</div>
<div class="section" id="id885">
<div class="section" id="type-eval-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./eval-if-c.html" class="identifier">eval_if_c</a>&lt; true, <a href="./identity.html" class="identifier">identity</a>&lt;char&gt;, <a href="./identity.html" class="identifier">identity</a>&lt;long&gt; &gt;::type t1;
@@ -92,15 +95,14 @@ typedef <a href="./eval-if-c.html" class="identifier">eval_if_c</a>&lt; false, <
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;t2,long&gt; ));
</pre>
</div>
<div class="section" id="id886">
<div class="section" id="type-eval-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./integral-constant.html">Integral Constant</a>, <a class="reference internal" href="./eval-if.html">eval_if</a>, <a class="reference internal" href="./if.html">if_</a>, <a class="reference internal" href="./bool.html">bool_</a></p>
<p><a class="reference" href="./metafunctions.html">Metafunctions</a>, <a class="reference" href="./integral-constant.html">Integral Constant</a>, <a class="refentry reference" href="./eval-if.html"><tt class="refentry literal"><span class="pre">eval_if</span></tt></a>, <a class="refentry reference" href="./if.html"><tt class="refentry literal"><span class="pre">if_</span></tt></a>, <a class="refentry reference" href="./bool.html"><tt class="refentry literal"><span class="pre">bool_</span></tt></a></p>
<!-- modtime: November 10, 2004 04:42:25 +0000 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./eval-if.html" class="navigation-link">Prev</a>&nbsp;<a href="./invocation.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./eval-if.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./type-selection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+28 -26
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: eval_if</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,11 +15,11 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./type-selection.html" class="navigation-link">Type Selection</a> / <a href="./eval-if.html" class="navigation-link">eval_if</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="eval-if">
<h1><a class="toc-backref" href="./type-selection.html#id1522">eval_if</a></h1>
<div class="section" id="id873">
<h1><a class="toc-backref" href="./type-selection.html#id448" name="eval-if">eval_if</a></h1>
<div class="section" id="eval-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
template&lt;
typename C
, typename F1
, typename F2
@@ -27,81 +30,80 @@ struct <a href="./eval-if.html" class="identifier">eval_if</a>
};
</pre>
</div>
<div class="section" id="id874">
<div class="section" id="eval-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Evaluates one of its two <a class="reference internal" href="./metafunction.html#nullary-metafunction">nullary-metafunction</a> arguments, <tt class="literal"><span class="pre">F1</span></tt> or <tt class="literal"><span class="pre">F2</span></tt>, depending
<p>Evaluates one of its two <a class="reference" href="./metafunction.html#nullary-metafunction">nullary-metafunction</a> arguments, <tt class="literal"><span class="pre">F1</span></tt> or <tt class="literal"><span class="pre">F2</span></tt>, depending
on the value <tt class="literal"><span class="pre">C</span></tt>.</p>
</div>
<div class="section" id="id875">
<div class="section" id="eval-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/eval_if.hpp" class="header">boost/mpl/eval_if.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id876">
<div class="section" id="eval-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">C</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td><a class="reference" href="./integral-constant.html">Integral Constant</a></td>
<td>An evaluation condition.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">F1</span></tt>, <tt class="literal"><span class="pre">F2</span></tt></td>
<td>Nullary <a class="reference internal" href="./metafunction.html">Metafunction</a></td>
<td>Nullary <a class="reference" href="./metafunction.html">Metafunction</a></td>
<td>Metafunctions to select for evaluation from.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id877">
<div class="section" id="eval-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c</span></tt> and nullary <a class="reference internal" href="./metafunction.html">Metafunction</a>s <tt class="literal"><span class="pre">f1</span></tt>, <tt class="literal"><span class="pre">f2</span></tt>:</p>
<p>For any <a class="reference" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c</span></tt> and nullary <a class="reference" href="./metafunction.html">Metafunction</a>s <tt class="literal"><span class="pre">f1</span></tt>, <tt class="literal"><span class="pre">f2</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./eval-if.html" class="identifier">eval_if</a>&lt;c,f1,f2&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">Any type.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">If <tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt>, <tt class="literal"><span class="pre">t</span></tt> is identical to <tt class="literal"><span class="pre">f1::type</span></tt>; otherwise <tt class="literal"><span class="pre">t</span></tt> is
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">If <tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt>, <tt class="literal"><span class="pre">t</span></tt> is identical to <tt class="literal"><span class="pre">f1::type</span></tt>; otherwise <tt class="literal"><span class="pre">t</span></tt> is
identical to <tt class="literal"><span class="pre">f2::type</span></tt>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id878">
<div class="section" id="eval-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./eval-if.html" class="identifier">eval_if</a>&lt; <a href="./bool.html" class="identifier">true_</a>, <a href="./identity.html" class="identifier">identity</a>&lt;char&gt;, <a href="./identity.html" class="identifier">identity</a>&lt;long&gt; &gt;::type t1;
typedef <a href="./eval-if.html" class="identifier">eval_if</a>&lt; <a href="./bool.html" class="identifier">false_</a>, <a href="./identity.html" class="identifier">identity</a>&lt;char&gt;, <a href="./identity.html" class="identifier">identity</a>&lt;long&gt; &gt;::type t2;
typedef <a href="./eval-if.html" class="identifier">eval_if</a>&lt; true_, <a href="./identity.html" class="identifier">identity</a>&lt;char&gt;, <a href="./identity.html" class="identifier">identity</a>&lt;long&gt; &gt;::type t1;
typedef <a href="./eval-if.html" class="identifier">eval_if</a>&lt; false_, <a href="./identity.html" class="identifier">identity</a>&lt;char&gt;, <a href="./identity.html" class="identifier">identity</a>&lt;long&gt; &gt;::type t2;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;t1,char&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;t2,long&gt; ));
</pre>
</div>
<div class="section" id="id879">
<div class="section" id="eval-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./integral-constant.html">Integral Constant</a>, <a class="reference internal" href="./eval-if-c.html">eval_if_c</a>, <a class="reference internal" href="./if.html">if_</a></p>
<p><a class="reference" href="./metafunctions.html">Metafunctions</a>, <a class="reference" href="./integral-constant.html">Integral Constant</a>, <a class="refentry reference" href="./eval-if-c.html"><tt class="refentry literal"><span class="pre">eval_if_c</span></tt></a>, <a class="refentry reference" href="./if.html"><tt class="refentry literal"><span class="pre">if_</span></tt></a></p>
<!-- modtime: November 10, 2004 04:42:29 +0000 -->
<!-- Metafunctions/Type Selection//eval_if_c |40 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./if-c.html" class="navigation-link">Prev</a>&nbsp;<a href="./eval-if-c.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./if-c.html" class="navigation-link">Back</a>&nbsp;<a href="./eval-if-c.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./type-selection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
@@ -1,78 +1,81 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Extensible Associative Sequence</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./associative-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./integral-sequence-wrapper.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./associative-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./integral-sequence-wrapper.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./concepts.html" class="navigation-link">Concepts</a> / <a href="./extensible-associative-sequence.html" class="navigation-link">Extensible Associative Sequence</a></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./concepts.html" class="navigation-link">Concepts</a> / <a href="./extensible-associative.html" class="navigation-link">Extensible Associative Sequence</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="extensible-associative-sequence">
<h1><a class="toc-backref" href="./concepts.html#id1402">Extensible Associative Sequence</a></h1>
<div class="section" id="id35">
<div class="section" id="extensible-associative">
<h1><a class="toc-backref" href="./concepts.html#id331" name="extensible-associative">Extensible Associative Sequence</a></h1>
<div class="section" id="concepts-extensible-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>An <a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a> is an <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a> that supports
insertion and removal of elements. In contrast to <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>,
<a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a> does not provide a mechanism for
<p>An <a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a> is an <a class="reference" href="./associative-sequence.html">Associative Sequence</a> that supports
insertion and removal of elements. In contrast to <a class="reference" href="./extensible-sequence.html">Extensible Sequence</a>,
<a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a> does not provide a mechanism for
inserting an element at a specific position.</p>
</div>
<div class="section" id="id36">
<div class="section" id="concepts-extensible-expression-requirements">
<h3><a class="subsection-title" href="#expression-requirements" name="expression-requirements">Expression requirements</a></h3>
<p>In the following table and subsequent specifications, <tt class="literal"><span class="pre">s</span></tt> is an <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a>,
<p>In the following table and subsequent specifications, <tt class="literal"><span class="pre">s</span></tt> is an <a class="reference" href="./associative-sequence.html">Associative Sequence</a>,
<tt class="literal"><span class="pre">pos</span></tt> is an iterator into <tt class="literal"><span class="pre">s</span></tt>, and <tt class="literal"><span class="pre">x</span></tt> and <tt class="literal"><span class="pre">k</span></tt> are arbitrary types.</p>
<p>In addition to the <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a> requirements, the following must be met:</p>
<table border="1" class="docutils table">
<p>In addition to the <a class="reference" href="./associative-sequence.html">Associative Sequence</a> requirements, the following must be met:</p>
<table border="1" class="table">
<colgroup>
<col width="32%" />
<col width="40%" />
<col width="28%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Type</th>
<th class="head">Complexity</th>
<tr><th>Expression</th>
<th>Type</th>
<th>Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;s,x&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td><a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;s,pos,x&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td><a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./erase-key.html" class="identifier">erase_key</a>&lt;s,k&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td><a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a>&lt;s,pos&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td><a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./clear.html" class="identifier">clear</a>&lt;s&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-associative-sequence.html">Extensible Associative Sequence</a></td>
<td><a class="reference" href="./extensible-associative.html">Extensible Associative Sequence</a></td>
<td>Amortized constant time</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id37">
<div class="section" id="concepts-extensible-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a>.</p>
<table border="1" class="docutils table">
where they differ from, or are not defined in <a class="reference" href="./associative-sequence.html">Associative Sequence</a>.</p>
<table border="1" class="table">
<colgroup>
<col width="32%" />
<col width="68%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
<tr><th>Expression</th>
<th>Semantics</th>
</tr>
</thead>
<tbody valign="top">
@@ -82,51 +85,50 @@ equivalent to <tt class="literal"><span class="pre">s</span></tt> except that</p
<pre class="literal-block">
<a href="./at.html" class="identifier">at</a>&lt; r, <a href="./key-type.html" class="identifier">key_type</a>&lt;s,x&gt;::type &gt;::type
</pre>
<p class="last">is identical to <tt class="literal"><span class="pre"><a href="./value-type.html" class="identifier">value_type</a>&lt;s,x&gt;::type</span></tt>; see <a class="reference internal" href="./insert.html">insert</a>.</p>
<p class="last">is identical to <tt class="literal"><span class="pre"><a href="./value-type.html" class="identifier">value_type</a>&lt;s,x&gt;::type</span></tt>; see <a class="refentry reference" href="./insert.html"><tt class="refentry literal"><span class="pre">insert</span></tt></a>.</p>
</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;s,pos,x&gt;::type</span></tt></td>
<td>Equivalent to <tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;s,x&gt;::type</span></tt>; <tt class="literal"><span class="pre">pos</span></tt> is ignored;
see <a class="reference internal" href="./insert.html">insert</a>.</td>
see <a class="refentry reference" href="./insert.html"><tt class="refentry literal"><span class="pre">insert</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./erase-key.html" class="identifier">erase_key</a>&lt;s,k&gt;::type</span></tt></td>
<td>Erases elements in <tt class="literal"><span class="pre">s</span></tt> associated with the key <tt class="literal"><span class="pre">k</span></tt>;
the resulting sequence <tt class="literal"><span class="pre">r</span></tt> is equivalent to <tt class="literal"><span class="pre">s</span></tt> except
that <tt class="literal"><span class="pre"><a href="./has-key.html" class="identifier">has_key</a>&lt;r,k&gt;::value</span> <span class="pre">==</span> <span class="pre">false</span></tt>; see <a class="reference internal" href="./erase-key.html">erase_key</a>.</td>
that <tt class="literal"><span class="pre"><a href="./has-key.html" class="identifier">has_key</a>&lt;r,k&gt;::value</span> <span class="pre">==</span> <span class="pre">false</span></tt>; see <a class="refentry reference" href="./erase-key.html"><tt class="refentry literal"><span class="pre">erase_key</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a>&lt;s,pos&gt;::type</span></tt></td>
<td>Erases the element at a specific position; equivalent to
<tt class="literal"><span class="pre"><a href="./erase-key.html" class="identifier">erase_key</a>&lt;s,</span> <span class="pre"><a href="./deref.html" class="identifier">deref</a>&lt;pos&gt;::type</span> <span class="pre">&gt;::type</span></tt>; see <a class="reference internal" href="./erase.html">erase</a>.</td>
<tt class="literal"><span class="pre"><a href="./erase-key.html" class="identifier">erase_key</a>&lt;s,</span> <span class="pre"><a href="./deref.html" class="identifier">deref</a>&lt;pos&gt;::type</span> <span class="pre">&gt;::type</span></tt>; see <a class="refentry reference" href="./erase.html"><tt class="refentry literal"><span class="pre">erase</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./clear.html" class="identifier">clear</a>&lt;s&gt;::type</span></tt></td>
<td>An empty sequence concept-identical to <tt class="literal"><span class="pre">s</span></tt>; see
<a class="reference internal" href="./clear.html">clear</a>.</td>
<a class="refentry reference" href="./clear.html"><tt class="refentry literal"><span class="pre">clear</span></tt></a>.</td>
</tr>
</tbody>
</table>
<!-- Invariants
- - - - - - - - - -
For any extensible associative sequence ``s`` the following invariants always hold: -->
For any extensible associative sequence ``s`` the following invariants always hold: -->
</div>
<div class="section" id="id38">
<div class="section" id="concepts-extensible-models">
<h3><a class="subsection-title" href="#models" name="models">Models</a></h3>
<ul class="simple">
<li><a class="reference internal" href="./set.html">set</a></li>
<li><a class="reference internal" href="./map.html">map</a></li>
<li><a class="refentry reference" href="./set.html"><tt class="refentry literal"><span class="pre">set</span></tt></a></li>
<li><a class="refentry reference" href="./map.html"><tt class="refentry literal"><span class="pre">map</span></tt></a></li>
</ul>
<!-- * |multiset| -->
</div>
<div class="section" id="id39">
<div class="section" id="concepts-extensible-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a>, <a class="reference internal" href="./insert.html">insert</a>, <a class="reference internal" href="./erase.html">erase</a>, <a class="reference internal" href="./clear.html">clear</a></p>
<p><a class="reference" href="./sequences.html">Sequences</a>, <a class="reference" href="./associative-sequence.html">Associative Sequence</a>, <a class="refentry reference" href="./insert.html"><tt class="refentry literal"><span class="pre">insert</span></tt></a>, <a class="refentry reference" href="./erase.html"><tt class="refentry literal"><span class="pre">erase</span></tt></a>, <a class="refentry reference" href="./clear.html"><tt class="refentry literal"><span class="pre">clear</span></tt></a></p>
<!-- modtime: November 13, 2004 00:49:10 +0000 -->
<!-- Sequences/Concepts//Integral Sequence Wrapper |90 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./associative-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./integral-sequence-wrapper.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./associative-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./integral-sequence-wrapper.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+35 -33
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Extensible Sequence</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,63 +15,63 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./concepts.html" class="navigation-link">Concepts</a> / <a href="./extensible-sequence.html" class="navigation-link">Extensible Sequence</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="extensible-sequence">
<h1><a class="toc-backref" href="./concepts.html#id1398">Extensible Sequence</a></h1>
<div class="section" id="id12">
<h1><a class="toc-backref" href="./concepts.html#id327" name="extensible-sequence">Extensible Sequence</a></h1>
<div class="section" id="extensible-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>An <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> is a sequence that supports insertion and removal of
<p>An <a class="reference" href="./extensible-sequence.html">Extensible Sequence</a> is a sequence that supports insertion and removal of
elements. Extensibility is orthogonal to sequence traversal characteristics.</p>
</div>
<div class="section" id="id13">
<div class="section" id="extensible-expression-requirements">
<h3><a class="subsection-title" href="#expression-requirements" name="expression-requirements">Expression requirements</a></h3>
<p>For any <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, its iterators <tt class="literal"><span class="pre">pos</span></tt> and <tt class="literal"><span class="pre">last</span></tt>,
<a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">r</span></tt>, and any type <tt class="literal"><span class="pre">x</span></tt>, the following expressions must
<p>For any <a class="reference" href="./extensible-sequence.html">Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, its iterators <tt class="literal"><span class="pre">pos</span></tt> and <tt class="literal"><span class="pre">last</span></tt>,
<a class="reference" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">r</span></tt>, and any type <tt class="literal"><span class="pre">x</span></tt>, the following expressions must
be valid:</p>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="39%" />
<col width="30%" />
<col width="30%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Type</th>
<th class="head">Complexity</th>
<tr><th>Expression</th>
<th>Type</th>
<th>Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;s,pos,x&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></td>
<td><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a></td>
<td>Unspecified</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./insert-range.html" class="identifier">insert_range</a>&lt;s,pos,r&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></td>
<td><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a></td>
<td>Unspecified</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a>&lt;s,pos&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></td>
<td><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a></td>
<td>Unspecified</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a>&lt;s,pos,last&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></td>
<td><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a></td>
<td>Unspecified</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./clear.html" class="identifier">clear</a>&lt;s&gt;::type</span></tt></td>
<td><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></td>
<td><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a></td>
<td>Constant time</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id14">
<div class="section" id="extensible-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="36%" />
<col width="64%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
<tr><th>Expression</th>
<th>Semantics</th>
</tr>
</thead>
<tbody valign="top">
@@ -76,51 +79,50 @@ be valid:</p>
<td>A new sequence, concept-identical to <tt class="literal"><span class="pre">s</span></tt>, of
the following elements:
[<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">pos</span></tt>), <tt class="literal"><span class="pre">x</span></tt>,
[<tt class="literal"><span class="pre">pos</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>); see <a class="reference internal" href="./insert.html">insert</a>.</td>
[<tt class="literal"><span class="pre">pos</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>); see <a class="refentry reference" href="./insert.html"><tt class="refentry literal"><span class="pre">insert</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./insert-range.html" class="identifier">insert_range</a>&lt;s,pos,r&gt;::type</span></tt></td>
<td>A new sequence, concept-identical to <tt class="literal"><span class="pre">s</span></tt>, of
the following elements:
[<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">pos</span></tt>),
[<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;r&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;r&gt;::type</span></tt>),
[<tt class="literal"><span class="pre">pos</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>); see <a class="reference internal" href="./insert-range.html">insert_range</a>.</td>
[<tt class="literal"><span class="pre">pos</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>); see <a class="refentry reference" href="./insert-range.html"><tt class="refentry literal"><span class="pre">insert_range</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a>&lt;s,pos&gt;::type</span></tt></td>
<td>A new sequence, concept-identical to <tt class="literal"><span class="pre">s</span></tt>, of
the following elements:
[<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">pos</span></tt>),
[<tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a>&lt;pos&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>); see <a class="reference internal" href="./erase.html">erase</a>.</td>
[<tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a>&lt;pos&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>); see <a class="refentry reference" href="./erase.html"><tt class="refentry literal"><span class="pre">erase</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a>&lt;s,pos,last&gt;::type</span></tt></td>
<td>A new sequence, concept-identical to <tt class="literal"><span class="pre">s</span></tt>, of
the following elements:
[<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre">pos</span></tt>),
[<tt class="literal"><span class="pre">last</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>); see <a class="reference internal" href="./erase.html">erase</a>.</td>
[<tt class="literal"><span class="pre">last</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>); see <a class="refentry reference" href="./erase.html"><tt class="refentry literal"><span class="pre">erase</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./clear.html" class="identifier">clear</a>&lt;s&gt;::type</span></tt></td>
<td>An empty sequence concept-identical to <tt class="literal"><span class="pre">s</span></tt>; see
<a class="reference internal" href="./clear.html">clear</a>.</td>
<a class="refentry reference" href="./clear.html"><tt class="refentry literal"><span class="pre">clear</span></tt></a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id15">
<div class="section" id="extensible-models">
<h3><a class="subsection-title" href="#models" name="models">Models</a></h3>
<ul class="simple">
<li><a class="reference internal" href="./vector.html">vector</a></li>
<li><a class="reference internal" href="./list.html">list</a></li>
<li><a class="refentry reference" href="./vector.html"><tt class="refentry literal"><span class="pre">vector</span></tt></a></li>
<li><a class="refentry reference" href="./list.html"><tt class="refentry literal"><span class="pre">list</span></tt></a></li>
</ul>
</div>
<div class="section" id="id16">
<div class="section" id="extensible-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a>, <a class="reference internal" href="./insert.html">insert</a>, <a class="reference internal" href="./insert-range.html">insert_range</a>, <a class="reference internal" href="./erase.html">erase</a>, <a class="reference internal" href="./clear.html">clear</a></p>
<p><a class="reference" href="./sequences.html">Sequences</a>, <a class="reference" href="./back-extensible-sequence.html">Back Extensible Sequence</a>, <a class="refentry reference" href="./insert.html"><tt class="refentry literal"><span class="pre">insert</span></tt></a>, <a class="refentry reference" href="./insert-range.html"><tt class="refentry literal"><span class="pre">insert_range</span></tt></a>, <a class="refentry reference" href="./erase.html"><tt class="refentry literal"><span class="pre">erase</span></tt></a>, <a class="refentry reference" href="./clear.html"><tt class="refentry literal"><span class="pre">clear</span></tt></a></p>
<!-- modtime: November 13, 2004 00:44:12 +0000 -->
<!-- Sequences/Concepts//Front Extensible Sequence |50 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./random-access-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./front-extensible-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./random-access-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./front-extensible-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+32 -30
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: filter_view</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./views.html" class="navigation-link">Views</a> / <a href="./filter-view.html" class="navigation-link">filter_view</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="filter-view">
<h1><a class="toc-backref" href="./views.html#id1418">filter_view</a></h1>
<div class="section" id="id126">
<h1><a class="toc-backref" href="./views.html#id346" name="filter-view">filter_view</a></h1>
<div class="section" id="filter-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -27,62 +30,62 @@ struct <a href="./filter-view.html" class="identifier">filter_view</a>
};
</pre>
</div>
<div class="section" id="id127">
<div class="section" id="filter-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>A view into a subset of <tt class="literal"><span class="pre">Sequence</span></tt>'s elements satisfying the predicate <tt class="literal"><span class="pre">Pred</span></tt>.</p>
</div>
<div class="section" id="id128">
<div class="section" id="filter-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/filter_view.hpp" class="header">boost/mpl/filter_view.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id129">
<div class="section" id="filter-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<ul class="simple">
<li><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></li>
<li><a class="reference" href="./forward-sequence.html">Forward Sequence</a></li>
</ul>
</div>
<div class="section" id="parameters">
<h3>Parameters</h3>
<table border="1" class="docutils table">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td><a class="reference" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to wrap.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Pred</span></tt></td>
<td>Unary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td>Unary <a class="reference" href="./lambda-expression.html">Lambda Expression</a></td>
<td>A filtering predicate.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id130">
<div class="section" id="filter-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>Semantics of an expression is defined only where it differs from, or is not
defined in <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>.</p>
<p>In the following table, <tt class="literal"><span class="pre">v</span></tt> is an instance of <tt class="literal"><span class="pre"><a href="./filter-view.html" class="identifier">filter_view</a></span></tt>, <tt class="literal"><span class="pre">s</span></tt> is an arbitrary
<a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <tt class="literal"><span class="pre">pred</span></tt> is an unary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a>.</p>
<table border="1" class="docutils table">
<p>Semantics of an expression is defined only where it differs from, or is not
defined in <a class="reference" href="./forward-sequence.html">Forward Sequence</a>.</p>
<p>In the following table, <tt class="literal"><span class="pre">v</span></tt> is an instance of <tt class="literal"><span class="pre"><a href="./filter-view.html" class="identifier">filter_view</a></span></tt>, <tt class="literal"><span class="pre">s</span></tt> is an arbitrary
<a class="reference" href="./forward-sequence.html">Forward Sequence</a>, <tt class="literal"><span class="pre">pred</span></tt> is an unary <a class="reference" href="./lambda-expression.html">Lambda Expression</a>.</p>
<table border="1" class="table">
<colgroup>
<col width="40%" />
<col width="60%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
<tr><th>Expression</th>
<th>Semantics</th>
</tr>
</thead>
<tbody valign="top">
@@ -91,19 +94,19 @@ defined in <a class="reference internal" href="./forward-sequence.html">Forward
<a href="./filter-view.html" class="identifier">filter_view</a>&lt;s,pred&gt;::type
</pre>
</td>
<td>A lazy <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> sequence of all the elements in
<td>A lazy <a class="reference" href="./forward-sequence.html">Forward Sequence</a> sequence of all the elements in
the range [<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>) that satisfy the predicate
<tt class="literal"><span class="pre">pred</span></tt>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;v&gt;::type</span></tt></td>
<td>The size of <tt class="literal"><span class="pre">v</span></tt>;
<tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;v&gt;::value</span> <span class="pre">==</span> <span class="pre"><a href="./count-if.html" class="identifier">count_if</a>&lt;s,pred&gt;::value</span></tt>;
linear complexity; see <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>.</td>
linear complexity; see <a class="reference" href="./forward-sequence.html">Forward Sequence</a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id131">
<div class="section" id="filter-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<p>Find the largest floating type in a sequence.</p>
<pre class="literal-block">
@@ -115,16 +118,15 @@ typedef <a href="./max-element.html" class="identifier">max_element</a>&lt;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./deref.html" class="identifier">deref</a>&lt;iter::base&gt;::type, long double > ));
</pre>
</div>
<div class="section" id="id132">
<div class="section" id="filter-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./views.html">Views</a>, <a class="reference internal" href="./transform-view.html">transform_view</a>, <a class="reference internal" href="./joint-view.html">joint_view</a>, <a class="reference internal" href="./zip-view.html">zip_view</a>, <a class="reference internal" href="./iterator-range.html">iterator_range</a></p>
<p><a class="reference" href="./sequences.html">Sequences</a>, <a class="reference" href="./views.html">Views</a>, <a class="refentry reference" href="./transform-view.html"><tt class="refentry literal"><span class="pre">transform_view</span></tt></a>, <a class="refentry reference" href="./joint-view.html"><tt class="refentry literal"><span class="pre">joint_view</span></tt></a>, <a class="refentry reference" href="./zip-view.html"><tt class="refentry literal"><span class="pre">zip_view</span></tt></a>, <a class="refentry reference" href="./iterator-range.html"><tt class="refentry literal"><span class="pre">iterator_range</span></tt></a></p>
<!-- modtime: November 10, 2004 04:42:12 +0000 -->
<!-- Sequences/Views//iterator_range -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./empty-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./iterator-range.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./empty-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./iterator-range.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./views.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+28 -27
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: find_if</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./querying-algorithms.html" class="navigation-link">Querying Algorithms</a> / <a href="./find-if.html" class="navigation-link">find_if</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="find-if">
<h1><a class="toc-backref" href="./querying-algorithms.html#id1476">find_if</a></h1>
<div class="section" id="id543">
<h1><a class="toc-backref" href="./querying-algorithms.html#id404" name="find-if">find_if</a></h1>
<div class="section" id="querying-find-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -26,55 +29,54 @@ struct <a href="./find-if.html" class="identifier">find_if</a>
};
</pre>
</div>
<div class="section" id="id544">
<div class="section" id="querying-find-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns an iterator to the first element in <tt class="literal"><span class="pre">Sequence</span></tt> that satisfies
<p>Returns an iterator to the first element in <tt class="literal"><span class="pre">Sequence</span></tt> that satisfies
the predicate <tt class="literal"><span class="pre">Pred</span></tt>.</p>
</div>
<div class="section" id="id545">
<div class="section" id="querying-find-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/find_if.hpp" class="header">boost/mpl/find_if.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id546">
<div class="section" id="querying-find-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="19%" />
<col width="38%" />
<col width="43%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td><a class="reference" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to search in.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Pred</span></tt></td>
<td>Unary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td>Unary <a class="reference" href="./lambda-expression.html">Lambda Expression</a></td>
<td>A search condition.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id547">
<div class="section" id="querying-find-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> and unary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">pred</span></tt>:</p>
<p>For any <a class="reference" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> and unary <a class="reference" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">pred</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./find-if.html" class="identifier">find_if</a>&lt;s,pred&gt;::type i;
typedef <a href="./find-if.html" class="identifier">find_if</a>&lt;s,pred&gt;::type i;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./forward-iterator.html">Forward Iterator</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">i</span></tt> is the first iterator in the range [<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>) such that</p>
<pre class="literal-block">
@@ -86,30 +88,29 @@ typedef <a href="./find-if.html" class="identifier">find_if</a>&lt;s,pred&gt;::t
</tbody>
</table>
</div>
<div class="section" id="id548">
<div class="section" id="querying-find-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. At most <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> applications of <tt class="literal"><span class="pre">pred</span></tt>.</p>
</div>
<div class="section" id="id549">
<div class="section" id="querying-find-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;char,int,unsigned,long,unsigned long&gt; types;
typedef <a href="./find-if.html" class="identifier">find_if</a>&lt;types, is_same&lt;<a href="./placeholders.html" class="identifier">_1</a>,unsigned&gt; &gt;::type iter;
typedef <a href="./find-if.html" class="identifier">find_if</a>&lt;types, is_same&lt;_1,unsigned&gt; &gt;::type iter;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./deref.html" class="identifier">deref</a>&lt;iter&gt;::type, unsigned &gt; ));
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( iter::pos::value, ==, 2 );
</pre>
</div>
<div class="section" id="id550">
<div class="section" id="querying-find-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./querying-algorithms.html">Querying Algorithms</a>, <a class="reference internal" href="./find.html">find</a>, <a class="reference internal" href="./count-if.html">count_if</a>, <a class="reference internal" href="./lower-bound.html">lower_bound</a></p>
<p><a class="reference" href="./querying-algorithms.html">Querying Algorithms</a>, <a class="refentry reference" href="./find.html"><tt class="refentry literal"><span class="pre">find</span></tt></a>, <a class="refentry reference" href="./count-if.html"><tt class="refentry literal"><span class="pre">count_if</span></tt></a>, <a class="refentry reference" href="./lower-bound.html"><tt class="refentry literal"><span class="pre">lower_bound</span></tt></a></p>
<!-- modtime: November 10, 2004 04:42:05 +0000 -->
<!-- Algorithms/Querying Algorithms//contains |30 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./find.html" class="navigation-link">Prev</a>&nbsp;<a href="./contains.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./find.html" class="navigation-link">Back</a>&nbsp;<a href="./contains.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+24 -23
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: find</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./querying-algorithms.html" class="navigation-link">Querying Algorithms</a> / <a href="./find.html" class="navigation-link">find</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="find">
<h1><a class="toc-backref" href="./querying-algorithms.html#id1475">find</a></h1>
<div class="section" id="id535">
<h1><a class="toc-backref" href="./querying-algorithms.html#id403" name="find">find</a></h1>
<div class="section" id="find-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -26,33 +29,33 @@ struct <a href="./find.html" class="identifier">find</a>
};
</pre>
</div>
<div class="section" id="id536">
<div class="section" id="find-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns an iterator to the first occurrence of type <tt class="literal"><span class="pre">T</span></tt> in a <tt class="literal"><span class="pre">Sequence</span></tt>.</p>
</div>
<div class="section" id="id537">
<div class="section" id="find-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/find.hpp" class="header">boost/mpl/find.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id538">
<div class="section" id="find-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="21%" />
<col width="32%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td><a class="reference" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to search in.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">T</span></tt></td>
@@ -62,18 +65,17 @@ struct <a href="./find.html" class="identifier">find</a>
</tbody>
</table>
</div>
<div class="section" id="id539">
<div class="section" id="find-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> and arbitrary type <tt class="literal"><span class="pre">t</span></tt>:</p>
<p>For any <a class="reference" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> and arbitrary type <tt class="literal"><span class="pre">t</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./find.html" class="identifier">find</a>&lt;s,t&gt;::type i;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./forward-iterator.html">Forward Iterator</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -84,11 +86,11 @@ typedef <a href="./find-if.html" class="identifier">find_if</a>&lt;s, is_same&lt
</tbody>
</table>
</div>
<div class="section" id="id540">
<div class="section" id="find-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. At most <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> comparisons for identity.</p>
</div>
<div class="section" id="id541">
<div class="section" id="find-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;char,int,unsigned,long,unsigned long&gt; types;
@@ -98,16 +100,15 @@ typedef <a href="./find.html" class="identifier">find</a>&lt;types,unsigned&gt;:
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( iter::pos::value, ==, 2 );
</pre>
</div>
<div class="section" id="id542">
<div class="section" id="find-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./querying-algorithms.html">Querying Algorithms</a>, <a class="reference internal" href="./contains.html">contains</a>, <a class="reference internal" href="./find-if.html">find_if</a>, <a class="reference internal" href="./count.html">count</a>, <a class="reference internal" href="./lower-bound.html">lower_bound</a></p>
<p><a class="reference" href="./querying-algorithms.html">Querying Algorithms</a>, <a class="refentry reference" href="./contains.html"><tt class="refentry literal"><span class="pre">contains</span></tt></a>, <a class="refentry reference" href="./find-if.html"><tt class="refentry literal"><span class="pre">find_if</span></tt></a>, <a class="refentry reference" href="./count.html"><tt class="refentry literal"><span class="pre">count</span></tt></a>, <a class="refentry reference" href="./lower-bound.html"><tt class="refentry literal"><span class="pre">lower_bound</span></tt></a></p>
<!-- modtime: November 13, 2004 01:50:50 +0000 -->
<!-- Algorithms/Querying Algorithms//find_if |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Prev</a>&nbsp;<a href="./find-if.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./find-if.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./querying-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+30 -33
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: fold</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./iteration-algorithms.html" class="navigation-link">Iteration Algorithms</a> / <a href="./fold.html" class="navigation-link">fold</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="fold">
<h1><a class="toc-backref" href="./iteration-algorithms.html#id1469">fold</a></h1>
<div class="section" id="id493">
<h1><a class="toc-backref" href="./iteration-algorithms.html#id397" name="fold">fold</a></h1>
<div class="section" id="fold-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -27,35 +30,35 @@ struct <a href="./fold.html" class="identifier">fold</a>
};
</pre>
</div>
<div class="section" id="id494">
<div class="section" id="fold-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the result of the successive application of binary <tt class="literal"><span class="pre">ForwardOp</span></tt> to the
result of the previous <tt class="literal"><span class="pre">ForwardOp</span></tt> invocation (<tt class="literal"><span class="pre">State</span></tt> if it's the first call)
<p>Returns the result of the successive application of binary <tt class="literal"><span class="pre">ForwardOp</span></tt> to the
result of the previous <tt class="literal"><span class="pre">ForwardOp</span></tt> invocation (<tt class="literal"><span class="pre">State</span></tt> if it's the first call)
and every element of the sequence in the range [<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;Sequence&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;Sequence&gt;::type</span></tt>) in order.</p>
</div>
<div class="section" id="id495">
<div class="section" id="fold-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/fold.hpp" class="header">boost/mpl/fold.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id496">
<div class="section" id="fold-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="15%" />
<col width="32%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td><a class="reference" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to iterate.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">State</span></tt></td>
@@ -64,66 +67,60 @@ and every element of the sequence in the range [<tt class="literal"><span class=
application.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">ForwardOp</span></tt></td>
<td>Binary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td>Binary <a class="reference" href="./lambda-expression.html">Lambda Expression</a></td>
<td>The operation to be executed on forward
traversal.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id497">
<div class="section" id="fold-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, binary <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">op</span></tt>, and arbitrary type <tt class="literal"><span class="pre">state</span></tt>:</p>
<p>For any <a class="reference" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, binary <a class="reference" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">op</span></tt>, and arbitrary type <tt class="literal"><span class="pre">state</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./fold.html" class="identifier">fold</a>&lt;s,state,op&gt;::type t;
typedef <a href="./fold.html" class="identifier">fold</a>&lt;s,state,op&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">A type.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
typedef <a href="./iter-fold.html" class="identifier">iter_fold</a>&lt;
s
, state
, apply_wrap2&lt; <a href="./lambda.html" class="identifier">lambda</a>&lt;op&gt;::type, <a href="./placeholders.html" class="identifier">_1</a>, <a href="./deref.html" class="identifier">deref</a>&lt;<a href="./placeholders.html" class="identifier">_2</a>&gt; &gt;
&gt;::type t;
typedef <a href="./iter-fold.html" class="identifier">iter_fold</a>&lt; s,state,<a href="./apply.html" class="identifier">apply</a>&lt;op,_1,<a href="./deref.html" class="identifier">deref</a>&lt;_2&gt; &gt; &gt;::type t;
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id498">
<div class="section" id="fold-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. Exactly <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> applications of <tt class="literal"><span class="pre">op</span></tt>.</p>
</div>
<div class="section" id="id499">
<div class="section" id="fold-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./vector.html" class="identifier">vector</a>&lt;long,float,short,double,float,long,long double&gt; types;
typedef <a href="./fold.html" class="identifier">fold</a>&lt;
types
, <a href="./int.html" class="identifier">int_</a>&lt;0&gt;
, <a href="./if.html" class="identifier">if_</a>&lt; is_float&lt;<a href="./placeholders.html" class="identifier">_2</a>&gt;,<a href="./next.html" class="identifier">next</a>&lt;<a href="./placeholders.html" class="identifier">_1</a>&gt;,<a href="./placeholders.html" class="identifier">_1</a> &gt;
, <a href="./if.html" class="identifier">if_</a>&lt; is_float&lt;_2&gt;,<a href="./next.html" class="identifier">next</a>&lt;_1&gt;,_1 &gt;
&gt;::type number_of_floats;
<a href="./assert-relation.html" class="identifier">BOOST_MPL_ASSERT_RELATION</a>( number_of_floats::value, ==, 4 );
</pre>
</div>
<div class="section" id="id500">
<div class="section" id="fold-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./algorithms.html">Algorithms</a>, <a class="reference internal" href="./accumulate.html">accumulate</a>, <a class="reference internal" href="./reverse-fold.html">reverse_fold</a>, <a class="reference internal" href="./iter-fold.html">iter_fold</a>, <a class="reference internal" href="./reverse-iter-fold.html">reverse_iter_fold</a>, <a class="reference internal" href="./copy.html">copy</a>, <a class="reference internal" href="./copy-if.html">copy_if</a></p>
<p><a class="reference" href="./algorithms.html">Algorithms</a>, <a class="refentry reference" href="./accumulate.html"><tt class="refentry literal"><span class="pre">accumulate</span></tt></a>, <a class="refentry reference" href="./reverse-fold.html"><tt class="refentry literal"><span class="pre">reverse_fold</span></tt></a>, <a class="refentry reference" href="./iter-fold.html"><tt class="refentry literal"><span class="pre">iter_fold</span></tt></a>, <a class="refentry reference" href="./reverse-iter-fold.html"><tt class="refentry literal"><span class="pre">reverse_iter_fold</span></tt></a>, <a class="refentry reference" href="./copy.html"><tt class="refentry literal"><span class="pre">copy</span></tt></a>, <a class="refentry reference" href="./copy-if.html"><tt class="refentry literal"><span class="pre">copy_if</span></tt></a></p>
<!-- modtime: November 10, 2004 04:46:33 +0000 -->
<!-- Algorithms/Iteration Algorithms//iter_fold -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./iteration-algorithms.html" class="navigation-link">Prev</a>&nbsp;<a href="./iter-fold.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./iter-fold.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iteration-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+35 -35
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: for_each</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./runtime-algorithms.html" class="navigation-link">Runtime Algorithms</a> / <a href="./for-each.html" class="navigation-link">for_each</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="for-each">
<h1><a class="toc-backref" href="./runtime-algorithms.html#id1509">for_each</a></h1>
<div class="section" id="id812">
<h1><a class="toc-backref" href="./runtime-algorithms.html#id437" name="for-each">for_each</a></h1>
<div class="section" id="for-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -30,7 +33,7 @@ template&lt;
void <a href="./for-each.html" class="identifier">for_each</a>( F f );
</pre>
</div>
<div class="section" id="id813">
<div class="section" id="for-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p><tt class="literal"><span class="pre"><a href="./for-each.html" class="identifier">for_each</a></span></tt> is a family of overloaded function templates:</p>
<ul class="simple">
@@ -41,69 +44,68 @@ object <tt class="literal"><span class="pre">f</span></tt> to the result of the
every element in the [<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;Sequence&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;Sequence&gt;::type</span></tt>) range.</li>
</ul>
</div>
<div class="section" id="id814">
<div class="section" id="for-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/for_each.hpp" class="header">boost/mpl/for_each.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id815">
<div class="section" id="for-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="21%" />
<col width="39%" />
<col width="39%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td><a class="reference" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to iterate.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">TransformOp</span></tt></td>
<td><a class="reference internal" href="./lambda-expression.html">Lambda Expression</a></td>
<td><a class="reference" href="./lambda-expression.html">Lambda Expression</a></td>
<td>A transformation.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">f</span></tt></td>
<td>An <a class="reference external" href="http://www.sgi.com/tech/stl/UnaryFunction.html" target="_top">unary function object</a></td>
<td>An <a class="reference" href="http://www.sgi.com/tech/stl/UnaryFunction.html" target="_top">unary function object</a></td>
<td>A runtime operation to apply.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id816">
<div class="section" id="for-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, <a class="reference internal" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">op</span></tt> , and an
<a class="reference external" href="http://www.sgi.com/tech/stl/UnaryFunction.html" target="_top">unary function object</a> <tt class="literal"><span class="pre">f</span></tt>:</p>
<p>For any <a class="reference" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, <a class="reference" href="./lambda-expression.html">Lambda Expression</a> <tt class="literal"><span class="pre">op</span></tt> , and an
<a class="reference" href="http://www.sgi.com/tech/stl/UnaryFunction.html" target="_top">unary function object</a> <tt class="literal"><span class="pre">f</span></tt>:</p>
<pre class="literal-block">
<a href="./for-each.html" class="identifier">for_each</a>&lt;s&gt;( f );
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">void</span></tt></p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><tt class="literal"><span class="pre">void</span></tt></td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="literal-block">
typedef <a href="./begin.html" class="identifier">begin</a>&lt;Sequence&gt;::type i<sub>1</sub>;
<a class="reference external" href="http://www.boost.org/libs/utility/value_init.htm" target="_top">value_initialized</a>&lt; <a href="./deref.html" class="identifier">deref</a>&lt;i<sub>1</sub>&gt;::type &gt; x<sub>1</sub>;
<a class="reference" href="http://www.boost.org/libs/utility/value_init.htm" target="_top"><a href="./value-initialized.html" class="identifier">value_initialized</a></a>&lt; <a href="./deref.html" class="identifier">deref</a>&lt;i<sub>1</sub>&gt;::type &gt; x<sub>1</sub>;
f(boost::get(x<sub>1</sub>));
typedef <a href="./next.html" class="identifier">next</a>&lt;i<sub>1</sub>&gt;::type i<sub>2</sub>;
<a class="reference external" href="http://www.boost.org/libs/utility/value_init.htm" target="_top">value_initialized</a>&lt; <a href="./deref.html" class="identifier">deref</a>&lt;i<sub>2</sub>&gt;::type &gt; x<sub>2</sub>;
<a class="reference" href="http://www.boost.org/libs/utility/value_init.htm" target="_top"><a href="./value-initialized.html" class="identifier">value_initialized</a></a>&lt; <a href="./deref.html" class="identifier">deref</a>&lt;i<sub>2</sub>&gt;::type &gt; x<sub>2</sub>;
f(boost::get(x<sub>2</sub>));
<em>...</em>
<a class="reference external" href="http://www.boost.org/libs/utility/value_init.htm" target="_top">value_initialized</a>&lt; <a href="./deref.html" class="identifier">deref</a>&lt;i<sub>n</sub>&gt;::type &gt; x<sub>n</sub>;
<a class="reference" href="http://www.boost.org/libs/utility/value_init.htm" target="_top"><a href="./value-initialized.html" class="identifier">value_initialized</a></a>&lt; <a href="./deref.html" class="identifier">deref</a>&lt;i<sub>n</sub>&gt;::type &gt; x<sub>n</sub>;
f(boost::get(x<sub>n</sub>));
typedef <a href="./next.html" class="identifier">next</a>&lt;i<sub>n</sub>&gt;::type last;
typedef <a href="./next.html" class="identifier">next</a>&lt;i<sub>n</sub>&gt;::type last;
</pre>
<p class="last">where <tt class="literal"><span class="pre">n</span> <span class="pre">==</span> <span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> and <tt class="literal"><span class="pre">last</span></tt> is identical to
<tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>; no effect if <tt class="literal"><span class="pre"><a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt>.</p>
@@ -114,34 +116,33 @@ typedef <a href="./next.html" class="identifier">next</a>&lt;i<sub>n</sub>&gt;::
<pre class="literal-block">
<a href="./for-each.html" class="identifier">for_each</a>&lt;s,op&gt;( f );
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre">void</span></tt></p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><tt class="literal"><span class="pre">void</span></tt></td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
<a href="./for-each.html" class="identifier">for_each</a>&lt; <a href="./transform-view.html" class="identifier">transform_view</a>&lt;s,op&gt; &gt;( f );
<a href="./for-each.html" class="identifier">for_each</a>&lt; tranform_view&lt;s,op&gt; &gt;( f );
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id817">
<div class="section" id="for-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Linear. Exactly <tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::value</span></tt> applications of <tt class="literal"><span class="pre">op</span></tt> and <tt class="literal"><span class="pre">f</span></tt>.</p>
</div>
<div class="section" id="id818">
<div class="section" id="for-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
struct value_printer
{
template&lt; typename U &gt; void operator()(U x)
{
std::cout &lt;&lt; x &lt;&lt; '\n';
std::cout &lt;&lt; x &lt;&lt; 'n';
}
};
@@ -151,15 +152,14 @@ int main()
}
</pre>
</div>
<div class="section" id="id819">
<div class="section" id="for-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./runtime-algorithms.html">Runtime Algorithms</a>, <a class="reference internal" href="./views.html">Views</a>, <a class="reference internal" href="./transform-view.html">transform_view</a></p>
<p><a class="reference" href="./runtime-algorithms.html">Runtime Algorithms</a>, <a class="reference" href="./views.html">Views</a>, <a class="refentry reference" href="./transform-view.html"><tt class="refentry literal"><span class="pre">transform_view</span></tt></a></p>
<!-- modtime: March 29, 2007 07:29:32 +0000 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./runtime-algorithms.html" class="navigation-link">Prev</a>&nbsp;<a href="./metafunctions.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./runtime-algorithms.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+38 -36
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Forward Iterator</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,48 +15,48 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./iterators.html" class="navigation-link">Iterators</a> / <a href="./iterators-concepts.html" class="navigation-link">Concepts</a> / <a href="./forward-iterator.html" class="navigation-link">Forward Iterator</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="forward-iterator">
<h1><a class="toc-backref" href="./iterators-concepts.html#id1450">Forward Iterator</a></h1>
<div class="section" id="id384">
<h1><a class="toc-backref" href="./iterators-concepts.html#id378" name="forward-iterator">Forward Iterator</a></h1>
<div class="section" id="forward-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>A <a class="reference internal" href="./forward-iterator.html">Forward Iterator</a> <tt class="literal"><span class="pre">i</span></tt> is a type that represents a positional reference
to an element of a <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>. It allows to access the element through
a dereference operation, and provides a way to obtain an iterator to
<p>A <a class="reference" href="./forward-iterator.html">Forward Iterator</a> <tt class="literal"><span class="pre">i</span></tt> is a type that represents a positional reference
to an element of a <a class="reference" href="./forward-sequence.html">Forward Sequence</a>. It allows to access the element through
a dereference operation, and provides a way to obtain an iterator to
the next element in a sequence.</p>
<!-- A [Forward Iterator] guarantees a linear traversal over
<!-- A [Forward Iterator] guarantees a linear traversal over
the sequence. -->
</div>
<div class="section" id="id385">
<div class="section" id="forward-definitions">
<h3><a class="subsection-title" href="#definitions" name="definitions">Definitions</a></h3>
<ul class="simple">
<li>An iterator can be <cite>dereferenceable</cite>, meaning that <tt class="literal"><span class="pre"><a href="./deref.html" class="identifier">deref</a>&lt;i&gt;::type</span></tt>
is a well-defined expression.</li>
<li>An iterator is <cite>past-the-end</cite> if it points beyond the last element of a
<li>An iterator is <cite>past-the-end</cite> if it points beyond the last element of a
sequence; past-the-end iterators are non-dereferenceable.</li>
<li>An iterator <tt class="literal"><span class="pre">i</span></tt> is <cite>incrementable</cite> if there is a &quot;next&quot; iterator, that
is, if <tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a>&lt;i&gt;::type</span></tt> expression is well-defined; past-the-end iterators are
<li>An iterator <tt class="literal"><span class="pre">i</span></tt> is <cite>incrementable</cite> if there is a &quot;next&quot; iterator, that
is, if <tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a>&lt;i&gt;::type</span></tt> expression is well-defined; past-the-end iterators are
not incrementable.</li>
<li>Two iterators into the same sequence are <cite>equivalent</cite> if they have the same
type.</li>
<li>An iterator <tt class="literal"><span class="pre">j</span></tt> is <cite>reachable</cite> from an iterator <tt class="literal"><span class="pre">i</span></tt> if , after recursive
application of <tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a></span></tt> metafunction to <tt class="literal"><span class="pre">i</span></tt> a finite number of times, <tt class="literal"><span class="pre">i</span></tt>
<li>An iterator <tt class="literal"><span class="pre">j</span></tt> is <cite>reachable</cite> from an iterator <tt class="literal"><span class="pre">i</span></tt> if , after recursive
application of <tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a></span></tt> metafunction to <tt class="literal"><span class="pre">i</span></tt> a finite number of times, <tt class="literal"><span class="pre">i</span></tt>
is equivalent to <tt class="literal"><span class="pre">j</span></tt>.</li>
<li>The notation [<tt class="literal"><span class="pre">i</span></tt>,<tt class="literal"><span class="pre">j</span></tt>) refers to a <cite>range</cite> of iterators beginning with
<li>The notation [<tt class="literal"><span class="pre">i</span></tt>,<tt class="literal"><span class="pre">j</span></tt>) refers to a <cite>range</cite> of iterators beginning with
<tt class="literal"><span class="pre">i</span></tt> and up to but not including <tt class="literal"><span class="pre">j</span></tt>.</li>
<li>The range [<tt class="literal"><span class="pre">i</span></tt>,<tt class="literal"><span class="pre">j</span></tt>) is a <cite>valid range</cite> if <tt class="literal"><span class="pre">j</span></tt> is reachable from <tt class="literal"><span class="pre">i</span></tt>.</li>
</ul>
</div>
<div class="section" id="id386">
<div class="section" id="forward-expression-requirements">
<h3><a class="subsection-title" href="#expression-requirements" name="expression-requirements">Expression requirements</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="25%" />
<col width="46%" />
<col width="29%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Type</th>
<th class="head">Complexity</th>
<tr><th>Expression</th>
<th>Type</th>
<th>Complexity</th>
</tr>
</thead>
<tbody valign="top">
@@ -62,23 +65,23 @@ is equivalent to <tt class="literal"><span class="pre">j</span></tt>.</li>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a>&lt;i&gt;::type</span></tt></td>
<td><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></td>
<td><a class="reference" href="./forward-iterator.html">Forward Iterator</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre">i::category</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a>, convertible
<td><a class="reference" href="./integral-constant.html">Integral Constant</a>, convertible
to <tt class="literal"><span class="pre">forward_iterator_tag</span></tt></td>
<td>Constant time</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id387">
<div class="section" id="forward-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<pre class="literal-block">
typedef <a href="./deref.html" class="identifier">deref</a>&lt;i&gt;::type j;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
@@ -92,7 +95,7 @@ typedef <a href="./deref.html" class="identifier">deref</a>&lt;i&gt;::type j;
<pre class="literal-block">
typedef <a href="./next.html" class="identifier">next</a>&lt;i&gt;::type j;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
@@ -108,7 +111,7 @@ typedef <a href="./next.html" class="identifier">next</a>&lt;i&gt;::type j;
<pre class="literal-block">
typedef i::category c;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
@@ -117,32 +120,31 @@ typedef i::category c;
</tbody>
</table>
</div>
<div class="section" id="id388">
<div class="section" id="forward-invariants">
<h3><a class="subsection-title" href="#invariants" name="invariants">Invariants</a></h3>
<p>For any forward iterators <tt class="literal"><span class="pre">i</span></tt> and <tt class="literal"><span class="pre">j</span></tt> the following invariants always hold:</p>
<ul class="simple">
<li><tt class="literal"><span class="pre">i</span></tt> and <tt class="literal"><span class="pre">j</span></tt> are equivalent if and only if they are pointing to the same
<li><tt class="literal"><span class="pre">i</span></tt> and <tt class="literal"><span class="pre">j</span></tt> are equivalent if and only if they are pointing to the same
element.</li>
<li>If <tt class="literal"><span class="pre">i</span></tt> is dereferenceable, and <tt class="literal"><span class="pre">j</span></tt> is equivalent to <tt class="literal"><span class="pre">i</span></tt>, then <tt class="literal"><span class="pre">j</span></tt> is
<li>If <tt class="literal"><span class="pre">i</span></tt> is dereferenceable, and <tt class="literal"><span class="pre">j</span></tt> is equivalent to <tt class="literal"><span class="pre">i</span></tt>, then <tt class="literal"><span class="pre">j</span></tt> is
dereferenceable as well.</li>
<li>If <tt class="literal"><span class="pre">i</span></tt> and <tt class="literal"><span class="pre">j</span></tt> are equivalent and dereferenceable, then <tt class="literal"><span class="pre"><a href="./deref.html" class="identifier">deref</a>&lt;i&gt;::type</span></tt>
<li>If <tt class="literal"><span class="pre">i</span></tt> and <tt class="literal"><span class="pre">j</span></tt> are equivalent and dereferenceable, then <tt class="literal"><span class="pre"><a href="./deref.html" class="identifier">deref</a>&lt;i&gt;::type</span></tt>
and <tt class="literal"><span class="pre"><a href="./deref.html" class="identifier">deref</a>&lt;j&gt;::type</span></tt> are identical.</li>
<li>If <tt class="literal"><span class="pre">i</span></tt> is incrementable, and <tt class="literal"><span class="pre">j</span></tt> is equivalent to <tt class="literal"><span class="pre">i</span></tt>, then <tt class="literal"><span class="pre">j</span></tt> is
<li>If <tt class="literal"><span class="pre">i</span></tt> is incrementable, and <tt class="literal"><span class="pre">j</span></tt> is equivalent to <tt class="literal"><span class="pre">i</span></tt>, then <tt class="literal"><span class="pre">j</span></tt> is
incrementable as well.</li>
<li>If <tt class="literal"><span class="pre">i</span></tt> and <tt class="literal"><span class="pre">j</span></tt> are equivalent and incrementable, then <tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a>&lt;i&gt;::type</span></tt>
<li>If <tt class="literal"><span class="pre">i</span></tt> and <tt class="literal"><span class="pre">j</span></tt> are equivalent and incrementable, then <tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a>&lt;i&gt;::type</span></tt>
and <tt class="literal"><span class="pre"><a href="./next.html" class="identifier">next</a>&lt;j&gt;::type</span></tt> are equivalent.</li>
</ul>
</div>
<div class="section" id="id389">
<div class="section" id="forward-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./iterators.html">Iterators</a>, <a class="reference internal" href="./bidirectional-iterator.html">Bidirectional Iterator</a>, <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./deref.html">deref</a>, <a class="reference internal" href="./next.html">next</a></p>
<p><a class="reference" href="./iterators.html">Iterators</a>, <a class="reference" href="./bidirectional-iterator.html">Bidirectional Iterator</a>, <a class="reference" href="./forward-sequence.html">Forward Sequence</a>, <a class="refentry reference" href="./deref.html"><tt class="refentry literal"><span class="pre">deref</span></tt></a>, <a class="refentry reference" href="./next.html"><tt class="refentry literal"><span class="pre">next</span></tt></a></p>
<!-- modtime: November 13, 2004 01:34:24 +0000 -->
<!-- Iterators/Concepts//Bidirectional Iterator |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./iterators-concepts.html" class="navigation-link">Prev</a>&nbsp;<a href="./bidirectional-iterator.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./bidirectional-iterator.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./iterators-concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+47 -45
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Forward Sequence</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,54 +15,54 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./concepts.html" class="navigation-link">Concepts</a> / <a href="./forward-sequence.html" class="navigation-link">Forward Sequence</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="forward-sequence">
<h1><a class="toc-backref" href="./concepts.html#id1395">Forward Sequence</a></h1>
<h1><a class="toc-backref" href="./concepts.html#id324" name="forward-sequence">Forward Sequence</a></h1>
<div class="section" id="description">
<h3>Description</h3>
<p>A <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> is an MPL concept representing a compile-time sequence of
elements. Sequence elements are
types, and are accessible through <a class="reference internal" href="./iterators.html">Iterators</a>. The <a class="reference internal" href="./begin.html">begin</a> and <a class="reference internal" href="./end.html">end</a> metafunctions
provide iterators delimiting the range of the sequence
elements. A sequence guarantees that its elements are arranged in a definite,
but possibly unspecified, order. Every MPL sequence is a <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>.</p>
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>A <a class="reference" href="./forward-sequence.html">Forward Sequence</a> is an MPL concept representing a compile-time sequence of
elements. Sequence elements are
types, and are accessible through <a class="reference" href="./iterators.html">Iterators</a>. The <a class="refentry reference" href="./begin.html"><tt class="refentry literal"><span class="pre">begin</span></tt></a> and <a class="refentry reference" href="./end.html"><tt class="refentry literal"><span class="pre">end</span></tt></a> metafunctions
provide iterators delimiting the range of the sequence
elements. A sequence guarantees that its elements are arranged in a definite,
but possibly unspecified, order. Every MPL sequence is a <a class="reference" href="./forward-sequence.html">Forward Sequence</a>.</p>
</div>
<div class="section" id="definitions">
<h3>Definitions</h3>
<h3><a class="subsection-title" href="#definitions" name="definitions">Definitions</a></h3>
<ul class="simple">
<li>The <em>size</em> of a sequence is the number of elements it contains. The size is a
<li>The <em>size</em> of a sequence is the number of elements it contains. The size is a
nonnegative number.</li>
<li>A sequence is <em>empty</em> if its size is zero.</li>
</ul>
</div>
<div class="section" id="expression-requirements">
<h3>Expression requirements</h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> the following expressions must be valid:</p>
<table border="1" class="docutils table">
<h3><a class="subsection-title" href="#expression-requirements" name="expression-requirements">Expression requirements</a></h3>
<p>For any <a class="reference" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> the following expressions must be valid:</p>
<table border="1" class="table">
<colgroup>
<col width="30%" />
<col width="39%" />
<col width="30%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Type</th>
<th class="head">Complexity</th>
<tr><th>Expression</th>
<th>Type</th>
<th>Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt></td>
<td><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></td>
<td><a class="reference" href="./forward-iterator.html">Forward Iterator</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt></td>
<td><a class="reference internal" href="./forward-iterator.html">Forward Iterator</a></td>
<td><a class="reference" href="./forward-iterator.html">Forward Iterator</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::type</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td><a class="reference" href="./integral-constant.html">Integral Constant</a></td>
<td>Unspecified</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::type</span></tt></td>
<td>Boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td>Boolean <a class="reference" href="./integral-constant.html">Integral Constant</a></td>
<td>Constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./front.html" class="identifier">front</a>&lt;s&gt;::type</span></tt></td>
@@ -70,68 +73,67 @@ nonnegative number.</li>
</table>
</div>
<div class="section" id="expression-semantics">
<h3>Expression semantics</h3>
<table border="1" class="docutils table">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<table border="1" class="table">
<colgroup>
<col width="28%" />
<col width="72%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
<tr><th>Expression</th>
<th>Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt></td>
<td>An iterator to the first element of the sequence; see <a class="reference internal" href="./begin.html">begin</a>.</td>
<td>An iterator to the first element of the sequence; see <a class="refentry reference" href="./begin.html"><tt class="refentry literal"><span class="pre">begin</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt></td>
<td>A past-the-end iterator to the sequence; see <a class="reference internal" href="./end.html">end</a>.</td>
<td>A past-the-end iterator to the sequence; see <a class="refentry reference" href="./end.html"><tt class="refentry literal"><span class="pre">end</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./size.html" class="identifier">size</a>&lt;s&gt;::type</span></tt></td>
<td>The size of the sequence; see <a class="reference internal" href="./size.html">size</a>.</td>
<td>The size of the sequence; see <a class="refentry reference" href="./size.html"><tt class="refentry literal"><span class="pre">size</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::type</span></tt></td>
<td>A boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c</span></tt> such that
<tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and only if the sequence is empty; see <a class="reference internal" href="./empty.html">empty</a>.</td>
<td>A boolean <a class="reference" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c</span></tt> such that
<tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and only if the sequence is empty; see <a class="refentry reference" href="./empty.html"><tt class="refentry literal"><span class="pre">empty</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./front.html" class="identifier">front</a>&lt;s&gt;::type</span></tt></td>
<td>The first element in the sequence; see <a class="reference internal" href="./front.html">front</a>.</td>
<td>The first element in the sequence; see <a class="refentry reference" href="./front.html"><tt class="refentry literal"><span class="pre">front</span></tt></a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="invariants">
<h3>Invariants</h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> the following invariants always hold:</p>
<h3><a class="subsection-title" href="#invariants" name="invariants">Invariants</a></h3>
<p>For any <a class="reference" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt> the following invariants always hold:</p>
<ul class="simple">
<li>[<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>) is always a valid range.</li>
<li>An algorithm that iterates through the range [<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>)
<li>An algorithm that iterates through the range [<tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt>, <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt>)
will pass through every element of <tt class="literal"><span class="pre">s</span></tt> exactly once.</li>
<li><tt class="literal"><span class="pre"><a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type</span></tt> is identical to <tt class="literal"><span class="pre"><a href="./end.html" class="identifier">end</a>&lt;s&gt;::type</span></tt> if and only if <tt class="literal"><span class="pre">s</span></tt> is empty.</li>
<li>Two different iterations through <tt class="literal"><span class="pre">s</span></tt> will access its elements in the same order.</li>
</ul>
</div>
<div class="section" id="models">
<h3>Models</h3>
<h3><a class="subsection-title" href="#models" name="models">Models</a></h3>
<ul class="simple">
<li><a class="reference internal" href="./vector.html">vector</a></li>
<li><a class="reference internal" href="./map.html">map</a></li>
<li><a class="reference internal" href="./range-c.html">range_c</a></li>
<li><a class="reference internal" href="./iterator-range.html">iterator_range</a></li>
<li><a class="reference internal" href="./filter-view.html">filter_view</a></li>
<li><a class="refentry reference" href="./vector.html"><tt class="refentry literal"><span class="pre">vector</span></tt></a></li>
<li><a class="refentry reference" href="./map.html"><tt class="refentry literal"><span class="pre">map</span></tt></a></li>
<li><a class="refentry reference" href="./range-c.html"><tt class="refentry literal"><span class="pre">range_c</span></tt></a></li>
<li><a class="refentry reference" href="./iterator-range.html"><tt class="refentry literal"><span class="pre">iterator_range</span></tt></a></li>
<li><a class="refentry reference" href="./filter-view.html"><tt class="refentry literal"><span class="pre">filter_view</span></tt></a></li>
</ul>
</div>
<div class="section" id="see-also">
<h3>See also</h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./bidirectional-sequence.html">Bidirectional Sequence</a>, <a class="reference internal" href="./forward-iterator.html">Forward Iterator</a>, <a class="reference internal" href="./begin.html">begin</a> / <a class="reference internal" href="./end.html">end</a>, <a class="reference internal" href="./size.html">size</a>, <a class="reference internal" href="./empty.html">empty</a>, <a class="reference internal" href="./front.html">front</a></p>
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference" href="./sequences.html">Sequences</a>, <a class="reference" href="./bidirectional-sequence.html">Bidirectional Sequence</a>, <a class="reference" href="./forward-iterator.html">Forward Iterator</a>, <a class="refentry reference" href="./begin.html"><tt class="refentry literal"><span class="pre">begin</span></tt></a> / <a class="refentry reference" href="./end.html"><tt class="refentry literal"><span class="pre">end</span></tt></a>, <a class="refentry reference" href="./size.html"><tt class="refentry literal"><span class="pre">size</span></tt></a>, <a class="refentry reference" href="./empty.html"><tt class="refentry literal"><span class="pre">empty</span></tt></a>, <a class="refentry reference" href="./front.html"><tt class="refentry literal"><span class="pre">front</span></tt></a></p>
<!-- modtime: November 13, 2004 00:38:50 +0000 -->
<!-- Sequences/Concepts//Bidirectional Sequence |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Prev</a>&nbsp;<a href="./bidirectional-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./bidirectional-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+33 -31
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: Front Extensible Sequence</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,39 +15,39 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./concepts.html" class="navigation-link">Concepts</a> / <a href="./front-extensible-sequence.html" class="navigation-link">Front Extensible Sequence</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="front-extensible-sequence">
<h1><a class="toc-backref" href="./concepts.html#id1399">Front Extensible Sequence</a></h1>
<div class="section" id="id17">
<h1><a class="toc-backref" href="./concepts.html#id328" name="front-extensible-sequence">Front Extensible Sequence</a></h1>
<div class="section" id="front-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>A <a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a> is an <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a> that supports amortized constant
<p>A <a class="reference" href="./front-extensible-sequence.html">Front Extensible Sequence</a> is an <a class="reference" href="./extensible-sequence.html">Extensible Sequence</a> that supports amortized constant
time insertion and removal operations at the beginning.</p>
</div>
<div class="section" id="id18">
<div class="section" id="front-refinement-of">
<h3><a class="subsection-title" href="#refinement-of" name="refinement-of">Refinement of</a></h3>
<p><a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a></p>
<p><a class="reference" href="./extensible-sequence.html">Extensible Sequence</a></p>
</div>
<div class="section" id="id19">
<div class="section" id="front-expression-requirements">
<h3><a class="subsection-title" href="#expression-requirements" name="expression-requirements">Expression requirements</a></h3>
<p>In addition to the requirements defined in <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>,
for any <a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt> the following must be met:</p>
<table border="1" class="docutils table">
<p>In addition to the requirements defined in <a class="reference" href="./extensible-sequence.html">Extensible Sequence</a>,
for any <a class="reference" href="./back-extensible-sequence.html">Back Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt> the following must be met:</p>
<table border="1" class="table">
<colgroup>
<col width="35%" />
<col width="35%" />
<col width="30%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Type</th>
<th class="head">Complexity</th>
<tr><th>Expression</th>
<th>Type</th>
<th>Complexity</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./push-front.html" class="identifier">push_front</a>&lt;s,x&gt;::type</span></tt></td>
<td><a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a></td>
<td><a class="reference" href="./front-extensible-sequence.html">Front Extensible Sequence</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./pop-front.html" class="identifier">pop_front</a>&lt;s&gt;::type</span></tt></td>
<td><a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a></td>
<td><a class="reference" href="./front-extensible-sequence.html">Front Extensible Sequence</a></td>
<td>Amortized constant time</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./front.html" class="identifier">front</a>&lt;s&gt;::type</span></tt></td>
@@ -54,52 +57,51 @@ for any <a class="reference internal" href="./back-extensible-sequence.html">Bac
</tbody>
</table>
</div>
<div class="section" id="id20">
<div class="section" id="front-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>.</p>
<table border="1" class="docutils table">
where they differ from, or are not defined in <a class="reference" href="./extensible-sequence.html">Extensible Sequence</a>.</p>
<table border="1" class="table">
<colgroup>
<col width="34%" />
<col width="66%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
<tr><th>Expression</th>
<th>Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./push-front.html" class="identifier">push_front</a>&lt;s,x&gt;::type</span></tt></td>
<td>Equivalent to <tt class="literal"><span class="pre"><a href="./insert.html" class="identifier">insert</a>&lt;s,<a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type,x&gt;::type</span></tt>;
see <a class="reference internal" href="./push-front.html">push_front</a>.</td>
see <a class="refentry reference" href="./push-front.html"><tt class="refentry literal"><span class="pre">push_front</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./pop-front.html" class="identifier">pop_front</a>&lt;v&gt;::type</span></tt></td>
<td>Equivalent to <tt class="literal"><span class="pre"><a href="./erase.html" class="identifier">erase</a>&lt;s,<a href="./begin.html" class="identifier">begin</a>&lt;s&gt;::type&gt;::type</span></tt>;
see <a class="reference internal" href="./pop-front.html">pop_front</a>.</td>
see <a class="refentry reference" href="./pop-front.html"><tt class="refentry literal"><span class="pre">pop_front</span></tt></a>.</td>
</tr>
<tr><td><tt class="literal"><span class="pre"><a href="./front.html" class="identifier">front</a>&lt;s&gt;::type</span></tt></td>
<td>The first element in the sequence; see <a class="reference internal" href="./front.html">front</a>.</td>
<td>The first element in the sequence; see <a class="refentry reference" href="./front.html"><tt class="refentry literal"><span class="pre">front</span></tt></a>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id21">
<div class="section" id="front-models">
<h3><a class="subsection-title" href="#models" name="models">Models</a></h3>
<ul class="simple">
<li><a class="reference internal" href="./vector.html">vector</a></li>
<li><a class="reference internal" href="./list.html">list</a></li>
<li><a class="refentry reference" href="./vector.html"><tt class="refentry literal"><span class="pre">vector</span></tt></a></li>
<li><a class="refentry reference" href="./list.html"><tt class="refentry literal"><span class="pre">list</span></tt></a></li>
</ul>
</div>
<div class="section" id="id22">
<div class="section" id="front-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./sequences.html">Sequences</a>, <a class="reference internal" href="./extensible-sequence.html">Extensible Sequence</a>, <a class="reference internal" href="./back-extensible-sequence.html">Back Extensible Sequence</a>, <a class="reference internal" href="./push-front.html">push_front</a>, <a class="reference internal" href="./pop-front.html">pop_front</a>, <a class="reference internal" href="./front.html">front</a></p>
<p><a class="reference" href="./sequences.html">Sequences</a>, <a class="reference" href="./extensible-sequence.html">Extensible Sequence</a>, <a class="reference" href="./back-extensible-sequence.html">Back Extensible Sequence</a>, <a class="refentry reference" href="./push-front.html"><tt class="refentry literal"><span class="pre">push_front</span></tt></a>, <a class="refentry reference" href="./pop-front.html"><tt class="refentry literal"><span class="pre">pop_front</span></tt></a>, <a class="refentry reference" href="./front.html"><tt class="refentry literal"><span class="pre">front</span></tt></a></p>
<!-- modtime: November 10, 2004 04:40:54 +0000 -->
<!-- Sequences/Concepts//Back Extensible Sequence |60 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./extensible-sequence.html" class="navigation-link">Prev</a>&nbsp;<a href="./back-extensible-sequence.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./extensible-sequence.html" class="navigation-link">Back</a>&nbsp;<a href="./back-extensible-sequence.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./concepts.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+33 -31
View File
@@ -1,19 +1,22 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: front_inserter</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./back-inserter.html" class="navigation-link">Prev</a>&nbsp;<a href="./inserter-class.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./back-inserter.html" class="navigation-link">Back</a>&nbsp;<a href="./inserter-class.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./inserters.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./back-inserter.html" class="navigation-link">Prev</a>&nbsp;<a href="./inserters-inserter.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./back-inserter.html" class="navigation-link">Back</a>&nbsp;<a href="./inserters-inserter.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./inserters.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./algorithms.html" class="navigation-link">Algorithms</a> / <a href="./inserters.html" class="navigation-link">Inserters</a> / <a href="./front-inserter.html" class="navigation-link">front_inserter</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="front-inserter">
<h1><a class="toc-backref" href="./inserters.html#id1466">front_inserter</a></h1>
<div class="section" id="id474">
<h1><a class="toc-backref" href="./inserters.html#id394" name="front-inserter">front_inserter</a></h1>
<div class="section" id="inserters-front-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -26,93 +29,92 @@ struct <a href="./front-inserter.html" class="identifier">front_inserter</a>
};
</pre>
</div>
<div class="section" id="id475">
<div class="section" id="inserters-front-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Inserts elements at the beginning of the sequence.</p>
</div>
<div class="section" id="id476">
<div class="section" id="inserters-front-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/front_inserter.hpp" class="header">boost/mpl/front_inserter.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id477">
<div class="section" id="inserters-front-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./inserter.html">Inserter</a></p>
<p><a class="reference" href="./inserter.html">Inserter</a></p>
</div>
<div class="section" id="id478">
<div class="section" id="inserters-front-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="18%" />
<col width="36%" />
<col width="46%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Seq</span></tt></td>
<td><a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a></td>
<td><a class="reference" href="./front-extensible-sequence.html">Front Extensible Sequence</a></td>
<td>A sequence to bind the inserter to.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id479">
<div class="section" id="inserters-front-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>The semantics of an expression are defined only
where they differ from, or are not defined in <a class="reference internal" href="./inserter.html">Inserter</a>.</p>
<p>For any <a class="reference internal" href="./front-extensible-sequence.html">Front Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p>
<table border="1" class="docutils table">
where they differ from, or are not defined in <a class="reference" href="./inserter.html">Inserter</a>.</p>
<p>For any <a class="reference" href="./front-extensible-sequence.html">Front Extensible Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p>
<table border="1" class="table">
<colgroup>
<col width="33%" />
<col width="67%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Expression</th>
<th class="head">Semantics</th>
<tr><th>Expression</th>
<th>Semantics</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre"><a href="./front-inserter.html" class="identifier">front_inserter</a>&lt;s&gt;</span></tt></td>
<td><p class="first">An <a class="reference internal" href="./inserter.html">Inserter</a> <tt class="literal"><span class="pre">in</span></tt>, equivalent to</p>
<td><p class="first">An <a class="reference" href="./inserter.html">Inserter</a> <tt class="literal"><span class="pre">in</span></tt>, equivalent to</p>
<pre class="last literal-block">
struct in : <a href="./inserter-class.html" class="identifier">inserter</a>&lt;s,<a href="./push-front.html" class="identifier">push_front</a>&lt;<a href="./placeholders.html" class="identifier">_1</a>,<a href="./placeholders.html" class="identifier">_2</a>&gt; > {};
struct in : <a href="./inserter.html" class="identifier">inserter</a>&lt;s,<a href="./push-front.html" class="identifier">push_front</a>&lt;_1,_2&gt; > {};
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id480">
<div class="section" id="inserters-front-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id481">
<div class="section" id="inserters-front-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./reverse-copy.html" class="identifier">reverse_copy</a>&lt;
<a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,5&gt;
, <a href="./front-inserter.html" class="identifier">front_inserter</a>&lt; <a href="./vector-c.html" class="identifier">vector_c</a>&lt;int,5,6,7,8,9&gt; &gt;
&gt;::type range;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./equal.html" class="identifier">equal</a>&lt; range, <a href="./range-c.html" class="identifier">range_c</a>&lt;int,0,10&gt; > ));
</pre>
</div>
<div class="section" id="id482">
<div class="section" id="inserters-front-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./algorithms.html">Algorithms</a>, <a class="reference internal" href="./inserter.html">Inserter</a>, <a class="reference internal" href="./reversible-algorithm.html">Reversible Algorithm</a>, <a class="reference internal" href="./inserter-class.html">inserter (class)</a>, <a class="reference internal" href="./back-inserter.html">back_inserter</a>, <a class="reference internal" href="./push-front.html">push_front</a></p>
<p><a class="reference" href="./algorithms.html">Algorithms</a>, <a class="reference" href="./inserter.html">Inserter</a>, <a class="reference" href="./reversible-algorithm.html">Reversible Algorithm</a>, <a class="refentry reference" href="./inserters-inserter.html"><tt class="refentry literal"><span class="pre">inserter</span></tt></a>, <a class="refentry reference" href="./back-inserter.html"><tt class="refentry literal"><span class="pre">back_inserter</span></tt></a>, <a class="refentry reference" href="./push-front.html"><tt class="refentry literal"><span class="pre">push_front</span></tt></a></p>
<!-- modtime: November 10, 2004 04:40:57 +0000 -->
<!-- Algorithms/Inserters//inserter -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./back-inserter.html" class="navigation-link">Prev</a>&nbsp;<a href="./inserter-class.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./back-inserter.html" class="navigation-link">Back</a>&nbsp;<a href="./inserter-class.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./inserters.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./back-inserter.html" class="navigation-link">Prev</a>&nbsp;<a href="./inserters-inserter.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./back-inserter.html" class="navigation-link">Back</a>&nbsp;<a href="./inserters-inserter.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./inserters.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
</tr></table></body>
</html>
+28 -28
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: front</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./front.html" class="navigation-link">front</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="front">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1434">front</a></h1>
<div class="section" id="id256">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id362" name="front">front</a></h1>
<div class="section" id="front-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -25,57 +28,55 @@ struct <a href="./front.html" class="identifier">front</a>
};
</pre>
</div>
<div class="section" id="id257">
<div class="section" id="intrinsic-front-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns the first element in the sequence.</p>
</div>
<div class="section" id="id258">
<div class="section" id="front-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/front.hpp" class="header">boost/mpl/front.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id259">
<div class="section" id="front-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
<p><a class="reference" href="./tag-dispatched.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id260">
<div class="section" id="front-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="18%" />
<col width="27%" />
<col width="55%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a></td>
<td><a class="reference" href="./forward-sequence.html">Forward Sequence</a></td>
<td>A sequence to be examined.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id261">
<div class="section" id="intrinsic-front-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p>
<p>For any <a class="reference" href="./forward-sequence.html">Forward Sequence</a> <tt class="literal"><span class="pre">s</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./front.html" class="identifier">front</a>&lt;s&gt;::type t;
typedef <a href="./front.html" class="identifier">front</a>&lt;s&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">A type.</td>
</tr>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first"><tt class="literal"><span class="pre"><a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::value</span> <span class="pre">==</span> <span class="pre">false</span></tt>.</p>
</td>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><tt class="literal"><span class="pre"><a href="./empty.html" class="identifier">empty</a>&lt;s&gt;::value</span> <span class="pre">==</span> <span class="pre">false</span></tt>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -86,11 +87,11 @@ typedef <a href="./deref.html" class="identifier">deref</a>&lt; <a href="./begin
</tbody>
</table>
</div>
<div class="section" id="id262">
<div class="section" id="front-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id263">
<div class="section" id="front-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./list.html" class="identifier">list</a>&lt;long&gt;::type types1;
@@ -102,16 +103,15 @@ typedef <a href="./list.html" class="identifier">list</a>&lt;char,int,long&gt;::
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; <a href="./front.html" class="identifier">front</a>&lt;types3&gt;::type, char&gt; ));
</pre>
</div>
<div class="section" id="id264">
<div class="section" id="intrinsic-front-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./forward-sequence.html">Forward Sequence</a>, <a class="reference internal" href="./back.html">back</a>, <a class="reference internal" href="./push-front.html">push_front</a>, <a class="reference internal" href="./begin.html">begin</a>, <a class="reference internal" href="./deref.html">deref</a>, <a class="reference internal" href="./at.html">at</a></p>
<p><a class="reference" href="./forward-sequence.html">Forward Sequence</a>, <a class="refentry reference" href="./back.html"><tt class="refentry literal"><span class="pre">back</span></tt></a>, <a class="refentry reference" href="./push-front.html"><tt class="refentry literal"><span class="pre">push_front</span></tt></a>, <a class="refentry reference" href="./begin.html"><tt class="refentry literal"><span class="pre">begin</span></tt></a>, <a class="refentry reference" href="./deref.html"><tt class="refentry literal"><span class="pre">deref</span></tt></a>, <a class="refentry reference" href="./at.html"><tt class="refentry literal"><span class="pre">at</span></tt></a></p>
<!-- modtime: November 13, 2004 01:27:55 +0000 -->
<!-- Sequences/Intrinsic Metafunctions//has_key -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./erase-key.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-key.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./erase-key.html" class="navigation-link">Back</a>&nbsp;<a href="./has-key.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
-122
View File
@@ -1,122 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_GET_TAG_DEF</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-xxx-trait-named-def.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Back</a>&nbsp;<a href="./get-tag-def.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./introspection.html" class="navigation-link">Introspection</a> / <a href="./has-xxx-trait-def.html" class="navigation-link">BOOST_MPL_GET_TAG_DEF</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-has-xxx-trait-def">
<h1><a class="toc-backref" href="./introspection.html#id1595">BOOST_MPL_GET_TAG_DEF</a></h1>
<div class="section" id="id1329">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./has-xxx-trait-def.html" class="identifier">BOOST_MPL_GET_TAG_DEF</a>(name) \
<em>unspecified token sequence</em> \
/**/
</pre>
</div>
<div class="section" id="id1330">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Expands into a definition of a lazy getter <a class="reference internal" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">get_tag_name</span></tt>
such that for any type <tt class="literal"><span class="pre">x</span></tt> <tt class="literal"><span class="pre">get_tag_name&lt;x&gt;::type</span> <span class="pre">is</span> <span class="pre">type</span></tt> where
<tt class="literal"><span class="pre">name</span></tt> is a nested type member of <tt class="literal"><span class="pre">x</span></tt>.</p>
</div>
<div class="section" id="id1331">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/get_tag.hpp" class="header">boost/mpl/get_tag.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1332">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="32%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">name</span></tt></td>
<td>A legal identifier token</td>
<td>A name of the member to get.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1333">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any legal C++ identifier <tt class="literal"><span class="pre">name</span></tt>:</p>
<pre class="literal-block">
<a href="./has-xxx-trait-def.html" class="identifier">BOOST_MPL_GET_TAG_DEF</a>(name)
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first">Appears at namespace scope.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
namespace boost { namespace mpl {</pre>
<pre class="last literal-block">
template<typename T>&lt;class T&gt;
struct get_##name {
typedef typename T::name type;
};</pre>
<pre class="last literal-block">
}}<typename T>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1334">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
struct test_type_get_tag_def;
<a href="get-tag-def.html" class="identifier">BOOST_MPL_GET_TAG_DEF</a>(a_tag);
namespace boost { namespace mpl {
struct test_type_get_tag_def
{
typedef int a_tag;
};
}}
typedef boost::mpl::get_a_tag&lt;<test_type_get_tag_def>test_type_get_tag_def&gt;::type got_the_tag;
</pre>
</div>
<div class="section" id="id1335">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./macros.html">Macros</a>, <a class="reference internal" href="./has-xxx-trait-named-def.html">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a>
<!-- Macros/Introspection/BOOST_MPL_GET_TAG_DEF -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-xxx-template-named-def.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Back</a>&nbsp;<a href="./get-tag-def.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2017 Sergey Krivonos and Edward Diener</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</html>
+34 -34
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: greater_equal</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./comparisons.html" class="navigation-link">Comparisons</a> / <a href="./greater-equal.html" class="navigation-link">greater_equal</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="greater-equal">
<h1><a class="toc-backref" href="./comparisons.html#id1546">greater_equal</a></h1>
<div class="section" id="id1041">
<h1><a class="toc-backref" href="./comparisons.html#id472" name="greater-equal">greater_equal</a></h1>
<div class="section" id="comparisons-greater-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -26,59 +29,58 @@ struct <a href="./greater-equal.html" class="identifier">greater_equal</a>
};
</pre>
</div>
<div class="section" id="id1042">
<div class="section" id="comparisons-greater-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns a true-valued <a class="reference internal" href="./integral-constant.html">Integral Constant</a> if <tt class="literal"><span class="pre">T1</span></tt> is greater than or equal to <tt class="literal"><span class="pre">T2</span></tt>.</p>
<p>Returns a true-valued <a class="reference" href="./integral-constant.html">Integral Constant</a> if <tt class="literal"><span class="pre">T1</span></tt> is greater than or equal to <tt class="literal"><span class="pre">T2</span></tt>.</p>
</div>
<div class="section" id="id1043">
<div class="section" id="comparisons-greater-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/greater_equal.hpp" class="header">boost/mpl/greater_equal.hpp</a>&gt;
#include &lt;<a href="../../../../boost/mpl/comparison.hpp" class="header">boost/mpl/comparison.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1044">
<div class="section" id="comparisons-greater-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
<p><a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
</div>
<div class="section" id="id1045">
<div class="section" id="comparisons-greater-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td><a class="reference" href="./integral-constant.html">Integral Constant</a></td>
<td>Operation's arguments.</td>
</tr>
</tbody>
</table>
<p>[<em>Note:</em> The requirements listed in this specification
are the ones imposed by the default implementation. See <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference internal" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
are the ones imposed by the default implementation. See <a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
</div>
<div class="section" id="id1046">
<div class="section" id="comparisons-greater-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <tt class="literal"><span class="pre">c1</span></tt> and <tt class="literal"><span class="pre">c2</span></tt>:</p>
<p>For any <a class="reference" href="./integral-constant.html">Integral Constant</a>s <tt class="literal"><span class="pre">c1</span></tt> and <tt class="literal"><span class="pre">c2</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./greater-equal.html" class="identifier">greater_equal</a>&lt;c1,c2&gt;::type r;
typedef <a href="./greater-equal.html" class="identifier">greater_equal</a>&lt;c1,c2&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -90,14 +92,13 @@ typedef <a href="./bool.html" class="identifier">bool_</a>&lt; (c1::value &lt; c
</table>
<!-- .......................................................................... -->
<pre class="literal-block">
typedef <a href="./greater-equal.html" class="identifier">greater_equal</a>&lt;c1,c2&gt; r;
typedef <a href="./greater-equal.html" class="identifier">greater_equal</a>&lt;c1,c2&gt; r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -108,11 +109,11 @@ struct r : <a href="./greater-equal.html" class="identifier">greater_equal</a>&l
</tbody>
</table>
</div>
<div class="section" id="id1047">
<div class="section" id="comparisons-greater-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id1048">
<div class="section" id="comparisons-greater-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./greater-equal.html" class="identifier">greater_equal</a>&lt; <a href="./int.html" class="identifier">int_</a>&lt;10&gt;, <a href="./int.html" class="identifier">int_</a>&lt;0&gt; &gt; ));
@@ -120,16 +121,15 @@ struct r : <a href="./greater-equal.html" class="identifier">greater_equal</a>&l
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./greater-equal.html" class="identifier">greater_equal</a>&lt; <a href="./long.html" class="identifier">long_</a>&lt;10&gt;, <a href="./int.html" class="identifier">int_</a>&lt;10&gt; > ));
</pre>
</div>
<div class="section" id="id1049">
<div class="section" id="comparisons-greater-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./comparisons.html">Comparisons</a>, <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="reference internal" href="./numeric-cast.html">numeric_cast</a>, <a class="reference internal" href="./greater.html">greater</a>, <a class="reference internal" href="./less.html">less</a>, <a class="reference internal" href="./equal-to.html">equal_to</a></p>
<p><a class="reference" href="./comparisons.html">Comparisons</a>, <a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="refentry reference" href="./numeric-cast.html"><tt class="refentry literal"><span class="pre">numeric_cast</span></tt></a>, <a class="refentry reference" href="./greater.html"><tt class="refentry literal"><span class="pre">greater</span></tt></a>, <a class="refentry reference" href="./less.html"><tt class="refentry literal"><span class="pre">less</span></tt></a>, <a class="refentry reference" href="./equal-to.html"><tt class="refentry literal"><span class="pre">equal_to</span></tt></a></p>
<!-- modtime: November 10, 2004 04:40:45 +0000 -->
<!-- Metafunctions/Comparisons//equal_to |50 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./greater.html" class="navigation-link">Prev</a>&nbsp;<a href="./equal-to.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./greater.html" class="navigation-link">Back</a>&nbsp;<a href="./equal-to.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./comparisons.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+34 -34
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: greater</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./comparisons.html" class="navigation-link">Comparisons</a> / <a href="./greater.html" class="navigation-link">greater</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="greater">
<h1><a class="toc-backref" href="./comparisons.html#id1545">greater</a></h1>
<div class="section" id="id1032">
<h1><a class="toc-backref" href="./comparisons.html#id471" name="greater">greater</a></h1>
<div class="section" id="greater-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -26,59 +29,58 @@ struct <a href="./greater.html" class="identifier">greater</a>
};
</pre>
</div>
<div class="section" id="id1033">
<div class="section" id="greater-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns a true-valued <a class="reference internal" href="./integral-constant.html">Integral Constant</a> if <tt class="literal"><span class="pre">T1</span></tt> is greater than <tt class="literal"><span class="pre">T2</span></tt>.</p>
<p>Returns a true-valued <a class="reference" href="./integral-constant.html">Integral Constant</a> if <tt class="literal"><span class="pre">T1</span></tt> is greater than <tt class="literal"><span class="pre">T2</span></tt>.</p>
</div>
<div class="section" id="id1034">
<div class="section" id="greater-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/greater.hpp" class="header">boost/mpl/greater.hpp</a>&gt;
#include &lt;<a href="../../../../boost/mpl/comparison.hpp" class="header">boost/mpl/comparison.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1035">
<div class="section" id="greater-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
<p><a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a></p>
</div>
<div class="section" id="id1036">
<div class="section" id="greater-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">T1</span></tt>, <tt class="literal"><span class="pre">T2</span></tt></td>
<td><a class="reference internal" href="./integral-constant.html">Integral Constant</a></td>
<td><a class="reference" href="./integral-constant.html">Integral Constant</a></td>
<td>Operation's arguments.</td>
</tr>
</tbody>
</table>
<p>[<em>Note:</em> The requirements listed in this specification
are the ones imposed by the default implementation. See <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference internal" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
are the ones imposed by the default implementation. See <a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a> concept
for the details on how to provide an implementation for a user-defined numeric type
that does not satisfy the <a class="reference" href="./integral-constant.html">Integral Constant</a> requirements. — <em>end note</em>]</p>
</div>
<div class="section" id="id1037">
<div class="section" id="greater-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./integral-constant.html">Integral Constant</a>s <tt class="literal"><span class="pre">c1</span></tt> and <tt class="literal"><span class="pre">c2</span></tt>:</p>
<p>For any <a class="reference" href="./integral-constant.html">Integral Constant</a>s <tt class="literal"><span class="pre">c1</span></tt> and <tt class="literal"><span class="pre">c2</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./greater.html" class="identifier">greater</a>&lt;c1,c2&gt;::type r;
typedef <a href="./greater.html" class="identifier">greater</a>&lt;c1,c2&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -90,14 +92,13 @@ typedef <a href="./bool.html" class="identifier">bool_</a>&lt; (c1::value &lt; c
</table>
<!-- .......................................................................... -->
<pre class="literal-block">
typedef <a href="./greater.html" class="identifier">greater</a>&lt;c1,c2&gt; r;
typedef <a href="./greater.html" class="identifier">greater</a>&lt;c1,c2&gt; r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -108,11 +109,11 @@ struct r : <a href="./greater.html" class="identifier">greater</a>&lt;c1,c2&gt;:
</tbody>
</table>
</div>
<div class="section" id="id1038">
<div class="section" id="greater-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id1039">
<div class="section" id="greater-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./greater.html" class="identifier">greater</a>&lt; <a href="./int.html" class="identifier">int_</a>&lt;10&gt;, <a href="./int.html" class="identifier">int_</a>&lt;0&gt; &gt; ));
@@ -120,16 +121,15 @@ struct r : <a href="./greater.html" class="identifier">greater</a>&lt;c1,c2&gt;:
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./greater.html" class="identifier">greater</a>&lt; <a href="./long.html" class="identifier">long_</a>&lt;10&gt;, <a href="./int.html" class="identifier">int_</a>&lt;10&gt; > ));
</pre>
</div>
<div class="section" id="id1040">
<div class="section" id="greater-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./comparisons.html">Comparisons</a>, <a class="reference internal" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="reference internal" href="./numeric-cast.html">numeric_cast</a>, <a class="reference internal" href="./greater-equal.html">greater_equal</a>, <a class="reference internal" href="./less.html">less</a>, <a class="reference internal" href="./equal-to.html">equal_to</a></p>
<p><a class="reference" href="./comparisons.html">Comparisons</a>, <a class="reference" href="./numeric-metafunction.html">Numeric Metafunction</a>, <a class="refentry reference" href="./numeric-cast.html"><tt class="refentry literal"><span class="pre">numeric_cast</span></tt></a>, <a class="refentry reference" href="./greater-equal.html"><tt class="refentry literal"><span class="pre">greater_equal</span></tt></a>, <a class="refentry reference" href="./less.html"><tt class="refentry literal"><span class="pre">less</span></tt></a>, <a class="refentry reference" href="./equal-to.html"><tt class="refentry literal"><span class="pre">equal_to</span></tt></a></p>
<!-- modtime: November 10, 2004 04:40:49 +0000 -->
<!-- Metafunctions/Comparisons//greater_equal |40 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./less-equal.html" class="navigation-link">Prev</a>&nbsp;<a href="./greater-equal.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./less-equal.html" class="navigation-link">Back</a>&nbsp;<a href="./greater-equal.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./comparisons.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+28 -26
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: has_key</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,8 +15,8 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./sequences.html" class="navigation-link">Sequences</a> / <a href="./intrinsic-metafunctions.html" class="navigation-link">Intrinsic Metafunctions</a> / <a href="./has-key.html" class="navigation-link">has_key</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="has-key">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id1435">has_key</a></h1>
<div class="section" id="id265">
<h1><a class="toc-backref" href="./intrinsic-metafunctions.html#id363" name="has-key">has_key</a></h1>
<div class="section" id="has-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
@@ -26,38 +29,38 @@ struct <a href="./has-key.html" class="identifier">has_key</a>
};
</pre>
</div>
<div class="section" id="id266">
<div class="section" id="has-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns a true-valued <a class="reference internal" href="./integral-constant.html">Integral Constant</a> if <tt class="literal"><span class="pre">Sequence</span></tt> contains an element
<p>Returns a true-valued <a class="reference" href="./integral-constant.html">Integral Constant</a> if <tt class="literal"><span class="pre">Sequence</span></tt> contains an element
with key <tt class="literal"><span class="pre">Key</span></tt>.</p>
</div>
<div class="section" id="id267">
<div class="section" id="has-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/has_key.hpp" class="header">boost/mpl/has_key.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id268">
<div class="section" id="has-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./tag-dispatched-metafunction.html">Tag Dispatched Metafunction</a></p>
<p><a class="reference" href="./tag-dispatched.html">Tag Dispatched Metafunction</a></p>
</div>
<div class="section" id="id269">
<div class="section" id="has-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="17%" />
<col width="30%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">Sequence</span></tt></td>
<td><a class="reference internal" href="./associative-sequence.html">Associative Sequence</a></td>
<td><a class="reference" href="./associative-sequence.html">Associative Sequence</a></td>
<td>A sequence to query.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">Key</span></tt></td>
@@ -67,17 +70,17 @@ with key <tt class="literal"><span class="pre">Key</span></tt>.</p>
</tbody>
</table>
</div>
<div class="section" id="id270">
<div class="section" id="has-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any <a class="reference internal" href="./associative-sequence.html">Associative Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and arbitrary type <tt class="literal"><span class="pre">key</span></tt>:</p>
<p>For any <a class="reference" href="./associative-sequence.html">Associative Sequence</a> <tt class="literal"><span class="pre">s</span></tt>, and arbitrary type <tt class="literal"><span class="pre">key</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./has-key.html" class="identifier">has_key</a>&lt;s,key&gt;::type c;
typedef <a href="./has-key.html" class="identifier">has_key</a>&lt;s,key&gt;::type c;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">Boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">Boolean <a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if <tt class="literal"><span class="pre">key</span></tt> is in <tt class="literal"><span class="pre">s</span></tt>'s set of keys; otherwise
<tt class="literal"><span class="pre">c::value</span> <span class="pre">==</span> <span class="pre">false</span></tt>.</td>
@@ -85,11 +88,11 @@ typedef <a href="./has-key.html" class="identifier">has_key</a>&lt;s,key&gt;::ty
</tbody>
</table>
</div>
<div class="section" id="id271">
<div class="section" id="has-complexity">
<h3><a class="subsection-title" href="#complexity" name="complexity">Complexity</a></h3>
<p>Amortized constant time.</p>
</div>
<div class="section" id="id272">
<div class="section" id="has-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./map.html" class="identifier">map</a>&lt; <a href="./pair.html" class="identifier">pair</a>&lt;int,unsigned&gt;, <a href="./pair.html" class="identifier">pair</a>&lt;char,long&gt; &gt; m;
@@ -99,16 +102,15 @@ typedef <a href="./insert.html" class="identifier">insert</a>&lt; m, <a href="./
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./has-key.html" class="identifier">has_key</a>&lt;m1,long&gt; ));
</pre>
</div>
<div class="section" id="id273">
<div class="section" id="has-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./associative-sequence.html">Associative Sequence</a>, <a class="reference internal" href="./count.html">count</a>, <a class="reference internal" href="./insert.html">insert</a>, <a class="reference internal" href="./erase-key.html">erase_key</a></p>
<p><a class="reference" href="./associative-sequence.html">Associative Sequence</a>, <a class="refentry reference" href="./count.html"><tt class="refentry literal"><span class="pre">count</span></tt></a>, <a class="refentry reference" href="./insert.html"><tt class="refentry literal"><span class="pre">insert</span></tt></a>, <a class="refentry reference" href="./erase-key.html"><tt class="refentry literal"><span class="pre">erase_key</span></tt></a></p>
<!-- modtime: November 13, 2004 01:28:31 +0000 -->
<!-- Sequences/Intrinsic Metafunctions//insert -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./front.html" class="navigation-link">Prev</a>&nbsp;<a href="./insert.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./front.html" class="navigation-link">Back</a>&nbsp;<a href="./insert.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./intrinsic-metafunctions.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
-139
View File
@@ -1,139 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_HAS_XXX_TEMPLATE_DEF</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-xxx-template-named-def.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./has-xxx-template-named-def.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./introspection.html" class="navigation-link">Introspection</a> / <a href="./has-xxx-template-def.html" class="navigation-link">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-has-xxx-template-def">
<h1><a class="toc-backref" href="./introspection.html#id1593">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a></h1>
<div class="section" id="id1315">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./has-xxx-template-def.html" class="identifier">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a>(name) \
<em>unspecified token sequence</em> \
/**/
</pre>
</div>
<div class="section" id="id1316">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Expands into the definition of a boolean <a class="reference internal" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">has_name</span></tt>
such that for any type <tt class="literal"><span class="pre">x</span></tt> <tt class="literal"><span class="pre">has_name&lt;x&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and
only if <tt class="literal"><span class="pre">x</span></tt> is a class type and has a nested template member
<tt class="literal"><span class="pre">x::template</span> <span class="pre">name</span></tt> with no more than
<a class="reference internal" href="./limit-metafunction-arity.html">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</a> parameters.</p>
<p>On deficient compilers not capable of performing the detection,
<tt class="literal"><span class="pre">has_name&lt;x&gt;::value</span></tt> is always <tt class="literal"><span class="pre">false</span></tt>. A boolean configuration
macro, <a class="reference internal" href="./cfg-no-has-xxx-template.html">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a>, is provided to signal or
override the &quot;deficient&quot; status of a particular compiler.</p>
<p>[<em>Note:</em> <a class="reference internal" href="./has-xxx-template-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a> is a simplified front end to
the <a class="reference internal" href="./has-xxx-template-named-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a> introspection macro — <em>end note</em>]</p>
</div>
<div class="section" id="id1317">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/has_xxx.hpp" class="header">boost/mpl/has_xxx.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1318">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="32%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">name</span></tt></td>
<td>A legal identifier token</td>
<td>A name of the template member being detected.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1319">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any legal C++ identifier <tt class="literal"><span class="pre">name</span></tt>:</p>
<pre class="literal-block">
<a href="./has-xxx-template-def.html" class="identifier">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a>(name)
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first">Appears at namespace scope.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
<a href="./has-xxx-template-named-def.html" class="identifier">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a>(
BOOST_PP_CAT(has_,name), name, false
)
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1320">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
<a href="./has-xxx-template-def.html" class="identifier">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a>(xxx)
struct test1 {};
struct test2 { void xxx(); };
struct test3 { int xxx; };
struct test4 { static int xxx(); };
struct test5 { typedef int xxx; };
struct test6 { struct xxx; };
struct test7 { typedef void (*xxx)(); };
struct test8 { typedef void (xxx)(); };
struct test9 { template&lt; class T &gt; struct xxx {}; };
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test1&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test2&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test3&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test4&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test5&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test6&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test7&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test8&gt; ));
#if !defined(<a href="./cfg-no-has-xxx-template.html" class="identifier">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a>)
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test9&gt; ));
#endif
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test9, <a href="./bool.html" class="identifier">true_</a>&gt; ));
</pre>
</div>
<div class="section" id="id1321">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./macros.html">Macros</a>, <a class="reference internal" href="./has-xxx-template-named-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a>,
<a class="reference internal" href="./cfg-no-has-xxx-template.html">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a>, <a class="reference internal" href="./limit-metafunction-arity.html">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</a></p>
<!-- Macros/Introspection//BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF -->
<!-- Copyright Daniel Walker 2007. -->
<!-- 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) -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-xxx-template-named-def.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./has-xxx-template-named-def.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"></div></td></tr></table></body>
</html>
@@ -1,192 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-xxx-template-def.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-xxx-trait-def.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./has-xxx-template-def.html" class="navigation-link">Back</a>&nbsp;<a href="./has-xxx-trait-def.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./introspection.html" class="navigation-link">Introspection</a> / <a href="./has-xxx-template-named-def.html" class="navigation-link">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-has-xxx-template-named-def">
<h1><a class="toc-backref" href="./introspection.html#id1594">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a></h1>
<div class="section" id="id1322">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./has-xxx-template-named-def.html" class="identifier">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a>(trait, name, default_) \
<em>unspecified token sequence</em> \
/**/
</pre>
</div>
<div class="section" id="id1323">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Expands into the definition of a boolean <a class="reference internal" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">trait</span></tt> such
that for any type <tt class="literal"><span class="pre">x</span></tt> <tt class="literal"><span class="pre">trait&lt;x&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and only if
<tt class="literal"><span class="pre">x</span></tt> is a class type and has a nested template member <tt class="literal"><span class="pre">x::template</span>
<span class="pre">name</span></tt> with no more than <a class="reference internal" href="./limit-metafunction-arity.html">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</a>
parameters.</p>
<p>On deficient compilers not capable of performing the detection,
<tt class="literal"><span class="pre">trait&lt;x&gt;::value</span></tt> always returns a fallback value <tt class="literal"><span class="pre">default_</span></tt>. A
boolean configuration macro, <a class="reference internal" href="./cfg-no-has-xxx-template.html">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a>, is
provided to signal or override the &quot;deficient&quot; status of a particular
compiler. [<em>Note:</em> The fallback value can also be provided at the
point of the metafunction invocation; see the <cite>Expression semantics</cite>
section for details — <em>end note</em>]</p>
</div>
<div class="section" id="id1324">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/has_xxx.hpp" class="header">boost/mpl/has_xxx.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1325">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<colgroup>
<col width="15%" />
<col width="32%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><tt class="literal"><span class="pre">trait</span></tt></td>
<td>A legal identifier token</td>
<td>A name of the metafunction to be generated.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">name</span></tt></td>
<td>A legal identifier token</td>
<td>A name of the member being detected.</td>
</tr>
<tr><td><tt class="literal"><span class="pre">default_</span></tt></td>
<td>An boolean constant</td>
<td>A fallback value for the deficient compilers.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1326">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any legal C++ identifiers <tt class="literal"><span class="pre">trait</span></tt> and <tt class="literal"><span class="pre">name</span></tt>, boolean constant
expression <tt class="literal"><span class="pre">c1</span></tt>, boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c2</span></tt>, and arbitrary
type <tt class="literal"><span class="pre">x</span></tt>:</p>
<pre class="literal-block">
<a href="./has-xxx-template-named-def.html" class="identifier">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a>(trait, name, c1)
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first">Appears at namespace scope.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Expands into an equivalent of the following class template
definition</p>
<pre class="literal-block">
template&lt;
typename X
, typename fallback = boost::mpl::<a href="./bool.html" class="identifier">bool_</a>&lt;c1&gt;
&gt;
struct trait
{
// <em>unspecified</em>
// ...
};
</pre>
<p>where <tt class="literal"><span class="pre">trait</span></tt> is a boolean <a class="reference internal" href="./metafunction.html">Metafunction</a> with the following
semantics:</p>
<pre class="literal-block">
typedef trait&lt;x&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">If <a class="reference internal" href="./cfg-no-has-xxx-template.html">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a> is defined, <tt class="literal"><span class="pre">r::value</span>
<span class="pre">==</span> <span class="pre">c1</span></tt>; otherwise, <tt class="literal"><span class="pre">r::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and only if <tt class="literal"><span class="pre">x</span></tt>
is a class type that has a nested template member <tt class="literal"><span class="pre">x::template</span>
<span class="pre">name</span></tt> with no more than <a class="reference internal" href="./limit-metafunction-arity.html">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</a>.</td>
</tr>
</tbody>
</table>
<pre class="literal-block">
typedef trait&lt; x, c2 &gt;::type r;
</pre>
<table class="last docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">If <a class="reference internal" href="./cfg-no-has-xxx-template.html">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a> is defined, <tt class="literal"><span class="pre">r::value</span>
<span class="pre">==</span> <span class="pre">c2::value</span></tt>; otherwise, equivalent to</p>
<pre class="last literal-block">
typedef trait&lt;x&gt;::type r;
</pre>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1327">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
<a href="./has-xxx-template-named-def.html" class="identifier">BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF</a>(
has_xxx, xxx, false
)
struct test1 {};
struct test2 { void xxx(); };
struct test3 { int xxx; };
struct test4 { static int xxx(); };
struct test5 { typedef int xxx; };
struct test6 { struct xxx; };
struct test7 { typedef void (*xxx)(); };
struct test8 { typedef void (xxx)(); };
struct test9 { template&lt; class T &gt; struct xxx {}; };
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test1&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test2&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test3&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test4&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test5&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test6&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test7&gt; ));
<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( has_xxx&lt;test8&gt; ));
#if !defined(<a href="./cfg-no-has-xxx-template.html" class="identifier">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a>)
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test9&gt; ));
#endif
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test9, <a href="./bool.html" class="identifier">true_</a>&gt; ));
</pre>
</div>
<div class="section" id="id1328">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./macros.html">Macros</a>, <a class="reference internal" href="./has-xxx-template-def.html">BOOST_MPL_HAS_XXX_TEMPLATE_DEF</a>,
<a class="reference internal" href="./cfg-no-has-xxx-template.html">BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE</a>, <a class="reference internal" href="./limit-metafunction-arity.html">BOOST_MPL_LIMIT_METAFUNCTION_ARITY</a></p>
<!-- Macros/Introspection//BOOST_MPL_HAS_XXX_TRAIT_DEF -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-xxx-template-def.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-xxx-trait-def.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./has-xxx-template-def.html" class="navigation-link">Back</a>&nbsp;<a href="./has-xxx-trait-def.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"></div></td></tr></table></body>
</html>
+36 -36
View File
@@ -1,19 +1,22 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_HAS_XXX_TRAIT_DEF</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
<body class="docframe refmanual">
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-xxx-template-named-def.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-xxx-trait-named-def.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./has-xxx-template-named-def.html" class="navigation-link">Back</a>&nbsp;<a href="./has-xxx-trait-named-def.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-xxx-trait-named-def.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./has-xxx-trait-named-def.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./introspection.html" class="navigation-link">Introspection</a> / <a href="./has-xxx-trait-def.html" class="navigation-link">BOOST_MPL_HAS_XXX_TRAIT_DEF</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-has-xxx-trait-def">
<h1><a class="toc-backref" href="./introspection.html#id1595">BOOST_MPL_HAS_XXX_TRAIT_DEF</a></h1>
<div class="section" id="id1329">
<div class="section" id="has-xxx-trait-def">
<h1><a class="toc-backref" href="./introspection.html#id516" name="has-xxx-trait-def">BOOST_MPL_HAS_XXX_TRAIT_DEF</a></h1>
<div class="section" id="introspection-has-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./has-xxx-trait-def.html" class="identifier">BOOST_MPL_HAS_XXX_TRAIT_DEF</a>(name) \
@@ -21,36 +24,36 @@
/**/
</pre>
</div>
<div class="section" id="id1330">
<div class="section" id="introspection-has-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Expands into a definition of a boolean unary <a class="reference internal" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">has_name</span></tt>
<p>Expands into a definition of a boolean unary <a class="reference" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">has_name</span></tt>
such that for any type <tt class="literal"><span class="pre">x</span></tt> <tt class="literal"><span class="pre">has_name&lt;x&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and only
if <tt class="literal"><span class="pre">x</span></tt> is a class type and has a nested type memeber <tt class="literal"><span class="pre">x::name</span></tt>.</p>
<p>On the deficient compilers not capabale of performing the detection,
<tt class="literal"><span class="pre">has_name&lt;x&gt;::value</span></tt> always returns <tt class="literal"><span class="pre">false</span></tt>. A boolean configuraion
macro, <a class="reference internal" href="./cfg-no-has-xxx.html">BOOST_MPL_CFG_NO_HAS_XXX</a>, is provided to signal or override
<p>On the deficient compilers not capabale of performing the detection,
<tt class="literal"><span class="pre">has_name&lt;x&gt;::value</span></tt> always returns <tt class="literal"><span class="pre">false</span></tt>. A boolean configuraion
macro, <a class="refentry reference" href="./cfg-no-has-xxx.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_CFG_NO_HAS_XXX</span></tt></a>, is provided to signal or override
the &quot;deficient&quot; status of a particular compiler.</p>
<p>[<em>Note:</em> <a class="reference internal" href="./has-xxx-trait-def.html">BOOST_MPL_HAS_XXX_TRAIT_DEF</a> is a simplified front end to
the <a class="reference internal" href="./has-xxx-trait-named-def.html">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a> introspection macro — <em>end note</em>]</p>
<p>[<em>Note:</em> <a class="refentry reference" href="./has-xxx-trait-def.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_HAS_XXX_TRAIT_DEF</span></tt></a> is a simplified front end to
the <a class="refentry reference" href="./has-xxx-trait-named-def.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</span></tt></a> introspection macro — <em>end note</em>]</p>
</div>
<div class="section" id="id1331">
<div class="section" id="introspection-has-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/has_xxx.hpp" class="header">boost/mpl/has_xxx.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1332">
<div class="section" id="introspection-has-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="15%" />
<col width="32%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
@@ -61,21 +64,19 @@ the <a class="reference internal" href="./has-xxx-trait-named-def.html">BOOST_MP
</tbody>
</table>
</div>
<div class="section" id="id1333">
<div class="section" id="introspection-has-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any legal C++ identifier <tt class="literal"><span class="pre">name</span></tt>:</p>
<pre class="literal-block">
<a href="./has-xxx-trait-def.html" class="identifier">BOOST_MPL_HAS_XXX_TRAIT_DEF</a>(name)
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first">Appears at namespace scope.</p>
</td>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body">Appears at namespace scope.</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">None.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="last literal-block">
@@ -88,10 +89,10 @@ the <a class="reference internal" href="./has-xxx-trait-named-def.html">BOOST_MP
</tbody>
</table>
</div>
<div class="section" id="id1334">
<div class="section" id="introspection-has-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
<a href="./has-xxx-trait-def.html" class="identifier">BOOST_MPL_HAS_XXX_TRAIT_DEF</a>(xxx)
<a href="./has-xxx-trait-def.html" class="identifier">BOOST_MPL_HAS_XXX_TRAIT_DEF</a>(has_xxx)
struct test1 {};
struct test2 { void xxx(); };
@@ -116,22 +117,21 @@ struct test9 { typedef void (xxx)(); };
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test9&gt; ));
#endif
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test6,<a href="./bool.html" class="identifier">true_</a>&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test7,<a href="./bool.html" class="identifier">true_</a>&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test8,<a href="./bool.html" class="identifier">true_</a>&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test9,<a href="./bool.html" class="identifier">true_</a>&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test6,true_&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test7,true_&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test8,true_&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test9,true_&gt; ));
</pre>
</div>
<div class="section" id="id1335">
<div class="section" id="introspection-has-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./macros.html">Macros</a>, <a class="reference internal" href="./has-xxx-trait-named-def.html">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a>, <a class="reference internal" href="./cfg-no-has-xxx.html">BOOST_MPL_CFG_NO_HAS_XXX</a></p>
<p><a class="reference" href="./macros.html">Macros</a>, <a class="refentry reference" href="./has-xxx-trait-named-def.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</span></tt></a>, <a class="refentry reference" href="./cfg-no-has-xxx.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_CFG_NO_HAS_XXX</span></tt></a></p>
<!-- modtime: November 13, 2004 02:52:01 +0000 -->
<!-- Macros/Introspection//BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-xxx-template-named-def.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-xxx-trait-named-def.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./has-xxx-template-named-def.html" class="navigation-link">Back</a>&nbsp;<a href="./has-xxx-trait-named-def.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Prev</a>&nbsp;<a href="./has-xxx-trait-named-def.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./has-xxx-trait-named-def.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
</tr></table></body>
</html>
+43 -44
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -11,9 +14,9 @@
<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-xxx-trait-def.html" class="navigation-link">Prev</a>&nbsp;<a href="./configuration.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./has-xxx-trait-def.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./macros.html" class="navigation-link">Macros</a> / <a href="./introspection.html" class="navigation-link">Introspection</a> / <a href="./has-xxx-trait-named-def.html" class="navigation-link">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="boost-mpl-has-xxx-trait-named-def">
<h1><a class="toc-backref" href="./introspection.html#id1596">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a></h1>
<div class="section" id="id1336">
<div class="section" id="has-xxx-trait-named-def">
<h1><a class="toc-backref" href="./introspection.html#id517" name="has-xxx-trait-named-def">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a></h1>
<div class="section" id="macros-introspection-has-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
#define <a href="./has-xxx-trait-named-def.html" class="identifier">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a>(trait, name, default_) \
@@ -21,37 +24,37 @@
/**/
</pre>
</div>
<div class="section" id="id1337">
<div class="section" id="macros-introspection-has-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Expands into a definition of a boolean unary <a class="reference internal" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">trait</span></tt>
<p>Expands into a definition of a boolean unary <a class="reference" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">trait</span></tt>
such that for any type <tt class="literal"><span class="pre">x</span></tt> <tt class="literal"><span class="pre">trait&lt;x&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and only
if <tt class="literal"><span class="pre">x</span></tt> is a class type and has a nested type memeber <tt class="literal"><span class="pre">x::name</span></tt>.</p>
<p>On the deficient compilers not capabale of performing the detection,
<tt class="literal"><span class="pre">trait&lt;x&gt;::value</span></tt> always returns a fallback value <tt class="literal"><span class="pre">default_</span></tt>.
A boolean configuraion macro, <a class="reference internal" href="./cfg-no-has-xxx.html">BOOST_MPL_CFG_NO_HAS_XXX</a>, is provided
<p>On the deficient compilers not capabale of performing the detection,
<tt class="literal"><span class="pre">trait&lt;x&gt;::value</span></tt> always returns a fallback value <tt class="literal"><span class="pre">default_</span></tt>.
A boolean configuraion macro, <a class="refentry reference" href="./cfg-no-has-xxx.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_CFG_NO_HAS_XXX</span></tt></a>, is provided
to signal or override the &quot;deficient&quot; status of a particular compiler.
[<em>Note:</em> The fallback value can also be provided at the point of the
metafunction invocation; see the <cite>Expression semantics</cite> section for
[<em>Note:</em> The fallback value call also be provided at the point of the
metafunction invocation; see the <cite>Expression semantics</cite> section for
details — <em>end note</em>]</p>
</div>
<div class="section" id="id1338">
<div class="section" id="macros-introspection-has-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/has_xxx.hpp" class="header">boost/mpl/has_xxx.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1339">
<div class="section" id="macros-introspection-has-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="15%" />
<col width="32%" />
<col width="53%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
@@ -70,22 +73,20 @@ details — <em>end note</em>]</p>
</tbody>
</table>
</div>
<div class="section" id="id1340">
<div class="section" id="macros-introspection-has-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any legal C++ identifiers <tt class="literal"><span class="pre">trait</span></tt> and <tt class="literal"><span class="pre">name</span></tt>, boolean constant expression <tt class="literal"><span class="pre">c1</span></tt>,
boolean <a class="reference internal" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c2</span></tt>, and arbitrary type <tt class="literal"><span class="pre">x</span></tt>:</p>
<p>For any legal C++ identifiers <tt class="literal"><span class="pre">trait</span></tt> and <tt class="literal"><span class="pre">name</span></tt>, boolean constant expression <tt class="literal"><span class="pre">c1</span></tt>,
boolean <a class="reference" href="./integral-constant.html">Integral Constant</a> <tt class="literal"><span class="pre">c2</span></tt>, and arbitrary type <tt class="literal"><span class="pre">x</span></tt>:</p>
<pre class="literal-block">
<a href="./has-xxx-trait-named-def.html" class="identifier">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a>(trait, name, c1)
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body"><p class="first">Appears at namespace scope.</p>
</td>
<tr class="field"><th class="field-name">Precondition:</th><td class="field-body">Appears at namespace scope.</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">None.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">None.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Expands into an equivalent of the following class template definition</p>
<pre class="literal-block">
@@ -96,18 +97,18 @@ struct trait
// ...
};
</pre>
<p>where <tt class="literal"><span class="pre">trait</span></tt> is a boolean <a class="reference internal" href="./metafunction.html">Metafunction</a> with the following semantics:</p>
<p>where <tt class="literal"><span class="pre">trait</span></tt> is a boolean <a class="reference" href="./metafunction.html">Metafunction</a> with the following semantics:</p>
<pre class="literal-block">
typedef trait&lt;x&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">If <a class="reference internal" href="./cfg-no-has-xxx.html">BOOST_MPL_CFG_NO_HAS_XXX</a> is defined, <tt class="literal"><span class="pre">r::value</span> <span class="pre">==</span> <span class="pre">c1</span></tt>;
otherwise, <tt class="literal"><span class="pre">r::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and only if <tt class="literal"><span class="pre">x</span></tt> is a class type
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body">If <a class="refentry reference" href="./cfg-no-has-xxx.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_CFG_NO_HAS_XXX</span></tt></a> is defined, <tt class="literal"><span class="pre">r::value</span> <span class="pre">==</span> <span class="pre">c1</span></tt>;
otherwise, <tt class="literal"><span class="pre">r::value</span> <span class="pre">==</span> <span class="pre">true</span></tt> if and only if <tt class="literal"><span class="pre">x</span></tt> is a class type
that has a nested type memeber <tt class="literal"><span class="pre">x::name</span></tt>.</td>
</tr>
</tbody>
@@ -115,14 +116,13 @@ that has a nested type memeber <tt class="literal"><span class="pre">x::name</sp
<pre class="literal-block">
typedef trait&lt; x,c2 &gt;::type r;
</pre>
<table class="last docutils field-list" frame="void" rules="none">
<table class="last field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference" href="./integral-constant.html">Integral Constant</a>.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">If <a class="reference internal" href="./cfg-no-has-xxx.html">BOOST_MPL_CFG_NO_HAS_XXX</a> is defined, <tt class="literal"><span class="pre">r::value</span> <span class="pre">==</span> <span class="pre">c2::value</span></tt>;
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">If <a class="refentry reference" href="./cfg-no-has-xxx.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_CFG_NO_HAS_XXX</span></tt></a> is defined, <tt class="literal"><span class="pre">r::value</span> <span class="pre">==</span> <span class="pre">c2::value</span></tt>;
otherwise, equivalent to</p>
<pre class="last literal-block">
typedef trait&lt;x&gt;::type r;
@@ -136,7 +136,7 @@ typedef trait&lt;x&gt;::type r;
</tbody>
</table>
</div>
<div class="section" id="id1341">
<div class="section" id="macros-introspection-has-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
<a href="./has-xxx-trait-named-def.html" class="identifier">BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF</a>(has_xxx, xxx, false)
@@ -164,21 +164,20 @@ struct test9 { typedef void (xxx)(); };
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test9&gt; ));
#endif
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test6,<a href="./bool.html" class="identifier">true_</a>&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test7,<a href="./bool.html" class="identifier">true_</a>&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test8,<a href="./bool.html" class="identifier">true_</a>&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test9,<a href="./bool.html" class="identifier">true_</a>&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test6,true_&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test7,true_&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test8,true_&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( has_xxx&lt;test9,true_&gt; ));
</pre>
</div>
<div class="section" id="id1342">
<div class="section" id="macros-introspection-has-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./macros.html">Macros</a>, <a class="reference internal" href="./has-xxx-trait-def.html">BOOST_MPL_HAS_XXX_TRAIT_DEF</a>, <a class="reference internal" href="./cfg-no-has-xxx.html">BOOST_MPL_CFG_NO_HAS_XXX</a></p>
<p><a class="reference" href="./macros.html">Macros</a>, <a class="refentry reference" href="./has-xxx-trait-def.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_HAS_XXX_TRAIT_DEF</span></tt></a>, <a class="refentry reference" href="./cfg-no-has-xxx.html"><tt class="refentry literal"><span class="pre">BOOST_MPL_CFG_NO_HAS_XXX</span></tt></a></p>
<!-- modtime: November 13, 2004 02:53:15 +0000 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./has-xxx-trait-def.html" class="navigation-link">Prev</a>&nbsp;<a href="./configuration.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./has-xxx-trait-def.html" class="navigation-link">Back</a>&nbsp;Along</span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./introspection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+29 -29
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: identity</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,11 +15,11 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./miscellaneous.html" class="navigation-link">Miscellaneous</a> / <a href="./identity.html" class="navigation-link">identity</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="identity">
<h1><a class="toc-backref" href="./miscellaneous.html#id1564">identity</a></h1>
<div class="section" id="id1146">
<h1><a class="toc-backref" href="./miscellaneous.html#id488" name="identity">identity</a></h1>
<div class="section" id="identity-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
template&lt;
typename X
&gt;
struct <a href="./identity.html" class="identifier">identity</a>
@@ -25,32 +28,32 @@ struct <a href="./identity.html" class="identifier">identity</a>
};
</pre>
</div>
<div class="section" id="id1147">
<div class="section" id="identity-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>The <a class="reference external" href="http://mathworld.wolfram.com/IdentityFunction.html" target="_top">identity</a> metafunction. Returns <tt class="literal"><span class="pre">X</span></tt> unchanged.</p>
<p>The <a class="reference" href="http://mathworld.wolfram.com/IdentityFunction.html" target="_top">identity</a> metafunction. Returns <tt class="literal"><span class="pre">X</span></tt> unchanged.</p>
</div>
<div class="section" id="id1149">
<div class="section" id="identity-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/identity.hpp" class="header">boost/mpl/identity.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id1150">
<div class="section" id="identity-model-of">
<h3><a class="subsection-title" href="#model-of" name="model-of">Model of</a></h3>
<p><a class="reference internal" href="./metafunction.html">Metafunction</a></p>
<p><a class="reference" href="./metafunction.html">Metafunction</a></p>
</div>
<div class="section" id="id1151">
<div class="section" id="identity-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="22%" />
<col width="28%" />
<col width="51%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
@@ -61,51 +64,48 @@ struct <a href="./identity.html" class="identifier">identity</a>
</tbody>
</table>
</div>
<div class="section" id="id1152">
<div class="section" id="identity-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For an arbitrary type <tt class="literal"><span class="pre">x</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./identity.html" class="identifier">identity</a>&lt;x&gt;::type r;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">A type.</p>
</td>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">A type.</td>
</tr>
<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p>
<pre class="literal-block">
<pre class="last literal-block">
typedef x r;
</pre>
</td>
</tr>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><p class="first last"><tt class="literal"><span class="pre">is_same&lt;r,x&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt>.</p>
</td>
<tr class="field"><th class="field-name">Postcondition:</th><td class="field-body"><tt class="literal"><span class="pre">is_same&lt;r,x&gt;::value</span> <span class="pre">==</span> <span class="pre">true</span></tt>.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="id1153">
<div class="section" id="identity-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./apply.html" class="identifier">apply</a>&lt; <a href="./identity.html" class="identifier">identity</a>&lt;<a href="./placeholders.html" class="identifier">_1</a>&gt;, char &gt;::type t1;
typedef <a href="./apply.html" class="identifier">apply</a>&lt; <a href="./identity.html" class="identifier">identity</a>&lt;<a href="./placeholders.html" class="identifier">_2</a>&gt;, char,int &gt;::type t2;
typedef <a href="./apply.html" class="identifier">apply</a>&lt; <a href="./identity.html" class="identifier">identity</a>&lt;_1&gt;, char &gt;::type t1;
typedef <a href="./apply.html" class="identifier">apply</a>&lt; <a href="./identity.html" class="identifier">identity</a>&lt;_2&gt;, char,int &gt;::type t2;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; t1, char &gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt; t2, int > ));
</pre>
</div>
<div class="section" id="id1154">
<div class="section" id="identity-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./placeholders.html">Placeholders</a>, <a class="reference internal" href="./trivial.html#label-metafunctions-trivial">Trivial Metafunctions</a>, <a class="reference internal" href="./always.html">always</a>, <a class="reference internal" href="./apply.html">apply</a></p>
<p><a class="reference" href="./metafunctions.html">Metafunctions</a>, <a class="reference" href="./placeholders.html">Placeholders</a>, <a class="reference" href="./trivial.html">Trivial Metafunctions</a>, <a class="refentry reference" href="./always.html"><tt class="refentry literal"><span class="pre">always</span></tt></a>, <a class="refentry reference" href="./apply.html"><tt class="refentry literal"><span class="pre">apply</span></tt></a></p>
<!-- modtime: November 10, 2004 04:40:31 +0000 -->
<!-- Metafunctions/Miscellaneous//always |20 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./miscellaneous.html" class="navigation-link">Prev</a>&nbsp;<a href="./always.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group">Back&nbsp;<a href="./always.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./miscellaneous.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>
+22 -35
View File
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Copyright Aleksey Gurtovoy 2006. 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) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.3.6: http://docutils.sourceforge.net/" />
<title>The MPL Reference Manual: if_c</title>
<link rel="stylesheet" href="../style.css" type="text/css" />
</head>
@@ -12,11 +15,11 @@
<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./type-selection.html" class="navigation-link">Type Selection</a> / <a href="./if-c.html" class="navigation-link">if_c</a></td>
</tr></table><div class="header-separator"></div>
<div class="section" id="if-c">
<h1><a class="toc-backref" href="./type-selection.html#id1521">if_c</a></h1>
<div class="section" id="id866">
<h1><a class="toc-backref" href="./type-selection.html#id447" name="if-c">if_c</a></h1>
<div class="section" id="type-if-synopsis">
<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3>
<pre class="literal-block">
template&lt;
template&lt;
bool c
, typename T1
, typename T2
@@ -27,30 +30,30 @@ struct <a href="./if-c.html" class="identifier">if_c</a>
};
</pre>
</div>
<div class="section" id="id867">
<div class="section" id="type-if-description">
<h3><a class="subsection-title" href="#description" name="description">Description</a></h3>
<p>Returns one of its two arguments, <tt class="literal"><span class="pre">T1</span></tt> or <tt class="literal"><span class="pre">T2</span></tt>, depending on the value of
integral constant <tt class="literal"><span class="pre">c</span></tt>. <tt class="literal"><span class="pre"><a href="./if-c.html" class="identifier">if_c</a>&lt;c,t1,t2&gt;::type</span></tt> is a shorcut notation for
integral constant <tt class="literal"><span class="pre">c</span></tt>. <tt class="literal"><span class="pre"><a href="./if-c.html" class="identifier">if_c</a>&lt;c,t1,t2&gt;::type</span></tt> is a shorcut notation for
<tt class="literal"><span class="pre"><a href="./if.html" class="identifier">if_</a>&lt;</span> <span class="pre"><a href="./bool.html" class="identifier">bool_</a>&lt;c&gt;,t1,t2</span> <span class="pre">&gt;::type</span></tt>.</p>
</div>
<div class="section" id="id868">
<div class="section" id="type-if-header">
<h3><a class="subsection-title" href="#header" name="header">Header</a></h3>
<pre class="literal-block">
#include &lt;<a href="../../../../boost/mpl/if.hpp" class="header">boost/mpl/if.hpp</a>&gt;
</pre>
</div>
<div class="section" id="id869">
<div class="section" id="type-if-parameters">
<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3>
<table border="1" class="docutils table">
<table border="1" class="table">
<colgroup>
<col width="15%" />
<col width="36%" />
<col width="48%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Parameter</th>
<th class="head">Requirement</th>
<th class="head">Description</th>
<tr><th>Parameter</th>
<th>Requirement</th>
<th>Description</th>
</tr>
</thead>
<tbody valign="top">
@@ -65,13 +68,13 @@ integral constant <tt class="literal"><span class="pre">c</span></tt>. <tt class
</tbody>
</table>
</div>
<div class="section" id="id870">
<div class="section" id="type-if-expression-semantics">
<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3>
<p>For any integral constant <tt class="literal"><span class="pre">c</span></tt> and arbitrary types <tt class="literal"><span class="pre">t1</span></tt>, <tt class="literal"><span class="pre">t2</span></tt>:</p>
<pre class="literal-block">
typedef <a href="./if-c.html" class="identifier">if_c</a>&lt;c,t1,t2&gt;::type t;
</pre>
<table class="docutils field-list" frame="void" rules="none">
<table class="field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
@@ -82,7 +85,7 @@ typedef <a href="./if-c.html" class="identifier">if_c</a>&lt;c,t1,t2&gt;::type t
</tbody>
</table>
</div>
<div class="section" id="id871">
<div class="section" id="type-if-example">
<h3><a class="subsection-title" href="#example" name="example">Example</a></h3>
<pre class="literal-block">
typedef <a href="./if-c.html" class="identifier">if_c</a>&lt;true,char,long&gt;::type t1;
@@ -91,32 +94,16 @@ typedef <a href="./if-c.html" class="identifier">if_c</a>&lt;false,char,long&gt;
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;t1, char&gt; ));
<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( is_same&lt;t2, long&gt; ));
</pre>
<pre class="literal-block">
// allocates space for an object of class T on heap or &quot;inplace&quot;
// depending on its <a href="./size.html" class="identifier">size</a>
template&lt; typename T &gt; struct lightweight
{
// ...
typedef typename <a href="./if-c.html" class="identifier">if_c</a>&lt;
sizeof(T) &lt;= sizeof(T*)
, inplace_storage&lt;T&gt;
, heap_storage&lt;T&gt;
&gt;::type impl_t;
impl_t impl;
};
</pre>
</div>
<div class="section" id="id872">
<div class="section" id="type-if-see-also">
<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3>
<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./integral-constant.html">Integral Constant</a>, <a class="reference internal" href="./if.html">if_</a>, <a class="reference internal" href="./eval-if.html">eval_if</a>, <a class="reference internal" href="./bool.html">bool_</a></p>
<p><a class="reference" href="./metafunctions.html">Metafunctions</a>, <a class="reference" href="./integral-constant.html">Integral Constant</a>, <a class="refentry reference" href="./if.html"><tt class="refentry literal"><span class="pre">if_</span></tt></a>, <a class="refentry reference" href="./eval-if.html"><tt class="refentry literal"><span class="pre">eval_if</span></tt></a>, <a class="refentry reference" href="./bool.html"><tt class="refentry literal"><span class="pre">bool_</span></tt></a></p>
<!-- modtime: November 10, 2004 04:40:22 +0000 -->
<!-- Metafunctions/Type Selection//eval_if |30 -->
</div>
</div>
<div class="footer-separator"></div>
<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./if.html" class="navigation-link">Prev</a>&nbsp;<a href="./eval-if.html" class="navigation-link">Next</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./if.html" class="navigation-link">Back</a>&nbsp;<a href="./eval-if.html" class="navigation-link">Along</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./type-selection.html" class="navigation-link">Up</a>&nbsp;<a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator">&nbsp;|&nbsp;</span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td>
<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body>
</tr></table></body>
</html>

Some files were not shown because too many files have changed in this diff Show More