mirror of
https://github.com/boostorg/preprocessor.git
synced 2025-06-29 14:01:08 +02:00
Compare commits
204 Commits
boost-1.56
...
boost-1.73
Author | SHA1 | Date | |
---|---|---|---|
e4fb5f4866 | |||
9cf66925d4 | |||
e4ce0f06f5 | |||
98f6c75e1e | |||
f99ed9921a | |||
a378d239da | |||
0332a793f5 | |||
6c350c6fc3 | |||
728c71ba75 | |||
1ab9385a91 | |||
688c3f2ee6 | |||
bd0db5ce8b | |||
da60e76913 | |||
661dd91603 | |||
ffb27a1d56 | |||
a6404a8fb2 | |||
732d00341f | |||
e7256313c4 | |||
b3036f1a63 | |||
de49676452 | |||
4f4f04c56b | |||
c5e90f23b7 | |||
776037ae56 | |||
a9827c8fc8 | |||
6db241a78d | |||
4fe7807f79 | |||
80107ea60a | |||
1473215dc7 | |||
291f92696d | |||
771edacbff | |||
ac99242b71 | |||
bda6ad9148 | |||
88a0365f4d | |||
6af29d8b77 | |||
af70b2872e | |||
b7b1425c7f | |||
54669af127 | |||
e439b2555e | |||
4cce94a84e | |||
2f9be1086a | |||
684e9991ec | |||
a42f374b97 | |||
0cdd09e6e1 | |||
22deb165b6 | |||
e476f10f52 | |||
c436de6142 | |||
5756fb08ad | |||
9b3e6a2cd6 | |||
d135cad759 | |||
8d26689387 | |||
f78f0a1d25 | |||
87fd89a7db | |||
adf2746626 | |||
fe70754559 | |||
45588469f3 | |||
344ce6abf9 | |||
31653b34c9 | |||
a4e304ca87 | |||
0e335df79e | |||
ee5ed2510d | |||
dd44e1eea5 | |||
b5c081bf7a | |||
347f48afae | |||
49a72ac4f2 | |||
56090c56b5 | |||
00b2f44624 | |||
a329a67b47 | |||
34af3a925c | |||
ad22f9686e | |||
39175c471f | |||
aa9ee3ae3f | |||
50ffeeee8b | |||
f54e270433 | |||
08ec2abb2e | |||
c4b1ce10bd | |||
1ecc2e2ec9 | |||
b19e4deacb | |||
dfc1c46ece | |||
e474eea44f | |||
b03c6cd3c0 | |||
a6275942f3 | |||
d8389ffda6 | |||
075a3a02c8 | |||
dc41624aba | |||
4ae346bbc5 | |||
d922d757be | |||
eb143c10f8 | |||
e1e3a2e21e | |||
c2beb74b90 | |||
e70abe7b49 | |||
ee73989a21 | |||
7835ed019c | |||
3292532517 | |||
4e29a160b9 | |||
b1be22cf77 | |||
f59d83b8bf | |||
88c4282493 | |||
02ab183b96 | |||
735e301c46 | |||
e983c16e61 | |||
132eb67cec | |||
4c39e92496 | |||
2689b91d91 | |||
478bb6e10e | |||
3c3c7b42d9 | |||
3f97464c27 | |||
d4fbb8fda2 | |||
38e7f69054 | |||
3ed3cd689e | |||
fc6229660e | |||
b125850bbb | |||
350c0e59b1 | |||
2612bf706c | |||
b84235fcb7 | |||
4aa8ae8a01 | |||
9044b17f18 | |||
106f5a43a1 | |||
915ab7834c | |||
dc61cc1373 | |||
4c2c83f9f2 | |||
862f64c45c | |||
06c18a67f8 | |||
eb2a675b8f | |||
b12333b419 | |||
1543b5fbf7 | |||
86378d648e | |||
633f1e679a | |||
4360660e39 | |||
827ff0905c | |||
9cb039ab8b | |||
1b3fe1570b | |||
4f0adfb553 | |||
01848af60d | |||
dc54fee21c | |||
77a9177c31 | |||
f1165249fb | |||
fd135a078f | |||
eedd7378f1 | |||
e1ade3ea3b | |||
3760758d4e | |||
0baf10bfc6 | |||
e72b298001 | |||
f77c8f2c85 | |||
9c2ef3ae46 | |||
1a40a5ea30 | |||
15f75eca35 | |||
8924ad016f | |||
9c478f0c39 | |||
cee3323340 | |||
503175a63e | |||
46ff3eb1f4 | |||
04634b402b | |||
83f05f5325 | |||
00d05d4f04 | |||
542bd2653d | |||
fd36e236bc | |||
c4bf80ee1d | |||
2cea910cd8 | |||
4fc958a89d | |||
08c50b219d | |||
3a472c2084 | |||
4063b1564b | |||
b70598c357 | |||
56525c76cc | |||
8ac31eb612 | |||
f61bb8a80f | |||
df165d9fc6 | |||
fb732aaab5 | |||
9dfce3363c | |||
6590e41581 | |||
ec93b32f82 | |||
6c091d7f99 | |||
b3b9e80f86 | |||
ea91a3defa | |||
4ed6f6e07a | |||
2c7cf9410a | |||
975c39b910 | |||
f80bb83f3b | |||
21ccb35814 | |||
6b0be3fe4f | |||
1422fce0db | |||
9d2d1fffdf | |||
60691e3a49 | |||
3f75659921 | |||
b43a4708eb | |||
b923dadf19 | |||
e57370608e | |||
7da3c88d82 | |||
70e0f2d6e0 | |||
b03d46129c | |||
9d308c1b9d | |||
1f16a481c7 | |||
181a88db7e | |||
697ebcd840 | |||
70e775452a | |||
dec4cfd273 | |||
7da9dbb7a9 | |||
5c22605c3d | |||
4614c62130 | |||
fe2a9cbfcc | |||
c66ea5871f | |||
6fe93a542d | |||
d2bfda8308 | |||
0a23b4d6a6 |
323
.travis.yml
Normal file
323
.travis.yml
Normal file
@ -0,0 +1,323 @@
|
||||
# Copyright 2016-2019 Peter Dimov
|
||||
# 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)
|
||||
|
||||
language: cpp
|
||||
|
||||
dist: xenial
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
- /feature\/.*/
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- BOGUS_JOB=true
|
||||
|
||||
matrix:
|
||||
|
||||
exclude:
|
||||
- env: BOGUS_JOB=true
|
||||
|
||||
include:
|
||||
- os: linux
|
||||
compiler: g++
|
||||
env: TOOLSET=gcc COMPILER=g++ CXXSTD=03,11
|
||||
|
||||
- os: linux
|
||||
compiler: g++-4.4
|
||||
env: TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.4
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-4.6
|
||||
env: TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03,0x
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.6
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-4.7
|
||||
env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-4.8
|
||||
env: TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.8
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- os: linux
|
||||
compiler: g++-4.9
|
||||
env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-4.9
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-5
|
||||
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-5
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-6
|
||||
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-6
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: g++-7
|
||||
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-8
|
||||
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-8
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: g++-9
|
||||
env: TOOLSET=gcc COMPILER=g++-9 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- g++-9
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: clang++
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: /usr/bin/clang++
|
||||
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.3
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: /usr/bin/clang++
|
||||
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=03,11
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.4
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-3.5
|
||||
env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.5
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-3.6
|
||||
env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.6
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-3.7
|
||||
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-3.8
|
||||
env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.8
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-3.9
|
||||
env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-3.9
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-4.0
|
||||
env: TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-4.0
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-5.0
|
||||
env: TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-5.0
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-6.0
|
||||
env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-6.0
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-7
|
||||
env: TOOLSET=clang COMPILER=clang++-7 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-7
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-xenial-7
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-8
|
||||
env: TOOLSET=clang COMPILER=clang++-8 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-8
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-xenial-8
|
||||
|
||||
- os: linux
|
||||
compiler: clang++-9
|
||||
env: TOOLSET=clang COMPILER=clang++-9 CXXSTD=03,11,14,17,2a
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- clang-9
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main'
|
||||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
compiler: clang++-libc++
|
||||
env: TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03,11,14,1z
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libc++-dev
|
||||
|
||||
- os: osx
|
||||
compiler: clang++
|
||||
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
|
||||
|
||||
- os: linux
|
||||
env: CMAKE_TEST=1
|
||||
script:
|
||||
- mkdir __build__ && cd __build__
|
||||
- cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=preprocessor ..
|
||||
- ctest --output-on-failure -R boost_preprocessor
|
||||
|
||||
- os: linux
|
||||
env: CMAKE_SUBDIR_TEST=1
|
||||
install: true
|
||||
script:
|
||||
- cd test/cmake_subdir_test && mkdir __build__ && cd __build__
|
||||
- cmake ..
|
||||
- cmake --build .
|
||||
- cmake --build . --target check
|
||||
|
||||
- os: linux
|
||||
env: CMAKE_INSTALL_TEST=1
|
||||
script:
|
||||
- mkdir __build__ && cd __build__
|
||||
- cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=preprocessor -DCMAKE_INSTALL_PREFIX=~/.local ..
|
||||
- cmake --build . --target install
|
||||
- cd ../libs/preprocessor/test/cmake_install_test && mkdir __build__ && cd __build__
|
||||
- cmake -DCMAKE_INSTALL_PREFIX=~/.local ..
|
||||
- cmake --build .
|
||||
- cmake --build . --target check
|
||||
|
||||
install:
|
||||
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
|
||||
- cd ..
|
||||
- git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||
- cd boost-root
|
||||
- git submodule update --init tools/boostdep
|
||||
- cp -r $TRAVIS_BUILD_DIR/* libs/preprocessor
|
||||
- python tools/boostdep/depinst/depinst.py preprocessor
|
||||
- ./bootstrap.sh
|
||||
- ./b2 headers
|
||||
|
||||
script:
|
||||
- |-
|
||||
echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
|
||||
- ./b2 -j 3 libs/preprocessor/test toolset=$TOOLSET cxxstd=$CXXSTD
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: always
|
25
CMakeLists.txt
Normal file
25
CMakeLists.txt
Normal file
@ -0,0 +1,25 @@
|
||||
# Copyright 2019 Peter Dimov
|
||||
# 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
|
||||
|
||||
cmake_minimum_required(VERSION 3.5...3.16)
|
||||
|
||||
project(boost_preprocessor VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
|
||||
|
||||
add_library(boost_preprocessor INTERFACE)
|
||||
add_library(Boost::preprocessor ALIAS boost_preprocessor)
|
||||
|
||||
target_include_directories(boost_preprocessor INTERFACE include)
|
||||
|
||||
if(BOOST_SUPERPROJECT_VERSION)
|
||||
|
||||
include(BoostInstall)
|
||||
boost_install(TARGETS boost_preprocessor HEADER_DIRECTORY include/)
|
||||
|
||||
endif()
|
||||
|
||||
if(BUILD_TESTING)
|
||||
|
||||
add_subdirectory(test)
|
||||
|
||||
endif()
|
95
appveyor.yml
Normal file
95
appveyor.yml
Normal file
@ -0,0 +1,95 @@
|
||||
# Copyright 2017 Edward Diener
|
||||
# Copyright 2018 Mike Dev
|
||||
# Copyright 2019 Peter Dimov
|
||||
# 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)
|
||||
|
||||
version: 1.0.{build}-{branch}
|
||||
|
||||
shallow_clone: true
|
||||
|
||||
configuration:
|
||||
- boost_build_test
|
||||
- cmake_test
|
||||
- cmake_subdir_test
|
||||
- cmake_install_test
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
- /feature\/.*/
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0,msvc-12.0,msvc-14.0
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
TOOLSET: msvc-14.1
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
TOOLSET: msvc-14.2
|
||||
|
||||
matrix:
|
||||
exclude:
|
||||
- configuration: cmake_test
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
- configuration: cmake_test
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
|
||||
build: off
|
||||
|
||||
install:
|
||||
- set BOOST_BRANCH=develop
|
||||
- if "%APPVEYOR_REPO_BRANCH%" == "master" set BOOST_BRANCH=master
|
||||
- cd ..
|
||||
- git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
|
||||
- cd boost-root
|
||||
- git submodule update --init tools/boostdep
|
||||
- xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\preprocessor\
|
||||
- python tools/boostdep/depinst/depinst.py preprocessor
|
||||
|
||||
for:
|
||||
-
|
||||
matrix:
|
||||
only:
|
||||
- configuration: boost_build_test
|
||||
|
||||
test_script:
|
||||
- bootstrap
|
||||
- b2 -d0 headers
|
||||
- b2 -j3 libs/preprocessor/test toolset=%TOOLSET%
|
||||
|
||||
-
|
||||
matrix:
|
||||
only:
|
||||
- configuration: cmake_test
|
||||
|
||||
test_script:
|
||||
- mkdir __build__ && cd __build__
|
||||
- cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=preprocessor ..
|
||||
- ctest --output-on-failure -R boost_preprocessor -C Debug
|
||||
|
||||
-
|
||||
matrix:
|
||||
only:
|
||||
- configuration: cmake_subdir_test
|
||||
|
||||
test_script:
|
||||
- cd libs/preprocessor/test/cmake_subdir_test && mkdir __build__ && cd __build__
|
||||
- cmake ..
|
||||
- cmake --build .
|
||||
- cmake --build . --target check
|
||||
|
||||
-
|
||||
matrix:
|
||||
only:
|
||||
- configuration: cmake_install_test
|
||||
|
||||
test_script:
|
||||
- mkdir __build__ && cd __build__
|
||||
- cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=preprocessor -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix ..
|
||||
- cmake --build . --target install
|
||||
- cd ../libs/preprocessor/test/cmake_install_test && mkdir __build__ && cd __build__
|
||||
- cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix ..
|
||||
- cmake --build .
|
||||
- cmake --build . --target check
|
2494
doc/AppendixA-AnIntroductiontoPreprocessorMetaprogramming.html
Normal file
2494
doc/AppendixA-AnIntroductiontoPreprocessorMetaprogramming.html
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,29 +1,38 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>contents.html</title>
|
||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||
<style>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>contents.html</title>
|
||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||
<style>
|
||||
a, a:link, a:visited { color: black; font-weight: bold; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h4><a href="http://www.boostpro.com/mplbook/preprocessor.html" target="_top">Introduction</a></h4>
|
||||
<h4><a href="topics.html">Topics</h4>
|
||||
<h4><a href="terms.html">Terminology</h4>
|
||||
<h4><a href="data.html">Data Types</h4>
|
||||
<h4><a href="ref.html">Reference</h4>
|
||||
<h4><a href="headers.html">Headers</h4>
|
||||
<h4><a href="examples.html">Examples</h4>
|
||||
<h4><a href="miscellanea.html">Miscellanea</h4>
|
||||
|
||||
<!--
|
||||
<EFBFBD> Copyright Housemarque Oy 2002
|
||||
<EFBFBD> Copyright Paul Mensonides 2002
|
||||
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)
|
||||
-->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</head>
|
||||
<body>
|
||||
<h4><a href="AppendixA-AnIntroductiontoPreprocessorMetaprogramming.html"
|
||||
target="_top">Introduction</a></h4>
|
||||
<h4><a href="topics.html">Topics</a></h4>
|
||||
<a href="topics.html">
|
||||
</a>
|
||||
<h4><a href="topics.html"></a><a href="terms.html">Terminology</a></h4>
|
||||
<a href="terms.html">
|
||||
</a>
|
||||
<h4><a href="terms.html"></a><a href="data.html">Data Types</a></h4>
|
||||
<a href="data.html">
|
||||
</a>
|
||||
<h4><a href="data.html"></a><a href="ref.html">Reference</a></h4>
|
||||
<a href="ref.html">
|
||||
</a>
|
||||
<h4><a href="ref.html"></a><a href="headers.html">Headers</a></h4>
|
||||
<a href="headers.html">
|
||||
</a>
|
||||
<h4><a href="headers.html"></a><a href="examples.html">Examples</a></h4>
|
||||
<a href="examples.html">
|
||||
</a>
|
||||
<h4><a href="examples.html"></a><a href="miscellanea.html">Miscellanea</a></h4>
|
||||
<a href="miscellanea.html">
|
||||
<!--
|
||||
<EFBFBD> Copyright Housemarque Oy 2002<30> Copyright Paul Mensonides 2002
|
||||
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)--> </a>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>arrays.html</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
@ -17,12 +18,19 @@
|
||||
size. It only requires that an element exists at a certain index. </div>
|
||||
<div> This allows macro parameters to be variable in size and allows data
|
||||
states to change size without the user explicitly keeping track of the
|
||||
size independently.</div>
|
||||
size independently.<br>
|
||||
<br>
|
||||
An <i>array </i>can be empty and have no elements. An empty array has a
|
||||
0 size. The notation for an empty array is '(0,())'.<br>
|
||||
<br>
|
||||
<span style="font-style: italic;"> </span></div>
|
||||
<div>With variadic macro support a <i>tuple </i>has all of the
|
||||
functionality as an <i>array</i>, knows its own size, and is easier
|
||||
syntactically to use. Because of that an <i>array</i> should be used, as
|
||||
opposed to a <i>tuple</i>, only if your compiler does not support
|
||||
variadic macros.<br>
|
||||
variadic macros. The only advantage an <i>array </i>has over a <i>tuple
|
||||
</i>is that an <i>array </i>can be empty while a <i>tuple </i>always
|
||||
has at least one element and therefore can never have a size of 0.<br>
|
||||
<br>
|
||||
Elements of an <i>array</i> can be extracted with <b>BOOST_PP_ARRAY_ELEM</b>,
|
||||
an <i>array's</i> size can be extracted with <b>BOOST_PP_ARRAY_SIZE</b>,
|
||||
|
@ -1,46 +1,42 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>lists.html</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<h4>Lists</h4>
|
||||
<div>
|
||||
A <i>list</i> is a simple cons-style list with a head and a tail.
|
||||
The head of a <i>list</i> is an element,
|
||||
and the tail is either another <i>list</i> or <b>BOOST_PP_NIL</b>.
|
||||
For example,
|
||||
</div>
|
||||
<div class="code">
|
||||
(<i>a</i>, (<i>b</i>, (<i>c</i>, <b>BOOST_PP_NIL</b>)))
|
||||
</div>
|
||||
<div>
|
||||
...is a <i>list</i> of <i>3</i> elements--<i>a</i>, <i>b</i>, and <i>c</i>.
|
||||
</div>
|
||||
<div>
|
||||
This allows macro parameters to be variable in size and allows data states to change
|
||||
size without the user explicitly keeping track of the size independently.
|
||||
</div>
|
||||
<div>
|
||||
Elements of a <i>list</i> can be extracted with
|
||||
<b>BOOST_PP_LIST_FIRST</b> and <b>BOOST_PP_LIST_REST</b>.
|
||||
</div>
|
||||
<h4>Primitives</h4>
|
||||
<ul>
|
||||
<li><a href="../ref/list_first.html">BOOST_PP_LIST_FIRST</a></li>
|
||||
<li><a href="../ref/list_rest.html">BOOST_PP_LIST_REST</a></li>
|
||||
<li><a href="../ref/nil.html">BOOST_PP_NIL</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;">
|
||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
||||
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>lists.html</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<h4>Lists</h4>
|
||||
<div> A <i>list</i> is a simple cons-style list with a head and a
|
||||
tail. The head of a <i>list</i> is an element, and the tail is
|
||||
either another <i>list</i> or <b>BOOST_PP_NIL</b>. For example, </div>
|
||||
<div class="code"> (<i>a</i>, (<i>b</i>, (<i>c</i>, <b>BOOST_PP_NIL</b>)))
|
||||
</div>
|
||||
<div> ...is a <i>list</i> of <i>3</i> elements--<i>a</i>, <i>b</i>, and <i>c</i>.
|
||||
</div>
|
||||
<div> This allows macro parameters to be variable in size and allows data
|
||||
states to change size without the user explicitly keeping track of the
|
||||
size independently.<br>
|
||||
<br>
|
||||
A list can be empty and therefore have a size of 0. An empty list is
|
||||
represented by the notation <b>BOOST_PP_NIL.<br>
|
||||
<br>
|
||||
</b></div>
|
||||
<div> Elements of a <i>list</i> can be extracted with <b>BOOST_PP_LIST_FIRST</b>
|
||||
and <b>BOOST_PP_LIST_REST</b>. </div>
|
||||
<h4>Primitives</h4>
|
||||
<ul>
|
||||
<li><a href="../ref/list_first.html">BOOST_PP_LIST_FIRST</a></li>
|
||||
<li><a href="../ref/list_rest.html">BOOST_PP_LIST_REST</a></li>
|
||||
<li><a href="../ref/nil.html">BOOST_PP_NIL</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||
<i><EFBFBD> Copyright Paul Mensonides 2002</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,30 +1,23 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>sequences.html</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<h4>
|
||||
Sequences
|
||||
</h4>
|
||||
<div>
|
||||
A <i>sequence</i> (abbreviated to <i>seq</i>) is a group of adjacent parenthesized elements. For example,
|
||||
</div>
|
||||
<div class="code">
|
||||
(<i>a</i>)(<i>b</i>)(<i>c</i>)
|
||||
</div>
|
||||
<div>
|
||||
...is a <i>seq</i> of <i>3</i> elements--<i>a</i>, <i>b</i>, and <i>c</i>.
|
||||
</div>
|
||||
<div>
|
||||
<i>Sequences</i> are data structures that merge the properties of both <i>lists</i> and
|
||||
<i>tuples</i> with the exception that a <i>seq</i> cannot be empty.
|
||||
Therefore, an "empty" <i>seq</i> is considered a special case scenario that
|
||||
must be handled separately in C++.
|
||||
</div>
|
||||
<div class="code">
|
||||
<pre>
|
||||
#define SEQ (x)(y)(z)
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>sequences.html</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<h4> Sequences </h4>
|
||||
<div> A <i>sequence</i> (abbreviated to <i>seq</i>) is a group of adjacent
|
||||
parenthesized elements. For example, </div>
|
||||
<div class="code"> (<i>a</i>)(<i>b</i>)(<i>c</i>) </div>
|
||||
<div> ...is a <i>seq</i> of <i>3</i> elements--<i>a</i>, <i>b</i>, and <i>c</i>.
|
||||
</div>
|
||||
<div> <i>Sequences</i> are data structures that merge the properties of
|
||||
both <i>lists</i> and <i>tuples</i> with the exception that a <i>seq, </i>like
|
||||
a <i>tuple, </i>cannot be empty. Therefore, an "empty" <i>seq</i>
|
||||
is considered a special case scenario that must be handled separately in
|
||||
C++. </div>
|
||||
<div class="code">
|
||||
<pre>#define SEQ (x)(y)(z)
|
||||
#define REVERSE(s, state, elem) (elem) state
|
||||
// append to head ^
|
||||
|
||||
@ -41,35 +34,27 @@ BOOST_PP_SEQ_FOLD_RIGHT(INC, BOOST_PP_SEQ_NIL, SEQ)
|
||||
// ^
|
||||
// special placeholder that will be "eaten"
|
||||
// by appending to the tail
|
||||
</pre>
|
||||
</div>
|
||||
<div>
|
||||
<i>Sequences</i> are extremely efficient. Element access speed approaches
|
||||
random access--even with <i>seqs</i> of up to <i>256</i> elements. This
|
||||
is because element access (among other things) is implemented iteratively
|
||||
rather than recursively. Therefore, elements can be accessed at extremely
|
||||
high indices even on preprocessors with low maximum expansion depths.
|
||||
</div>
|
||||
<div>
|
||||
Elements of a <i>seq</i> can be extracted with <b>BOOST_PP_SEQ_ELEM</b>.
|
||||
</div>
|
||||
<h4>
|
||||
Primitives
|
||||
</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="../ref/seq_elem.html">BOOST_PP_SEQ_ELEM</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;">
|
||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
||||
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</pre> </div>
|
||||
<div> <i>Sequences</i> are extremely efficient. Element access speed
|
||||
approaches random access--even with <i>seqs</i> of up to <i>256</i>
|
||||
elements. This is because element access (among other things) is
|
||||
implemented iteratively rather than recursively. Therefore, elements
|
||||
can be accessed at extremely high indices even on preprocessors with low
|
||||
maximum expansion depths. </div>
|
||||
<div> Elements of a <i>seq</i> can be extracted with <b>BOOST_PP_SEQ_ELEM</b>.
|
||||
</div>
|
||||
<h4> Primitives </h4>
|
||||
<ul>
|
||||
<li> <a href="../ref/seq_elem.html">BOOST_PP_SEQ_ELEM</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||
<i><EFBFBD> Copyright Paul Mensonides 2002</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,5 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>tuples.html</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
@ -9,13 +10,19 @@
|
||||
parenthesis. For example, </div>
|
||||
<div class="code"> (<i>a</i>, <i>b</i>, <i>c</i>) </div>
|
||||
<div> ...is a <i>tuple</i> of <i>3</i> elements--<i>a</i>, <i>b</i>, and
|
||||
<i>c</i>. </div>
|
||||
<i>c</i>.<br>
|
||||
<br>
|
||||
A <i>tuple </i>cannot be empty. The notation '()' as a <i>tuple </i>is
|
||||
a single element <i>tuple </i>of size 1, where the element is empty. </div>
|
||||
<div> <i>Tuples</i> are fast and easy to use. With variadic macro
|
||||
support it is not necessary to know the size of a <i>tuple; </i>without
|
||||
variadic macro support all access to <i>tuples</i> requires
|
||||
knowledge of its size. Use a <i>tuple </i>instead of an <i>array</i> if
|
||||
your compiler supports variadic macros, since a <i>tuple </i>has all of
|
||||
the functionality as an <i>array </i>and is easier syntactically to use.</div>
|
||||
the functionality as an <i>array </i>and is easier syntactically to use.
|
||||
The only functionality an <i>array </i>has which a <i>tuple </i>does
|
||||
not have is that an <i>array </i>can be empty whereas a <i>tuple </i>cannot
|
||||
be empty.</div>
|
||||
<div> Elements of a <i>tuple</i> can be extracted with <b>BOOST_PP_TUPLE_ELEM</b>.
|
||||
</div>
|
||||
<h4>Primitives</h4>
|
||||
|
@ -54,7 +54,7 @@
|
||||
<li class="ps"><a href="headers/comparison/not_equal.html">not_equal.hpp</a></li>
|
||||
<li>config/</li>
|
||||
<li class="ps"><a href="headers/config/limits.html">limits.hpp</a></li>
|
||||
<li class="ps"><a href="headers/config/variadics.html">variadics.hpp</a></li>
|
||||
<li class="ps"><a href="headers/config/variadics.html">config.hpp</a></li>
|
||||
<li><a href="headers/control.html">control.hpp</a></li>
|
||||
<li>control/</li>
|
||||
<li class="ps"><a href="headers/control/deduce_d.html">deduce_d.hpp</a></li>
|
||||
@ -80,12 +80,16 @@
|
||||
<li><a href="headers/facilities.html">facilities.hpp</a></li>
|
||||
<li>facilities/</li>
|
||||
<li class="ps"><a href="headers/facilities/apply.html">apply.hpp</a></li>
|
||||
<li class="ps"><a href="headers/facilities/check_empty.html">check_empty.hpp</a>
|
||||
<a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/facilities/empty.html">empty.hpp</a></li>
|
||||
<li class="ps"><a href="headers/facilities/expand.html">expand.hpp</a></li>
|
||||
<li class="ps"><a href="headers/facilities/identity.html">identity.hpp</a></li>
|
||||
<li class="ps"><a href="headers/facilities/intercept.html">intercept.hpp</a></li>
|
||||
<li class="ps"><a href="headers/facilities/overload.html">overload.hpp</a>
|
||||
<a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/facilities/va_opt.html">va_opt.hpp</a>
|
||||
<a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="headers/for.html">for.hpp*</a></li>
|
||||
<li><a href="headers/identity.html">identity.hpp*</a></li>
|
||||
<li><a href="headers/if.html">if.hpp*</a></li>
|
||||
@ -138,8 +142,10 @@
|
||||
<li>punctuation/</li>
|
||||
<li class="ps"><a href="headers/punctuation/comma.html">comma.hpp</a></li>
|
||||
<li class="ps"><a href="headers/punctuation/comma_if.html">comma_if.hpp</a></li>
|
||||
<li class="ps"><a href="headers/punctuation/is_begin_parens.html">is_begin_parens.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/punctuation/paren.html">paren.hpp</a></li>
|
||||
<li class="ps"><a href="headers/punctuation/paren_if.html">paren_if.hpp</a></li>
|
||||
<li class="ps"><a href="headers/punctuation/remove_parens.html">remove_parens.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="headers/repeat.html">repeat.hpp*</a></li>
|
||||
<li><a href="headers/repeat_2nd.html">repeat_2nd.hpp*</a></li>
|
||||
<li><a href="headers/repeat_3rd.html">repeat_3rd.hpp*</a></li>
|
||||
@ -228,6 +234,7 @@
|
||||
<li><a href="headers/variadic.html">variadic.hpp</a></li>
|
||||
<li>variadic/</li>
|
||||
<li class="ps"><a href="headers/variadic/elem.html">elem.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/variadic/has_opt.html">has_opt.hpp</a> </li>
|
||||
<li class="ps"><a href="headers/variadic/size.html">size.hpp</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li class="ps"><a href="headers/variadic/to_array.html">to_array.hpp</a> <a
|
||||
href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
|
@ -11,7 +11,7 @@ defines a macro that converts an <i>array</i> to a <i>list</i>. </div>
|
||||
</div>
|
||||
<h4>Contents</h4>
|
||||
<ul>
|
||||
<li><a href="../../ref/to_list.html">BOOST_PP_ARRAY_TO_LIST</a></li>
|
||||
<li><a href="../../ref/array_to_list.html">BOOST_PP_ARRAY_TO_LIST</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2011</i> </div>
|
||||
|
@ -1,19 +1,19 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>config/variadics.hpp</title>
|
||||
<title>config/config.hpp</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>config/variadics.hpp</b>
|
||||
header defines a macro for determining variadic macro support. The file
|
||||
is automatically included when needed internally. The end-user can
|
||||
include it also in order to use the macro. </div>
|
||||
The <b>config/config.hpp</b>
|
||||
header defines internal configuration macros as well as a macro for determining variadic macro support. The file
|
||||
is automatically included whenever any Boost PP macros are used. The end-user can manually
|
||||
include it in order to use the BOOST_PP_VARIADICS macro, but normally should never have to do so. </div>
|
||||
<h4>
|
||||
Usage
|
||||
</h4>
|
||||
<div class="code">
|
||||
#include <b><boost/preprocessor/config/variadics.hpp></b>
|
||||
#include <b><boost/preprocessor/config/config.hpp></b>
|
||||
</div>
|
||||
<h4>
|
||||
Contents
|
||||
@ -21,7 +21,7 @@ include it also in order to use the macro. </div>
|
||||
<ul>
|
||||
<li><a href="../../ref/variadics.html">BOOST_PP_VARIADICS</a></li></ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"><i><EFBFBD> Copyright Edward Diener 2011</i>
|
||||
<div style="margin-left: 0px;"><i><EFBFBD> Copyright Edward Diener 2011,2014</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
|
@ -15,6 +15,7 @@
|
||||
<ul>
|
||||
<li><a href="facilities/apply.html"><boost/preprocessor/facilities/apply.hpp></a></li>
|
||||
<li><a href="facilities/empty.html"><boost/preprocessor/facilities/empty.hpp></a></li>
|
||||
<li><a href="facilities/check_empty.html"><boost/preprocessor/facilities/check_empty.hpp></a> <a href="../topics/variadic_macros.html#VNotation" target="_self">(v)</a></li>
|
||||
<li><a href="facilities/expand.html"><boost/preprocessor/facilities/expand.hpp></a></li>
|
||||
<li><a href="facilities/identity.html"><boost/preprocessor/facilities/identity.hpp></a></li>
|
||||
<li><a href="facilities/intercept.html"><boost/preprocessor/facilities/intercept.hpp></a></li>
|
||||
|
29
doc/headers/facilities/check_empty.html
Normal file
29
doc/headers/facilities/check_empty.html
Normal file
@ -0,0 +1,29 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>facilities/check_empty.hpp</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>facilities/check_empty.hpp</b> header defines a variadic macro for the C++20 level that checks if its data is empty or not.
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code">
|
||||
#include <b><boost/preprocessor/facilities/check_empty.hpp></b>
|
||||
</div>
|
||||
<h4>Contents</h4>
|
||||
<ul>
|
||||
<li><a href="../../ref/check_empty.html">BOOST_PP_CHECK_EMPTY</a> <a href="../../topics/variadic_macros.html#VNotation" target="_self">(v)</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;">
|
||||
<i></i><i><EFBFBD> Copyright Edward Diener 2019</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -5,7 +5,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>facilities/identity.hpp</b> header defines a utility macro to use with <b>BOOST_PP_IF</b> and <b>BOOST_PP_IIF</b>.
|
||||
The <b>facilities/identity.hpp</b> header defines utility macros to use with <b>BOOST_PP_IF</b> and <b>BOOST_PP_IIF</b>.
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code">
|
||||
@ -14,11 +14,13 @@
|
||||
<h4>Contents</h4>
|
||||
<ul>
|
||||
<li><a href="../../ref/identity.html">BOOST_PP_IDENTITY</a></li>
|
||||
<li><a href="../../ref/identity_n.html">BOOST_PP_IDENTITY_N</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;">
|
||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
||||
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
||||
</br><i><EFBFBD> Copyright Edward Diener 2015</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
|
32
doc/headers/facilities/va_opt.html
Normal file
32
doc/headers/facilities/va_opt.html
Normal file
@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;
|
||||
charset=windows-1252">
|
||||
<title>facilities/va_opt.hpp</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>facilities/va_opt.hpp</b>
|
||||
header defines a variadic macro for the C++20 level that offers a
|
||||
more flexible alternative to the __VA_OPT__ construct. </div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> #include <b><boost/preprocessor/facilities/va_opt.hpp></b>
|
||||
</div>
|
||||
<h4>Contents</h4>
|
||||
<ul>
|
||||
<li><a href="../../ref/va_opt.html">BOOST_PP_VA_OPT</a> <a
|
||||
href="../../topics/variadic_macros.html#VNotation"
|
||||
target="_self">(v)</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2019</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version
|
||||
1.0. (See accompanying file <a
|
||||
href="../../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
26
doc/headers/punctuation/is_begin_parens.html
Normal file
26
doc/headers/punctuation/is_begin_parens.html
Normal file
@ -0,0 +1,26 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>punctuation/is_begin_parens.hpp</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>punctuation/is_begin_parens.hpp</b>
|
||||
header defines a macro that determines if variadic data begins with a
|
||||
parenthesis.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> #include <b><boost/preprocessor/punctuation/is_begin_parens.hpp></b>
|
||||
</div>
|
||||
<h4>Contents</h4>
|
||||
<ul>
|
||||
<li><a href="../../ref/is_begin_parens.html">BOOST_PP_IS_BEGIN_PARENS</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2014</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
26
doc/headers/punctuation/remove_parens.html
Normal file
26
doc/headers/punctuation/remove_parens.html
Normal file
@ -0,0 +1,26 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>punctuation/remove_parens.hpp</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>punctuation/remove_parens.hpp</b>
|
||||
header defines a macro that removes the beginning parenthesis from its
|
||||
input if it exists.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> #include <b><boost/preprocessor/punctuation/remove_parens.hpp></b>
|
||||
</div>
|
||||
<h4>Contents</h4>
|
||||
<ul>
|
||||
<li><a href="../../ref/remove_parens.html">BOOST_PP_REMOVE_PARENS</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2014</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -2,7 +2,7 @@
|
||||
<title>tuple/enum.hpp</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../styles.css"></head><body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>tuple/enum.hpp</b> header defines a macro to onvert a <i>tuple</i> to its comma-separated elements.
|
||||
The <b>tuple/enum.hpp</b> header defines a macro to convert a <i>tuple</i> to its comma-separated elements.
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code">
|
||||
|
@ -14,6 +14,7 @@
|
||||
<h4>Includes</h4>
|
||||
<ul>
|
||||
<li><a href="variadic/elem.html"><boost/preprocessor/variadic/elem.hpp></a> <a href="../topics/variadic_macros.html#VNotation" target="_self">(v)</a></li>
|
||||
<li><a href="variadic/has_opt.html"><boost/preprocessor/variadic/has_opt.hpp></a> </li>
|
||||
<li><a href="variadic/size.html"><boost/preprocessor/variadic/size.hpp></a> <a href="../topics/variadic_macros.html#VNotation" target="_self">(v)</a></li>
|
||||
<li><a href="variadic/to_array.html"><boost/preprocessor/variadic/to_array.hpp></a> <a href="../topics/variadic_macros.html#VNotation" target="_self">(v)</a></li>
|
||||
<li><a href="variadic/to_list.html"><boost/preprocessor/variadic/to_list.hpp></a> <a href="../topics/variadic_macros.html#VNotation" target="_self">(v)</a></li>
|
||||
@ -22,7 +23,7 @@
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;">
|
||||
<i></i><i><EFBFBD> Copyright Edward Diener 2011,2013</i>
|
||||
<i></i><i><EFBFBD> Copyright Edward Diener 2011,2013,2019</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
|
25
doc/headers/variadic/has_opt.html
Normal file
25
doc/headers/variadic/has_opt.html
Normal file
@ -0,0 +1,25 @@
|
||||
<html><head>
|
||||
<title>variadic/has_opt.hpp</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../styles.css"></head><body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>variadic/has_opt.hpp</b> header defines a macro that determines whether or not the __VA_OPT__ construct is supported.
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code">
|
||||
#include <b><boost/preprocessor/variadic/has_opt.hpp></b>
|
||||
</div>
|
||||
<h4>Contents</h4>
|
||||
<ul>
|
||||
<li><a href="../../ref/variadic_has_opt.html">BOOST_PP_VARIADIC_HAS_OPT</a> <br>
|
||||
</li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;">
|
||||
<i></i><i><EFBFBD> Copyright Edward Diener 2019</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body></html>
|
@ -45,6 +45,7 @@
|
||||
<li><a href="ref/bool.html">BOOL</a></li>
|
||||
<!-- C -->
|
||||
<li><a href="ref/cat.html">CAT</a></li>
|
||||
<li><a href="ref/check_empty.html">CHECK_EMPTY</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/comma.html">COMMA</a></li>
|
||||
<li><a href="ref/comma_if.html">COMMA_IF</a></li>
|
||||
<li><a href="ref/compl.html">COMPL</a></li>
|
||||
@ -99,12 +100,14 @@
|
||||
<li><a href="ref/greater_equal_d.html">GREATER_EQUAL_D</a></li>
|
||||
<!-- I -->
|
||||
<li><a href="ref/identity.html">IDENTITY</a></li>
|
||||
<li><a href="ref/identity_n.html">IDENTITY_N</a></li>
|
||||
<li><a href="ref/if.html">IF</a></li>
|
||||
<li><a href="ref/iif.html">IIF</a></li>
|
||||
<li><a href="ref/inc.html">INC</a></li>
|
||||
<li><a href="ref/include_self.html">INCLUDE_SELF</a></li>
|
||||
<li><a href="ref/indirect_self.html">INDIRECT_SELF</a></li>
|
||||
<li><a href="ref/intercept.html">INTERCEPT</a></li>
|
||||
<li><a href="ref/is_begin_parens.html">IS_BEGIN_PARENS</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/is_iterating.html">IS_ITERATING</a></li>
|
||||
<li><a href="ref/is_selfish.html">IS_SELFISH</a></li>
|
||||
<li><a href="ref/iterate.html">ITERATE</a></li>
|
||||
@ -209,6 +212,7 @@
|
||||
<li><a href="ref/relative_flags.html">RELATIVE_FLAGS</a></li>
|
||||
<li><a href="ref/relative_iteration.html">RELATIVE_ITERATION</a></li>
|
||||
<li><a href="ref/relative_start.html">RELATIVE_START</a></li>
|
||||
<li><a href="ref/remove_parens.html">REMOVE_PARENS</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/repeat.html">REPEAT</a></li>
|
||||
<li><a href="ref/repeat_1st.html">REPEAT_1ST*</a></li>
|
||||
<li><a href="ref/repeat_2nd.html">REPEAT_2ND*</a></li>
|
||||
@ -292,9 +296,11 @@
|
||||
<!-- U -->
|
||||
<li><a href="ref/update_counter.html">UPDATE_COUNTER</a></li>
|
||||
<!-- V -->
|
||||
<li><a href="ref/va_opt.html">VA_OPT</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/value.html">VALUE</a></li>
|
||||
<li><a href="ref/variadics.html">VARIADICS</a></li>
|
||||
<li><a href="ref/variadic_elem.html">VARIADIC_ELEM</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/variadic_has_opt.html">VARIADIC_HAS_OPT</a></li>
|
||||
<li><a href="ref/variadic_seq_to_seq.html">VARIADIC_SEQ_TO_SEQ</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/variadic_size.html">VARIADIC_SIZE</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
<li><a href="ref/variadic_to_array.html">VARIADIC_TO_ARRAY</a> <a href="topics/variadic_macros.html#VNotation">(v)</a></li>
|
||||
|
@ -34,7 +34,7 @@
|
||||
It is more efficient, however, to use <b>BOOST_PP_ADD_D</b> in such a situation.
|
||||
</div>
|
||||
<div>
|
||||
This macro is the most efficient when <i>x</i> is less than or equal to <i>y</i>.
|
||||
This macro is the most efficient when <i>x</i> is greater than or equal to <i>y</i>.
|
||||
However, the efficiency gain is not worth actually comparing the two arguments prior to invocation.
|
||||
In other words, <i>x</i> should be the addend that is <i>most likely</i> to be the largest of the two operands.
|
||||
</div>
|
||||
|
@ -34,7 +34,7 @@
|
||||
If the sum of <i>x</i> and <i>y</i> is greater than <b>BOOST_PP_LIMIT_MAG</b>, the result is saturated to <b>BOOST_PP_LIMIT_MAG</b>.
|
||||
</div>
|
||||
<div>
|
||||
This macro is the most efficient when <i>x</i> is less than or equal to <i>y</i>.
|
||||
This macro is the most efficient when <i>x</i> is greater than or equal to <i>y</i>.
|
||||
However, the efficiency gain is not worth actually comparing the two arguments prior to invocation.
|
||||
In other words, <i>x</i> should be the addend that is <i>most likely</i> to be the largest of the two operands.
|
||||
</div>
|
||||
|
@ -1,33 +1,41 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>BOOST_PP_ARRAY_TO_LIST</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_ARRAY_TO_LIST</b>
|
||||
macro converts an <i>array</i> to a <i>list</i>. </div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_ARRAY_TO_LIST</b>(<i>array</i>)
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<dl><dt>array</dt>
|
||||
<dd> The <i>array</i> to be converted. </dd>
|
||||
</dl>
|
||||
<a href="limit_tuple.html"></a><ul>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/array/to_list.html"><boost/preprocessor/array/to_list.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/array/to_list.html">boost/preprocessor/array/to_list.hpp</a>><br><br><a href="array_to_list.html">BOOST_PP_ARRAY_TO_LIST</a>((3, (x, y, z)))<br> // expands to (x, (y, (z, <a href="nil.html">BOOST_PP_NIL</a>)))<br></pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2011</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_ARRAY_TO_LIST</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_ARRAY_TO_LIST</b> macro
|
||||
converts an <i>array</i> to a <i>list</i>. </div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_ARRAY_TO_LIST</b>(<i>array</i>) </div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>array</dt>
|
||||
<dd> The <i>array</i> to be converted.</dd>
|
||||
</dl>
|
||||
<ul>
|
||||
</ul>
|
||||
<h4>Remarks</h4>
|
||||
<p> If the <i>array</i> to be converted is empty, as
|
||||
represented by '( 0, () )', the resulting <i>list</i> is empty, as
|
||||
represented by 'BOOST_PP_NIL'.</p>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/array/to_list.html"><boost/preprocessor/array/to_list.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/array/to_list.html">boost/preprocessor/array/to_list.hpp</a>><br><br><a
|
||||
href="array_to_list.html">BOOST_PP_ARRAY_TO_LIST</a>((3, (x, y, z)))<br> // expands to (x, (y, (z, <a
|
||||
href="nil.html">BOOST_PP_NIL</a>)))</pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2011</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
s
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,31 +1,37 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>BOOST_PP_ARRAY_TO_SEQ</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_ARRAY_TO_SEQ</b> macro
|
||||
converts an <i>array</i> to a <i>seq</i>. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_ARRAY_TO_SEQ</b>(<i>array</i>)
|
||||
</div>
|
||||
<h4> Arguments </h4>
|
||||
<dl><dt>array</dt>
|
||||
<dd> The <i>array</i> to be converted. </dd>
|
||||
</dl>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/array/to_seq.html"><boost/preprocessor/array/to_seq.hpp></a>
|
||||
</div>
|
||||
<h4> Sample Code </h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/array/to_seq.html">boost/preprocessor/array/to_seq.hpp</a>><br><br><a href="array_to_seq.html">BOOST_PP_ARRAY_TO_SEQ</a>((3, (a, b, c))) // expands to (a)(b)(c)<br></pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2011</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_ARRAY_TO_SEQ</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_ARRAY_TO_SEQ</b> macro
|
||||
converts an <i>array</i> to a <i>seq</i>. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_ARRAY_TO_SEQ</b>(<i>array</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<dt>array</dt>
|
||||
<dd> The <i>array</i> to be converted.</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<p> If the <i>array</i> to be converted is empty, as
|
||||
represented by '( 0, () )', the resulting <i>seq</i> is undefined since a
|
||||
<i>seq</i> cannot be empty.</p>
|
||||
<h4>Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/array/to_seq.html"><boost/preprocessor/array/to_seq.hpp></a>
|
||||
</div>
|
||||
<h4> Sample Code </h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/array/to_seq.html">boost/preprocessor/array/to_seq.hpp</a>><br><br><a
|
||||
href="array_to_seq.html">BOOST_PP_ARRAY_TO_SEQ</a>((3, (a, b, c))) // expands to (a)(b)(c)</pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2011</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,31 +1,39 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>BOOST_PP_ARRAY_TO_TUPLE</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_ARRAY_TO_TUPLE</b> macro
|
||||
converts an <i>array</i> to an <i>tuple</i>. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_ARRAY_TO_TUPLE</b>(<i>array</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<dt>array</dt>
|
||||
<dd> The <i>array</i> to be converted. </dd>
|
||||
</dl>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/array/to_tuple.html"><boost/preprocessor/array/to_tuple.hpp></a>
|
||||
</div>
|
||||
<h4> Sample Code </h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/array/to_tuple.html">boost/preprocessor/array/to_tuple.hpp</a>><br><br>#define ARRAY (3,(a, b, c))<br><br><a href="array_to_tuple.html">BOOST_PP_ARRAY_TO_TUPLE</a>(ARRAY) // expands to (a, b, c)<br></pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2011</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_ARRAY_TO_TUPLE</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_ARRAY_TO_TUPLE</b> macro
|
||||
converts an <i>array</i> to an <i>tuple</i>. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_ARRAY_TO_TUPLE</b>(<i>array</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<dt>array</dt>
|
||||
<dd> The <i>array</i> to be converted.</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<p> If the <i>array</i> to be converted is empty, as
|
||||
represented by '( 0, () )', the resulting <i>tuple</i> is undefined
|
||||
since a <i>tuple</i> cannot be empty.</p>
|
||||
<h4>Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/array/to_tuple.html"><boost/preprocessor/array/to_tuple.hpp></a>
|
||||
</div>
|
||||
<h4> Sample Code </h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/array/to_tuple.html">boost/preprocessor/array/to_tuple.hpp</a>><br><br>#define ARRAY (3,(a, b, c))<br><br><a
|
||||
|
||||
href="array_to_tuple.html">BOOST_PP_ARRAY_TO_TUPLE</a>(ARRAY) // expands to (a, b, c)</pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2011</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
68
doc/ref/check_empty.html
Normal file
68
doc/ref/check_empty.html
Normal file
@ -0,0 +1,68 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>BOOST_PP_CHECK_EMPTY</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_CHECK_EMPTY</b> variadic macro
|
||||
checks to see if its variadic input is empty or not. It expands to 1 if its input
|
||||
is empty and expands to 0 if its input is not empty. The macro only exists when
|
||||
the compilation is at the C++20 level and the __VA_OPT__ construct is supported.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_CHECK_EMPTY</b>(<i>...</i>) <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>...<br>
|
||||
</dt>
|
||||
<dd> The <i>variadic data</i> to be checked for emptiness. </dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div>
|
||||
When the macro invocation BOOST_PP_VARIADIC_HAS_OPT() expands to 1, then this
|
||||
macro exists and can be invoked, otherwise this macro does not exist
|
||||
and attempting to invoke it will lead to a preprocessor error that the macro
|
||||
can not be found. Because of this condition the header file for including
|
||||
this macro includes the header file for the BOOST_PP_VARIADIC_HAS_OPT macro.<br>
|
||||
It is possible to pass data to this macro which expands to nothing, in which
|
||||
case this macro will expand to 1 just as if nothing has been passed.
|
||||
</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="variadic_has_opt.html">BOOST_PP_VARIADIC_HAS_OPT</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/facilities/check_empty.html"><boost/preprocessor/facilities/check_empty.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>
|
||||
#include <<a href="../headers/facilities/check_empty.html">boost/preprocessor/facilities/check_empty.hpp</a>>
|
||||
|
||||
# if <a href="variadic_has_opt.html">BOOST_PP_VARIADIC_HAS_OPT</a>()
|
||||
|
||||
#define DATA
|
||||
#define OBJECT OBJECT2
|
||||
#define OBJECT2
|
||||
#define FUNC(x) FUNC2(x)
|
||||
#define FUNC2(x)
|
||||
#define FUNC_GEN(x,y) (1,2,3)
|
||||
|
||||
<a href="check_empty.html">BOOST_PP_CHECK_EMPTY</a>(DATA) // expands to 1
|
||||
<a href="check_empty.html">BOOST_PP_CHECK_EMPTY</a>(OBJECT) // expands to 1
|
||||
<a href="check_empty.html">BOOST_PP_CHECK_EMPTY</a>(FUNC(1)) // expands to 1
|
||||
<a href="check_empty.html">BOOST_PP_CHECK_EMPTY</a>(FUNC) // expands to 0
|
||||
<a href="check_empty.html">BOOST_PP_CHECK_EMPTY</a>(FUNC_GEN) // expands to 0
|
||||
|
||||
#endif
|
||||
</pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2019</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -22,7 +22,7 @@
|
||||
<div>
|
||||
This macro is useful when a delay is necessary to produce the correct semantics of a macro invocation.
|
||||
For example, when a macro expands to an argument list to another macro.
|
||||
This macro will expand the the argument list on the first pass, and then rescan to expand any more macros.
|
||||
This macro will expand the argument list on the first pass, and then rescan to expand any more macros.
|
||||
</div>
|
||||
<h4>Requirements</h4>
|
||||
<div>
|
||||
|
@ -135,7 +135,6 @@ TEMPLATE_TEMPLATE(2, 4, T)
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||
|
||||
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||
<i><EFBFBD> Copyright Paul Mensonides 2002<br>
|
||||
</i><i><EFBFBD> Copyright Edward Diener 2014</i><br>
|
||||
|
58
doc/ref/identity_n.html
Normal file
58
doc/ref/identity_n.html
Normal file
@ -0,0 +1,58 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>BOOST_PP_IDENTITY_N</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>BOOST_PP_IDENTITY_N</b> macro expands to its first argument when invoked.
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code">
|
||||
<b>BOOST_PP_IDENTITY_N</b>(<i>item,n</i>)(n-arguments)
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>item</dt>
|
||||
<dd>
|
||||
The result of the expansion.
|
||||
</dd>
|
||||
<dt>n</dt>
|
||||
<dd>
|
||||
The number of arguments when invoked.
|
||||
</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div>
|
||||
This macro is designed to be used with <b>BOOST_PP_IF</b> and <b>BOOST_PP_IIF</b> when only one of the clauses needs to be invoked.
|
||||
</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="if.html">BOOST_PP_IF</a></li>
|
||||
<li><a href="iif.html">BOOST_PP_IIF</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div>
|
||||
<b>Header:</b> <a href="../headers/facilities/identity.html"><boost/preprocessor/facilities/identity.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div><pre>
|
||||
#include <<a href="../headers/control/if.html">boost/preprocessor/control/if.hpp</a>>
|
||||
#include <<a href="../headers/facilities/identity.html">boost/preprocessor/facilities/identity.hpp</a>>
|
||||
|
||||
#define MACRO_CAT(y,z) y ## z
|
||||
#define MACRO(n) <a href="if.html">BOOST_PP_IF</a>(n, <a href="identity_n.html">BOOST_PP_IDENTITY_N</a>(x,2), MACRO_CAT)(a,b)
|
||||
|
||||
MACRO(0) // expands to ab
|
||||
MACRO(1) // expands to x
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px"><i>© Copyright Edward Diener 2015</i></div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
47
doc/ref/is_begin_parens.html
Normal file
47
doc/ref/is_begin_parens.html
Normal file
@ -0,0 +1,47 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_IS_BEGIN_PARENS</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_IS_BEGIN_PAREN</b>S
|
||||
determines whether the input starts with a set of parenthesis.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_IS_BEGIN_PARENS</b>(...) <a href="../topics/variadic_macros.html#VNotation"
|
||||
target="_self"><sup>(v)</sup></a></div>
|
||||
<h4>Arguments</h4>
|
||||
<h4> ... <span style="font-weight: normal;">
|
||||
The input as variadic data.</span></h4>
|
||||
<h4>Remarks</h4>
|
||||
<div> If the input input begins with a parenthesis, with any data within
|
||||
that parenthesis, the macro returns 1, otherwise it returns 0. Data may
|
||||
follow the beginning parenthesis and the macro still will return 1.<br>
|
||||
<br>
|
||||
For Visual Studio 2005 ( VC8 ) the input data must be a single parameter
|
||||
else a compilation error will occur.</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="remove_parens.html">BOOST_PP_REMOVE_PARENS</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/punctuation/is_begin_parens.html"><boost/preprocessor/punctuation/is_begin_parens.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/punctuation/is_begin_parens.html">boost/preprocessor/punctuation/is_begin_parens.hpp</a>>
|
||||
|
||||
#define VARDATA more_data , more_params<br>#define VARDATAP ( data ) more_data , more_params<br>#define DATA data<br>#define DATAP ( data ) more_data<br>
|
||||
BOOST_PP_IS_BEGIN_PARENS(VARDATA) // expands to 0, compiler error with VC8
|
||||
BOOST_PP_IS_BEGIN_PARENS(VARDATAP) // expands to 1, compiler error with VC8<br><br>BOOST_PP_IS_BEGIN_PARENS(DATA) // expands to 0
|
||||
BOOST_PP_IS_BEGIN_PARENS(DATAP) // expands to 1<br><br>BOOST_PP_IS_BEGIN_PARENS() // expands to 0<br>
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2014</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,34 +1,39 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>BOOST_PP_LIMIT_REPEAT</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>BOOST_PP_LIMIT_REPEAT</b> macro defines the maximum number of repetitions supported by each <b>BOOST_PP_REPEAT</b> dimension.
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code">
|
||||
<b>BOOST_PP_LIMIT_REPEAT</b>
|
||||
</div>
|
||||
<h4>Remarks</h4>
|
||||
<div>
|
||||
This macro current expands to <i>256</i>.
|
||||
</div>
|
||||
<h4>Requirements</h4>
|
||||
<div>
|
||||
<b>Header:</b> <a href="../headers/config/limits.html"><boost/preprocessor/config/limits.hpp></a>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;">
|
||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
||||
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_LIMIT_REPEAT</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIMIT_REPEAT</b> macro
|
||||
defines the maximum number of repetitions supported by each <b>BOOST_PP_REPEAT</b>
|
||||
dimension. </div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_LIMIT_REPEAT</b> </div>
|
||||
<h4>Remarks</h4>
|
||||
<div> This macro current expands to <i>256</i>.<br>
|
||||
<br>
|
||||
NOTE: for the current latest versions of Microsoft's VC++ compiler there
|
||||
is a nested macro limit of 256. This means in actuality that the number of
|
||||
repetitions using VC++ is actually less than 256 depending on the
|
||||
repetition macro being used. For the BOOST_PP_REPEAT macro this limit
|
||||
appears to be 252 while for the BOOST_PP_ENUM... series of macros this
|
||||
limit appears to be around 230, before the VC++ compiler gives a "C1009:
|
||||
compiler limit : macros nested too deeply" error. This is a compiler
|
||||
limitation of VC++ which may vary depending on the specific repetition
|
||||
macro being used, and therefore is not a problem the preprocessor library
|
||||
can solve.</div>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/config/limits.html"><boost/preprocessor/config/limits.hpp></a>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||
<i><EFBFBD> Copyright Paul Mensonides 2002</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,39 +1,47 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>BOOST_PP_LIST_TO_ARRAY</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css"></head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIST_TO_ARRAY</b> macro
|
||||
converts a <i>list</i> to an <i>array</i>. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_ARRAY</b>(<i>list</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<dt>list</dt>
|
||||
<dd> The <i>list</i> to be converted. </dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div>
|
||||
This macro uses <b>BOOST_PP_WHILE</b>.
|
||||
Within <b>BOOST_PP_WHILE</b>, it is more efficient to use <b>BOOST_PP_LIST_TO_ARRAY_D</b>.
|
||||
</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_array_d.html">BOOST_PP_LIST_TO_ARRAY_D</a></li>
|
||||
</ul>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_array.html"><boost/preprocessor/list/to_array.hpp></a>
|
||||
</div>
|
||||
<h4> Sample Code </h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/list/to_array.html">boost/preprocessor/list/to_array.hpp</a>><br><br>#define LIST (a, (b, (c, <a href="nil.html">BOOST_PP_NIL</a>)))<br><br><a href="list_to_array.html">BOOST_PP_LIST_TO_ARRAY</a>(LIST) // expands to (3, (a, b, c))<br></pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i>© Copyright Edward Diener 2011</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_LIST_TO_ARRAY</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIST_TO_ARRAY</b> macro
|
||||
converts a <i>list</i> to an <i>array</i>. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_ARRAY</b>(<i>list</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<dt>list</dt>
|
||||
<dd> The <i>list</i> to be converted. <br>
|
||||
</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> This macro uses <b>BOOST_PP_WHILE</b>. Within <b>BOOST_PP_WHILE</b>,
|
||||
it is more efficient to use <b>BOOST_PP_LIST_TO_ARRAY_D</b>.<br>
|
||||
<br>
|
||||
If the <i>list</i> to be converted is empty, as represented by
|
||||
'BOOST_PP_NIL', the resulting <i>array</i> is empty, as represented by '( 0, ()
|
||||
)'.</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_array_d.html">BOOST_PP_LIST_TO_ARRAY_D</a></li>
|
||||
</ul>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_array.html"><boost/preprocessor/list/to_array.hpp></a>
|
||||
</div>
|
||||
<h4> Sample Code </h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/list/to_array.html">boost/preprocessor/list/to_array.hpp</a>><br><br>#define LIST (a, (b, (c, <a
|
||||
|
||||
href="nil.html">BOOST_PP_NIL</a>)))<br><br><a href="list_to_array.html">BOOST_PP_LIST_TO_ARRAY</a>(LIST) // expands to (3, (a, b, c))</pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i>© Copyright Edward Diener 2011</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,27 +1,42 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>BOOST_PP_LIST_TO_ARRAY_D</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css"></head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>BOOST_PP_LIST_TO_ARRAY_D</b> macro converts a <i>list</i> to an <i>array</i>.
|
||||
It reenters <b>BOOST_PP_WHILE</b> with maximum efficiency.
|
||||
</div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_ARRAY_D</b>(<i>d</i>, <i>list</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<dt>d</dt>
|
||||
<dd>The next available <b>BOOST_PP_WHILE</b> iteration.</dd>
|
||||
<dt>list</dt>
|
||||
<dd> The <i>list</i> to be converted. </dd>
|
||||
</dl>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_array_d.html">BOOST_PP_LIST_TO_ARRAY</a></li>
|
||||
</ul>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_array.html"><boost/preprocessor/list/to_array.hpp></a>
|
||||
</div>
|
||||
</body>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_LIST_TO_ARRAY_D</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIST_TO_ARRAY_D</b> macro
|
||||
converts a <i>list</i> to an <i>array</i>. It reenters <b>BOOST_PP_WHILE</b>
|
||||
with maximum efficiency. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_ARRAY_D</b>(<i>d</i>, <i>list</i>)
|
||||
</div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<dt>d</dt>
|
||||
<dd>The next available <b>BOOST_PP_WHILE</b> iteration.</dd>
|
||||
<dt>list</dt>
|
||||
<dd> The <i>list</i> to be converted. </dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<p> If the <i>list</i> to be converted is empty, as
|
||||
represented by 'BOOST_PP_NIL', the resulting <i>array</i> is empty, as
|
||||
represented by '( 0, () )'. </p>
|
||||
<h4>See Also</h4>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_array_d.html">BOOST_PP_LIST_TO_ARRAY</a></li>
|
||||
</ul>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_array.html"><boost/preprocessor/list/to_array.hpp></a>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i>© Copyright Edward Diener 2011</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,40 +1,44 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>BOOST_PP_LIST_TO_SEQ</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIST_TO_SEQ</b> macro
|
||||
converts a <i>list</i> to a <i>seq</i>. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_SEQ</b>(<i>list</i>)
|
||||
</div>
|
||||
<h4> Arguments </h4>
|
||||
<dl><dt>list</dt>
|
||||
<dd> The <i>list</i> to be converted. </dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div>
|
||||
This macro uses <b>BOOST_PP_FOR</b>.
|
||||
Within <b>BOOST_PP_FOR</b>, it is more efficient to use <b>BOOST_PP_LIST_TO_SEQ_R</b>.
|
||||
</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_seq_r.html">BOOST_PP_LIST_TO_SEQ_R</a></li>
|
||||
</ul>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_seq.html"><boost/preprocessor/list/to_seq.hpp></a>
|
||||
</div>
|
||||
<h4> Sample Code </h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/list/to_seq.html">boost/preprocessor/list/to_seq.hpp</a>><br><br><a href="list_to_seq.html">BOOST_PP_LIST_TO_SEQ</a>((a, (b, (c, <a href="nil.html">BOOST_PP_NIL</a>)))) // expands to (a)(b)(c)<br></pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i>© Copyright Edward Diener 2011</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_LIST_TO_SEQ</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIST_TO_SEQ</b> macro
|
||||
converts a <i>list</i> to a <i>seq</i>. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_SEQ</b>(<i>list</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<dt>list</dt>
|
||||
<dd> The <i>list</i> to be converted. </dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> This macro uses <b>BOOST_PP_FOR</b>. Within <b>BOOST_PP_FOR</b>, it
|
||||
is more efficient to use <b>BOOST_PP_LIST_TO_SEQ_R</b>.<br>
|
||||
<br>
|
||||
If the <i>list</i> to be converted is empty, as represented by
|
||||
'BOOST_PP_NIL', the resulting <i>seq</i> is undefined since a <i>seq</i>
|
||||
cannot be empty.</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_seq_r.html">BOOST_PP_LIST_TO_SEQ_R</a></li>
|
||||
</ul>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_seq.html"><boost/preprocessor/list/to_seq.hpp></a>
|
||||
</div>
|
||||
<h4> Sample Code </h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/list/to_seq.html">boost/preprocessor/list/to_seq.hpp</a>><br><br><a
|
||||
href="list_to_seq.html">BOOST_PP_LIST_TO_SEQ</a>((a, (b, (c, <a href="nil.html">BOOST_PP_NIL</a>)))) // expands to (a)(b)(c)</pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i>© Copyright Edward Diener 2011</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,27 +1,39 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>BOOST_PP_LIST_TO_SEQ_R</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css"></head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>BOOST_PP_LIST_TO_SEQ_R</b> macro converts a <i>list</i> to an <i>seq</i>.
|
||||
It reenters <b>BOOST_PP_FOR</b> with maximum efficiency.
|
||||
</div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_SEQ_R</b>(<i>r</i>, <i>list</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<dt>d</dt>
|
||||
<dd>The next available <b>BOOST_PP_FOR</b> repetition.</dd>
|
||||
<dt>list</dt>
|
||||
<dd> The <i>list</i> to be converted. </dd>
|
||||
</dl>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_seq_r.html">BOOST_PP_LIST_TO_SEQ</a></li>
|
||||
</ul>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_seq.html"><boost/preprocessor/list/to_seq.hpp></a>
|
||||
</div>
|
||||
</body>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_LIST_TO_SEQ_R</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIST_TO_SEQ_R</b> macro
|
||||
converts a <i>list</i> to a <i>seq</i>. It reenters <b>BOOST_PP_FOR</b>
|
||||
with maximum efficiency. </div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_SEQ_R</b>(<i>r</i>, <i>list</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<dt>d</dt>
|
||||
<dd>The next available <b>BOOST_PP_FOR</b> repetition.</dd>
|
||||
<dt>list</dt>
|
||||
<dd> The <i>list</i> to be converted.</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<p> If the <i>list</i> to be converted is empty, as
|
||||
represented by 'BOOST_PP_NIL', the resulting <i>seq</i> is undefined
|
||||
since a <i>seq</i> cannot be empty.</p>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_seq_r.html">BOOST_PP_LIST_TO_SEQ</a></li>
|
||||
</ul>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_seq.html"><boost/preprocessor/list/to_seq.hpp></a>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i>© Copyright Edward Diener 2011</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,62 +1,55 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>BOOST_PP_LIST_TO_TUPLE</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>BOOST_PP_LIST_TO_TUPLE</b> macro converts a <i>list</i> to a <i>tuple</i>.
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code">
|
||||
<b>BOOST_PP_LIST_TO_TUPLE</b>(<i>list</i>)
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>list</dt>
|
||||
<dd>
|
||||
The <i>list</i> to be converted.
|
||||
</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div>
|
||||
If <i>list</i> is, for example, (<i>a</i>, (<i>b</i>, (<i>c</i>, <b>BOOST_PP_NIL</b>))),
|
||||
this macro will produce:
|
||||
<div>
|
||||
(<i>a</i>, <i>b</i>, <i>c</i>)
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
Previously, this macro could not be used inside <b>BOOST_PP_FOR</b>.
|
||||
There is no longer any such restriction.
|
||||
It is more efficient, however, to use <b>BOOST_PP_LIST_TO_TUPLE_R</b> in such a situation.
|
||||
</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_tuple_r.html">BOOST_PP_LIST_TO_TUPLE_R</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div>
|
||||
<b>Header:</b> <a href="../headers/list/to_tuple.html"><boost/preprocessor/list/to_tuple.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div><pre>
|
||||
#include <<a href="../headers/list/to_tuple.html">boost/preprocessor/list/to_tuple.hpp</a>>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_LIST_TO_TUPLE</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIST_TO_TUPLE</b> macro
|
||||
converts a <i>list</i> to a <i>tuple</i>. </div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_TUPLE</b>(<i>list</i>) </div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>list</dt>
|
||||
<dd> The <i>list</i> to be converted. </dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> If <i>list</i> is, for example, (<i>a</i>, (<i>b</i>, (<i>c</i>, <b>BOOST_PP_NIL</b>))),
|
||||
this macro will produce:
|
||||
<div> (<i>a</i>, <i>b</i>, <i>c</i>) </div>
|
||||
</div>
|
||||
<div> Previously, this macro could not be used inside <b>BOOST_PP_FOR</b>.
|
||||
There is no longer any such restriction. It is more efficient,
|
||||
however, to use <b>BOOST_PP_LIST_TO_TUPLE_R</b> in such a situation.<br>
|
||||
<br>
|
||||
If the <i>list</i> to be converted is empty, as represented by 'BOOST_PP_NIL',
|
||||
the resulting <i>tuple</i> is undefined since a <i>tuple</i> cannot be
|
||||
empty.</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_tuple_r.html">BOOST_PP_LIST_TO_TUPLE_R</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_tuple.html"><boost/preprocessor/list/to_tuple.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/list/to_tuple.html">boost/preprocessor/list/to_tuple.hpp</a>>
|
||||
|
||||
#define LIST (w, (x, (y, (z, <a href="nil.html">BOOST_PP_NIL</a>))))
|
||||
|
||||
<a href="list_to_tuple.html">BOOST_PP_LIST_TO_TUPLE</a>(LIST) // expands to (w, x, y, z)
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;">
|
||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
||||
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||
|
||||
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||
<i><EFBFBD> Copyright Paul Mensonides 2002</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,47 +1,42 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>BOOST_PP_LIST_TO_TUPLE_R</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>BOOST_PP_LIST_TO_TUPLE_R</b> macro converts a <i>list</i> to a <i>tuple</i>.
|
||||
It reenters <b>BOOST_PP_FOR</b> with maximum efficiency.
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code">
|
||||
<b>BOOST_PP_LIST_TO_TUPLE_R</b>(<i>r</i>, <i>list</i>)
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>r</dt>
|
||||
<dd>
|
||||
The next available <b>BOOST_PP_FOR</b> repetition.
|
||||
</dd>
|
||||
<dt>list</dt>
|
||||
<dd>
|
||||
The <i>list</i> to be converted.
|
||||
</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div>
|
||||
If <i>list</i> is, for example, (<i>a</i>, (<i>b</i>, (<i>c</i>, <b>BOOST_PP_NIL</b>))),
|
||||
this macro will produce:
|
||||
<div>
|
||||
(<i>a</i>, <i>b</i>, <i>c</i>)
|
||||
</div>
|
||||
</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_tuple.html">BOOST_PP_LIST_TO_TUPLE</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div>
|
||||
<b>Header:</b> <a href="../headers/list/to_tuple.html"><boost/preprocessor/list/to_tuple.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div><pre>
|
||||
#include <<a href="../headers/list/adt.html">boost/preprocessor/list/adt.hpp</a>>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_LIST_TO_TUPLE_R</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_LIST_TO_TUPLE_R</b> macro
|
||||
converts a <i>list</i> to a <i>tuple</i>. It reenters <b>BOOST_PP_FOR</b>
|
||||
with maximum efficiency. </div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_LIST_TO_TUPLE_R</b>(<i>r</i>, <i>list</i>)
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>r</dt>
|
||||
<dd> The next available <b>BOOST_PP_FOR</b> repetition. </dd>
|
||||
<dt>list</dt>
|
||||
<dd> The <i>list</i> to be converted. </dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<p> If <i>list</i> is, for example, (<i>a</i>, (<i>b</i>, (<i>c</i>,
|
||||
<b>BOOST_PP_NIL</b>))), this macro will produce: </p>
|
||||
<div>
|
||||
<div> (<i>a</i>, <i>b</i>, <i>c</i>) </div>
|
||||
</div>
|
||||
<h4><span style="font-weight: normal;"> If the <i>list</i> to
|
||||
be converted is empty, as represented by 'BOOST_PP_NIL', the resulting <i>tuple</i>
|
||||
is undefined since a <i>tuple</i> cannot be empty. </span></h4>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="list_to_tuple.html">BOOST_PP_LIST_TO_TUPLE</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/list/to_tuple.html"><boost/preprocessor/list/to_tuple.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/list/adt.html">boost/preprocessor/list/adt.hpp</a>>
|
||||
#include <<a href="../headers/list/to_tuple.html">boost/preprocessor/list/to_tuple.hpp</a>>
|
||||
#include <<a href="../headers/repetition/for.html">boost/preprocessor/repetition/for.hpp</a>>
|
||||
|
||||
@ -54,16 +49,14 @@
|
||||
<a href="for.html">BOOST_PP_FOR</a>(LIST, PRED, OP, MACRO)
|
||||
// expands to (x, y, z) (y, z) (z)
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;">
|
||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
||||
</br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href=
|
||||
"http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||
<i><EFBFBD> Copyright Paul Mensonides 2002</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -34,7 +34,7 @@
|
||||
It is more efficient, however, to use <b>BOOST_PP_MUL_D</b> in such a situation.
|
||||
</div>
|
||||
<div>
|
||||
This macro is the most efficient when <i>x</i> is less than or equal to <i>y</i>.
|
||||
This macro is the most efficient when <i>x</i> is greater than or equal to <i>y</i>.
|
||||
However, the efficiency gain is not worth actually comparing the two arguments prior to invocation.
|
||||
In other words, <i>x</i> should be the value that is <i>most likely</i> to be the largest of the two operands.
|
||||
</div>
|
||||
|
@ -34,7 +34,7 @@
|
||||
If the product of <i>x</i> and <i>y</i> is greater than <b>BOOST_PP_LIMIT_MAG</b>, the result is saturated to <b>BOOST_PP_LIMIT_MAG</b>.
|
||||
</div>
|
||||
<div>
|
||||
This macro is the most efficient when <i>x</i> is less than or equal to <i>y</i>.
|
||||
This macro is the most efficient when <i>x</i> is greater than or equal to <i>y</i>.
|
||||
However, the efficiency gain is not worth actually comparing the two arguments prior to invocation.
|
||||
In other words, <i>x</i> should be the value that is <i>most likely</i> to be the largest of the two operands.
|
||||
</div>
|
||||
|
@ -1,46 +1,58 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_OVERLOAD</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_OVERLOAD</b> variadic macro expands to the name of a non-variadic macro having a given number of parameters.<br>
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_OVERLOAD</b>(<i>prefix</i>,...) <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>prefix<br>
|
||||
</dt><dd>
|
||||
The prefix of the non-variadic macro name.
|
||||
</dd><dt>...<br>
|
||||
</dt><dd><i>
|
||||
Variadic data</i>. The number of variadic data
|
||||
elements, as determined by BOOST_PP_VARIADIC_SIZE, is appended to the
|
||||
prefix to form the output non-variadic macro name.<br>
|
||||
</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> This macro creates a macro name which depends on the number of elements of variadic data. It should be used in the form of <br>
|
||||
BOOST_PP_OVERLOAD(MACRO_NAME_,__VA_ARGS__)(__VA_ARGS__) in order to
|
||||
call a non-variadic macro taking a given number of variadic data
|
||||
elements as non-variadic arguments. In this way one can invoke a
|
||||
variadic macro with a variable number of parameters which calls one of
|
||||
a series of non-variadic macros doing very similar things.
|
||||
</div><b>Requirements</b>
|
||||
<div> <b>Header:</b> <a href="../headers/facilities/overload.html"><boost/preprocessor/facilities/overload.hpp></a>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_OVERLOAD</b> variadic
|
||||
macro expands to the name of a non-variadic macro having a given number of
|
||||
parameters.<br>
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_OVERLOAD</b>(<i>prefix</i>,...) <a href="../topics/variadic_macros.html#VNotation"
|
||||
target="_self"><sup>(v)</sup></a><br>
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>prefix<br>
|
||||
</dt>
|
||||
<dd> The prefix of the non-variadic macro name. </dd>
|
||||
<dt>...<br>
|
||||
</dt>
|
||||
<dd><i> Variadic data</i>. The number of variadic data
|
||||
elements, as determined by BOOST_PP_VARIADIC_SIZE, is appended to the
|
||||
prefix to form the output non-variadic macro name.<br>
|
||||
</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> This macro creates a macro name which depends on the number of
|
||||
elements of variadic data. It should be used in the form of <br>
|
||||
BOOST_PP_OVERLOAD(MACRO_NAME_,__VA_ARGS__)(__VA_ARGS__) in order to
|
||||
call a non-variadic macro taking a given number of variadic data
|
||||
elements as non-variadic arguments. In this way one can invoke a
|
||||
variadic macro with a variable number of parameters which calls one of
|
||||
a series of non-variadic macros doing very similar things.
|
||||
</div>
|
||||
<b>Requirements</b>
|
||||
<div> <b>Header:</b> <a href="../headers/facilities/overload.html"><boost/preprocessor/facilities/overload.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/facilities/overload.html">boost/preprocessor/facilities/overload.hpp</a>><br>#include <<a
|
||||
href="../headers/cat.html">boost/preprocessor/cat.hpp</a>><br>#include <<a href="../headers/facilities/empty.html">boost/preprocessor/facilities/empty.hpp</a>><br>#include <<a
|
||||
href="../headers/arithmetic/add.html">boost/preprocessor/arithmetic/add.hpp</a>><br><br>#define MACRO_1(number) MACRO_2(number,10)<br>#define MACRO_2(number1,number2) <a
|
||||
href="add.html">BOOST_PP_ADD</a>(number1,number2)<br><br>#if !BOOST_PP_VARIADICS_MSVC<br><br>#define MACRO_ADD_NUMBERS(...) <a
|
||||
href="overload.html">BOOST_PP_OVERLOAD</a>(MACRO_,__VA_ARGS__)(__VA_ARGS__)<br><br>#else<br><br>// or for Visual C++<br><br>#define MACRO_ADD_NUMBERS(...) \<br> <a
|
||||
href="cat.html">BOOST_PP_CAT</a>(<a href="overload.html">BOOST_PP_OVERLOAD</a>(MACRO_,__VA_ARGS__)(__VA_ARGS__),<a
|
||||
href="empty.html">BOOST_PP_EMPTY</a>())<br><br>#endif<br><br>MACRO_ADD_NUMBERS(5) // output is 15<br>MACRO_ADD_NUMBERS(3,6) // output is 9</pre>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/facilities/overload.html">boost/preprocessor/facilities/overload.hpp</a>><br>#include <<a href="../headers/cat.html">boost/preprocessor/cat.hpp</a>><br>#include <<a href="../headers/facilities/empty.html">boost/preprocessor/facilities/empty.hpp</a>><br>#include <<a href="../headers/arithmetic/add.html">boost/preprocessor/arithmetic/add.hpp</a>><br><br>#define MACRO_1(number) MACRO_2(number,10)<br>#define MACRO_2(number1,number2) <a href="add.html">BOOST_PP_ADD</a>(number1,number2)<br><br>#define MACRO_ADD_NUMBERS(...) <a href="overload.html">BOOST_PP_OVERLOAD</a>(MACRO_,__VA_ARGS__)(__VA_ARGS__)<br><br>// or for Visual C++<br><br>#define MACRO_ADD_NUMBERS(...) \<br> <a href="cat.html">BOOST_PP_CAT</a>(<a href="overload.html">BOOST_PP_OVERLOAD</a>(MACRO_,__VA_ARGS__)(__VA_ARGS__),<a href="empty.html">BOOST_PP_EMPTY</a>())<br><br>MACRO_ADD_NUMBERS(5) // output is 15<br>MACRO_ADD_NUMBERS(3,6) // output is 9<br></pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2011,2013</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2011,2013,2016</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</body></html>
|
44
doc/ref/remove_parens.html
Normal file
44
doc/ref/remove_parens.html
Normal file
@ -0,0 +1,44 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_REMOVE_PARENS</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_REMOVE_PAREN</b>S macro
|
||||
removes the beginning parenthesis, if it exists, from the input data and
|
||||
expands to the result</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_REMOVE_PARENS</b>(param) <a href="../topics/variadic_macros.html#VNotation"
|
||||
target="_self"><sup>(v)</sup></a></div>
|
||||
<h4>Arguments <span style="font-weight: normal;"></span></h4>
|
||||
<h4><span style="font-weight: normal;"> param</span>
|
||||
<span style="font-weight: normal;">
|
||||
The input data.</span></h4>
|
||||
<h4>Remarks</h4>
|
||||
<div> If the input begins with a parenthesis, with any data within that
|
||||
parenthesis, the macro removes the parenthesis and expands to the result.
|
||||
If the input does not begin with a parenthesis the macro expands to the
|
||||
input.<br>
|
||||
</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="is_begin_parens.html">BOOST_PP_IS_BEGIN_PARENS</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/punctuation/remove_parens.html"><boost/preprocessor/punctuation/remove_parens.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/punctuation/remove_parens.html">boost/preprocessor/punctuation/remove_parens.hpp</a>><br><br>#define DATA data<br>#define DATAP ( data ) more_data<br><br>BOOST_PP_REMOVE_PARENS(DATA) // expands to 'data'
|
||||
BOOST_PP_REMOVE_PARENS(DATAP) // expands to 'data more_data'<br>
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2014</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -79,7 +79,6 @@
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||
|
||||
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||
<i><EFBFBD> Copyright Paul Mensonides 2002<br>
|
||||
</i><i><EFBFBD> Copyright Edward Diener 2014</i><br>
|
||||
|
@ -11,7 +11,7 @@
|
||||
Usage
|
||||
</h4>
|
||||
<div class="code">
|
||||
<b>BOOST_PP_SEQ_RPLACE</b>(<i>seq</i>, <i>i</i>, <i>elem</i>)
|
||||
<b>BOOST_PP_SEQ_REPLACE</b>(<i>seq</i>, <i>i</i>, <i>elem</i>)
|
||||
</div>
|
||||
<h4>
|
||||
Arguments
|
||||
|
@ -1,67 +1,55 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>BOOST_PP_SEQ_REST_N</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>BOOST_PP_SEQ_REST_N</b> macro expands to a <i>seq</i> of all but the
|
||||
first <i>n</i> elements of a <i>seq</i>.
|
||||
</div>
|
||||
<h4>
|
||||
Usage
|
||||
</h4>
|
||||
<div class="code">
|
||||
<b>BOOST_PP_SEQ_REST_N</b>(<i>n</i>, <i>seq</i>)
|
||||
</div>
|
||||
<h4>
|
||||
Arguments
|
||||
</h4>
|
||||
<dl>
|
||||
<dt>n</dt>
|
||||
<dd>
|
||||
The number of elements to remove.
|
||||
</dd>
|
||||
<dt>seq</dt>
|
||||
<dd>
|
||||
The <i>seq</i> from which the elements are to be removed.
|
||||
</dd>
|
||||
</dl>
|
||||
<h4>
|
||||
Remarks
|
||||
</h4>
|
||||
<div>
|
||||
This macro extracts <i>n</i> elements from the beginning of <i>seq</i> and
|
||||
returns the remainder of <i>seq</i> as a new <i>seq</i>
|
||||
</div>
|
||||
<h4>
|
||||
See Also
|
||||
</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="seq_first_n.html">BOOST_PP_SEQ_FIRST_N</a></li>
|
||||
</ul>
|
||||
<h4>
|
||||
Requirements
|
||||
</h4>
|
||||
<div>
|
||||
<b>Header:</b> <a href="../headers/seq/rest_n.html"><boost/preprocessor/seq/rest_n.hpp></a>
|
||||
</div>
|
||||
<h4>
|
||||
Sample Code
|
||||
</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/arithmetic/inc.html">boost/preprocessor/arithmetic/inc.hpp</a>><br>#include <<a href="../headers/seq/elem.html">boost/preprocessor/seq/elem.hpp</a>><br>#include <<a href="../headers/seq/first_n.html">boost/preprocessor/seq/first_n.hpp</a>><br>#include <<a href="../headers/seq/rest_n.html">boost/preprocessor/seq/rest_n.hpp</a>><br>#include <<a href="../headers/seq/size.html">boost/preprocessor/seq/size.hpp</a>><br><br>#define NUMBERS \<br> (0)(1)(2)(3)(4)(5)(6)(7)(8)(9) \<br> (10)(11)(12)(13)(14)(15)(16)(17)(18)(19) \<br> (20)(21)(22)(23)(24)(25)(26)(27)(28)(29) \<br> (30)(31)(32)(33)(34)(35)(36)(37)(38)(39) \<br> (40)(41)(42)(43)(44)(45)(46)(47)(48)(49) \<br> (50)(51)(52)(53)(54)(55)(56)(57)(58)(59) \<br> (60)(61)(62)(63)(64)(65)(66)(67)(68)(69) \<br> (70)(71)(72)(73)(74)(75)(76)(77)(78)(79) \<br> (80)(81)(82)(83)(84)(85)(86)(87)(88)(89) \<br> (90)(91)(92)(93)(94)(95)(96)(97)(98)(99) \<br> (100)(101)(102)(103)(104)(105)(106)(107)(108)(109) \<br> (110)(111)(112)(113)(114)(115)(116)(117)(118)(119) \<br> (120)(121)(122)(123)(124)(125)(126)(127)(128)(129) \<br> (130)(131)(132)(133)(134)(135)(136)(137)(138)(139) \<br> (140)(141)(142)(143)(144)(145)(146)(147)(148)(149) \<br> (150)(151)(152)(153)(154)(155)(156)(157)(158)(159) \<br> (160)(161)(162)(163)(164)(165)(166)(167)(168)(169) \<br> (170)(171)(172)(173)(174)(175)(176)(177)(178)(179) \<br> (180)(181)(182)(183)(184)(185)(186)(187)(188)(189) \<br> (190)(191)(192)(193)(194)(195)(196)(197)(198)(199) \<br> (200)(201)(202)(203)(204)(205)(206)(207)(208)(209) \<br> (210)(211)(212)(213)(214)(215)(216)(217)(218)(219) \<br> (220)(221)(222)(223)(224)(225)(226)(227)(228)(229) \<br> (230)(231)(232)(233)(234)(235)(236)(237)(238)(239) \<br> (240)(241)(242)(243)(244)(245)(246)(247)(248)(249) \<br> (250)(251)(252)(253)(254)(255)(256) \<br> /**/<br><br>#define SUPER_ADD(x, y) <a href="seq_elem.html">BOOST_PP_SEQ_ELEM</a>(y, <a href="seq_rest_n.html">BOOST_PP_SEQ_REST_N</a>(x, NUMBERS))<br><br>SUPER_ADD(100, 100) // expands to 200<br><br>#define SUPER_SUB(x, y) \<br> <a href="seq_size.html">BOOST_PP_SEQ_SIZE</a>( \<br> <a href="seq_rest_n.html">BOOST_PP_SEQ_REST_N</a>( \<br> <a href="inc.html">BOOST_PP_INC</a>(y), \<br> <a href="seq_first_n.html">BOOST_PP_SEQ_FIRST_N</a>( \<br> <a href="inc.html">BOOST_PP_INC</a>(x), NUMBERS \<br> ) \<br> ) \<br> ) \<br> /**/<br><br>SUPER_SUB(67, 25) // expands to 42<br></pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;">
|
||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
||||
<br><i><EFBFBD> Copyright Paul Mensonides 2002</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>BOOST_PP_SEQ_REST_N</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_SEQ_REST_N</b> macro
|
||||
expands to a <i>seq</i> of all but the first <i>n</i> elements of a <i>seq</i>.
|
||||
</div>
|
||||
<h4> Usage </h4>
|
||||
<div class="code"> <b>BOOST_PP_SEQ_REST_N</b>(<i>n</i>, <i>seq</i>) </div>
|
||||
<h4> Arguments </h4>
|
||||
<dl>
|
||||
<dt>n</dt>
|
||||
<dd> The number of elements to remove. </dd>
|
||||
<dt>seq</dt>
|
||||
<dd> The <i>seq</i> from which the elements are to be removed. </dd>
|
||||
</dl>
|
||||
<h4> Remarks </h4>
|
||||
<div> This macro extracts <i>n</i> elements from the beginning of <i>seq</i>
|
||||
and returns the remainder of <i>seq</i> as a new <i>seq.<br>
|
||||
<br>
|
||||
</i>It is undefined behavior if <i>n </i>is greater or equal to the size
|
||||
of the <i>seq</i>. </div>
|
||||
<h4> See Also </h4>
|
||||
<ul>
|
||||
<li> <a href="seq_first_n.html">BOOST_PP_SEQ_FIRST_N</a></li>
|
||||
</ul>
|
||||
<h4> Requirements </h4>
|
||||
<div> <b>Header:</b> <a href="../headers/seq/rest_n.html"><boost/preprocessor/seq/rest_n.hpp></a>
|
||||
</div>
|
||||
<h4> Sample Code </h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/arithmetic/inc.html">boost/preprocessor/arithmetic/inc.hpp</a>><br>#include <<a
|
||||
href="../headers/seq/elem.html">boost/preprocessor/seq/elem.hpp</a>><br>#include <<a
|
||||
href="../headers/seq/first_n.html">boost/preprocessor/seq/first_n.hpp</a>><br>#include <<a
|
||||
href="../headers/seq/rest_n.html">boost/preprocessor/seq/rest_n.hpp</a>><br>#include <<a
|
||||
href="../headers/seq/size.html">boost/preprocessor/seq/size.hpp</a>><br><br>#define NUMBERS \<br> (0)(1)(2)(3)(4)(5)(6)(7)(8)(9) \<br> (10)(11)(12)(13)(14)(15)(16)(17)(18)(19) \<br> (20)(21)(22)(23)(24)(25)(26)(27)(28)(29) \<br> (30)(31)(32)(33)(34)(35)(36)(37)(38)(39) \<br> (40)(41)(42)(43)(44)(45)(46)(47)(48)(49) \<br> (50)(51)(52)(53)(54)(55)(56)(57)(58)(59) \<br> (60)(61)(62)(63)(64)(65)(66)(67)(68)(69) \<br> (70)(71)(72)(73)(74)(75)(76)(77)(78)(79) \<br> (80)(81)(82)(83)(84)(85)(86)(87)(88)(89) \<br> (90)(91)(92)(93)(94)(95)(96)(97)(98)(99) \<br> (100)(101)(102)(103)(104)(105)(106)(107)(108)(109) \<br> (110)(111)(112)(113)(114)(115)(116)(117)(118)(119) \<br> (120)(121)(122)(123)(124)(125)(126)(127)(128)(129) \<br> (130)(131)(132)(133)(134)(135)(136)(137)(138)(139) \<br> (140)(141)(142)(143)(144)(145)(146)(147)(148)(149) \<br> (150)(151)(152)(153)(154)(155)(156)(157)(158)(159) \<br> (160)(161)(162)(163)(164)(165)(166)(167)(168)(169) \<br> (170)(171)(172)(173)(174)(175)(176)(177)(178)(179) \<br> (180)(181)(182)(183)(184)(185)(186)(187)(188)(189) \<br> (190)(191)(192)(193)(194)(195)(196)(197)(198)(199) \<br> (200)(201)(202)(203)(204)(205)(206)(207)(208)(209) \<br> (210)(211)(212)(213)(214)(215)(216)(217)(218)(219) \<br> (220)(221)(222)(223)(224)(225)(226)(227)(228)(229) \<br> (230)(231)(232)(233)(234)(235)(236)(237)(238)(239) \<br> (240)(241)(242)(243)(244)(245)(246)(247)(248)(249) \<br> (250)(251)(252)(253)(254)(255)(256) \<br> /**/<br><br>#define SUPER_ADD(x, y) <a
|
||||
href="seq_elem.html">BOOST_PP_SEQ_ELEM</a>(y, <a href="seq_rest_n.html">BOOST_PP_SEQ_REST_N</a>(x, NUMBERS))<br><br>SUPER_ADD(100, 100) // expands to 200<br><br>#define SUPER_SUB(x, y) \<br> <a
|
||||
href="seq_size.html">BOOST_PP_SEQ_SIZE</a>( \<br> <a href="seq_rest_n.html">BOOST_PP_SEQ_REST_N</a>( \<br> <a
|
||||
href="inc.html">BOOST_PP_INC</a>(y), \<br> <a href="seq_first_n.html">BOOST_PP_SEQ_FIRST_N</a>( \<br> <a
|
||||
href="inc.html">BOOST_PP_INC</a>(x), NUMBERS \<br> ) \<br> ) \<br> ) \<br> /**/<br><br>SUPER_SUB(67, 25) // expands to 42</pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||
<i><EFBFBD> Copyright Paul Mensonides 2002</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0. (See
|
||||
accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -42,7 +42,7 @@ not occur.<br>
|
||||
<b>Header:</b> <a href="../headers/tuple/eat.html"><boost/preprocessor/tuple/eat.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div><pre>#include <<a href="../headers/control/if.html">boost/preprocessor/control/if.hpp</a>><br>#include <<a href="../headers/tuple/eat.html">boost/preprocessor/tuple/eat.hpp</a>><br><br>#define OP(a, b) (a b)<br><br>#define MACRO(n) <a href="if.html">BOOST_PP_IF</a>(n, OP, <a href="tuple_eat.html">BOOST_PP_TUPLE_EAT</a>(2))(1, 2)<br><br>// or for the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br><br>#define MACRO(n) <a href="if.html">BOOST_PP_IF</a>(n, OP, <a href="file:///C:/Programming/VersionControl/sandbox/variadics/libs/preprocessor/doc/ref/tuple_eat.html">BOOST_PP_TUPLE_EAT</a>())(1, 2)<br><br>MACRO(0) // expands to nothing<br>MACRO(1) // expands to (1, 2)<br></pre></div>
|
||||
<div><pre>#include <<a href="../headers/control/if.html">boost/preprocessor/control/if.hpp</a>><br>#include <<a href="../headers/tuple/eat.html">boost/preprocessor/tuple/eat.hpp</a>><br><br>#define OP(a, b) (a b)<br><br>#define MACRO(n) <a href="if.html">BOOST_PP_IF</a>(n, OP, <a href="tuple_eat.html">BOOST_PP_TUPLE_EAT</a>(2))(1, 2)<br><br>// or for the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br><br>#define MACRO(n) <a href="if.html">BOOST_PP_IF</a>(n, OP, <a href="tuple_eat.html">BOOST_PP_TUPLE_EAT</a>())(1, 2)<br><br>MACRO(0) // expands to nothing<br>MACRO(1) // expands to (1, 2)<br></pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;">
|
||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
||||
|
@ -49,7 +49,7 @@ or<br>
|
||||
<b>Header:</b> <a href="../headers/tuple/elem.html"><boost/preprocessor/tuple/elem.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div><pre>#include <<a href="../headers/tuple/elem.html">boost/preprocessor/tuple/elem.hpp</a>><br><br>#define TUPLE (a, b, c, d)<br><br><a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 0, TUPLE) // expands to a<br><a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 3, TUPLE) // expands to d<br><br>// or for the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br><br><a href="file:///C:/Programming/VersionControl/sandbox/variadics/libs/preprocessor/doc/ref/tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(0, TUPLE) // expands to a in the variadic version<br><a href="file:///C:/Programming/VersionControl/sandbox/variadics/libs/preprocessor/doc/ref/tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(3, TUPLE) // expands to d in the variadic version<br></pre></div>
|
||||
<div><pre>#include <<a href="../headers/tuple/elem.html">boost/preprocessor/tuple/elem.hpp</a>><br><br>#define TUPLE (a, b, c, d)<br><br><a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 0, TUPLE) // expands to a<br><a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(4, 3, TUPLE) // expands to d<br><br>// or for the variadic version <a href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br><br><a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(0, TUPLE) // expands to a in the variadic version<br><a href="tuple_elem.html">BOOST_PP_TUPLE_ELEM</a>(3, TUPLE) // expands to d in the variadic version<br></pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;">
|
||||
<i><EFBFBD> Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
|
||||
|
124
doc/ref/va_opt.html
Normal file
124
doc/ref/va_opt.html
Normal file
@ -0,0 +1,124 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html;
|
||||
charset=windows-1252">
|
||||
<title>BOOST_PP_VA_OPT</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_VA_OPT</b> variadic
|
||||
macro is a more flexible alternative to the C++20 __VA_OPT__
|
||||
construct. It expands to either one of two inputs depending on
|
||||
whether the variadic data is empty or not, whereas the C++20
|
||||
__VA_OPT__ constructs expands to either its input or nothing
|
||||
depending on whether the variadic data is empty or not. This macro
|
||||
only exists when the compilation is at the C++20 level and the
|
||||
__VA_OPT__ construct is supported.</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_VA_OPT</b>(x,y,<i>...</i>) <a
|
||||
href="../topics/variadic_macros.html#VNotation" target="_self"><sup>(v)</sup></a><br>
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<p> x<br>
|
||||
A tuple
|
||||
whose data is the macro expansion if the <i>variadic data</i> is
|
||||
<b>not</b> empty<br>
|
||||
y<br>
|
||||
A tuple
|
||||
whose data is the macro expansion if the <i>variadic data</i> is
|
||||
empty<br>
|
||||
,,,<br>
|
||||
The <i>variadic
|
||||
data</i> to be checked for emptiness<br>
|
||||
</p>
|
||||
<dl>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div> When the macro invocation BOOST_PP_VARIADIC_HAS_OPT() expands
|
||||
to 1, then this macro exists and can be invoked, otherwise this
|
||||
macro does not exist and attempting to invoke it will lead to a
|
||||
preprocessor error that the macro can not be found. Because of
|
||||
this condition the header file for including this macro includes
|
||||
the header file for the BOOST_PP_VARIADIC_HAS_OPT macro.<br>
|
||||
<br>
|
||||
The difference between this macro and the __VA_OPT__ construct
|
||||
illustrates a limitation of the latter construct with a trade off
|
||||
of simpler syntax. The differences between the __VA_OPT__
|
||||
construct and this macro are:<br>
|
||||
<ul>
|
||||
<li>The __VA_OPT__ construct offers a choice as its expansion
|
||||
only between its input preprocessing tokens or nothing (
|
||||
called a "single placemarker token" ) depending on whether the
|
||||
implicit variadic data is empty or not. There is no way using
|
||||
the __VA_OPT__ construct to specify any alternative but the
|
||||
"single placemarker token" when the variadic data is empty
|
||||
whereas any preprocessing tokens can be specified when the
|
||||
variadic data is not empty. With the BOOST_PP_VA_OPT macro the
|
||||
user can specify as its expansion preprocessing tokens both
|
||||
when the variadic data is empty and when the variadic data is
|
||||
not empty.</li>
|
||||
<li>The __VA_OPT__ construct offers a simple syntax whereas this
|
||||
macro is more verbose. The BOOST_PP_VA_OPT macro's first and
|
||||
second parameters must be Boost PP tuples of data, in order to
|
||||
expand to normal or variadic data, and the third parameter
|
||||
must be the variadic data to check for emptiness, whereas the
|
||||
__VA_OPT__ construct has an implied variadic data as
|
||||
__VA_ARGS__ to check for emptiness and can specify its
|
||||
expansion directly in terms of its input.</li>
|
||||
<li>The __VA_OPT__ construct can only be specified in the
|
||||
replacement list of some macro, whereas the BOOST_PP_VA_OPT
|
||||
macro can be used both as an alternative to the __VA_OPT__
|
||||
construct in the replacement list of some macro and anywhere
|
||||
else a macro can be used.</li>
|
||||
<li>It is impossible to have a left parenthesis '(' or a right
|
||||
parenthesis ')' as preprocessing token data within the
|
||||
__VA_OPT__ construct whereas both are possible as part of the
|
||||
expanded data for the BOOST_PP_VA_OPT macro.<br>
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
The exact BOOST_PP_VA_OPT equivalent to the construct of
|
||||
'__VA_OPT__ ( pp-tokens )' in the replacement list of a macro is
|
||||
'BOOST_PP_VA_OPT (( pp-tokens ),(),__VA_ARGS__)'.</div>
|
||||
<h4>See Also</h4>
|
||||
<ul>
|
||||
<li><a href="variadic_has_opt.html">BOOST_PP_VARIADIC_HAS_OPT</a></li>
|
||||
</ul>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a
|
||||
href="../headers/facilities/va_opt.html"><boost/preprocessor/facilities/va_opt.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/facilities/va_opt.html">boost/preprocessor/facilities/va_opt.hpp</a>>
|
||||
|
||||
# if <a href="variadic_has_opt.html">BOOST_PP_VARIADIC_HAS_OPT</a>()
|
||||
|
||||
#define DATA
|
||||
#define OBJECT OBJECT2
|
||||
#define OBJECT2
|
||||
#define FUNC(x) FUNC2(x)
|
||||
#define FUNC2(x)
|
||||
#define FUNC_GEN(x,y) (1,2,3)
|
||||
|
||||
<a href="va_opt.html">BOOST_PP_VA_OPT</a>((1),(2),DATA) // expands to 2
|
||||
<a href="va_opt.html">BOOST_PP_VA_OPT</a>((3),(4),OBJECT) // expands to 4
|
||||
<a href="va_opt.html">BOOST_PP_VA_OPT</a>((5),(6),FUNC(1)) // expands to 6
|
||||
<a href="va_opt.html">BOOST_PP_VA_OPT</a>((7,8),(9,10),FUNC) // expands to 7,8
|
||||
<a href="va_opt.html">BOOST_PP_VA_OPT</a>((1,2,3,4,5),(6,7,8,9,10),FUNC_GEN) // expands to 1,2,3,4,5
|
||||
|
||||
#endif
|
||||
</pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2019</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version
|
||||
1.0. (See accompanying file <a
|
||||
href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
63
doc/ref/variadic_has_opt.html
Normal file
63
doc/ref/variadic_has_opt.html
Normal file
@ -0,0 +1,63 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>BOOST_PP_VARIADIC_HAS_OPT</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="margin-left: 0px;"> The <b>BOOST_PP_VARIADIC_HAS_OPT</b> macro
|
||||
determines whether or not the C++20 __VA_OPT__ construct is supported for the compiler's preprocessor being used.
|
||||
Expands to 1 if the __VA_OPT__ construct is supported, otherwise expands to 0.
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code"> <b>BOOST_PP_VARIADIC_HAS_OPT</b>() <br>
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>None<br>
|
||||
</dt>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div>
|
||||
This macro only returns 1 if the compiler is compiling at its own C++20 level and
|
||||
__VA_OPT__ is supported. It is possible for a compiler to support the __VA_OPT__
|
||||
construct when not compiling at its own C++20 level, but this macro will return
|
||||
0 in that case even if __VA_OPT__ is normally supported for that level. The reason
|
||||
for this is that such a compiler may have a compiler switch, enforcing a strict
|
||||
adherence to a particular C++ standard level, which gives a warning or an error
|
||||
if __VA_OPT__ is specified below the C++20 level, and the preprocessor library
|
||||
wants to avoid that happening. Therefore the macro will only test to see whether
|
||||
or not __VA_OPT__ is supported at the C++20 level, while otherwise always returning
|
||||
0 for all lesser C++ standard levels.
|
||||
</div>
|
||||
<h4>Requirements</h4>
|
||||
<div> <b>Header:</b> <a href="../headers/variadic/has_opt.html"><boost/preprocessor/variadic/has_opt.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>
|
||||
#include <<a href="../headers/variadic/has_opt.html">boost/preprocessor/variadic/has_opt.hpp</a>><br>
|
||||
#if <a href="variadic_has_opt.html">BOOST_PP_VARIADIC_HAS_OPT</a>()
|
||||
// Preprocessor code which uses __VA_OPT__
|
||||
#else
|
||||
// Preprocessor code which does not use __VA_OPT__
|
||||
#endif
|
||||
</pre>
|
||||
<br>
|
||||
or within a macro definition<br><br>
|
||||
<pre>
|
||||
#include <boost/preprocessor/control/iif.hpp>
|
||||
#include <<a href="../headers/variadic/has_opt.html">boost/preprocessor/variadic/has_opt.hpp</a>><br>
|
||||
#define USE_OPT(...) BOOST_PP_IIF(<a href="variadic_has_opt.html">BOOST_PP_VARIADIC_HAS_OPT</a>(),MACRO_USING_OPT,MACRO_NOT_USING_OPT)(__VA_ARGS__)
|
||||
#define MACRO_USING_OPT(...) __VA_OPT__( preprocessor tokens ) anything
|
||||
#define MACRO_NOT_USING_OPT(...) anything
|
||||
</pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2019</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -13,14 +13,14 @@
|
||||
code to check for the presence of variadic macro support. It can be
|
||||
used by the end-user for the same purpose. The macro equals 1 if
|
||||
variadic macros are supported and 0 if they are not. </div><b>Requirements</b>
|
||||
<div> <b>Header:</b> <a href="../headers/config/variadics.html"><boost/preprocessor/config/variadics.hpp></a>
|
||||
<div> <b>Header:</b> <a href="../headers/config/variadics.html"><boost/preprocessor/config/config.hpp></a>
|
||||
</div>
|
||||
<h4>Sample Code</h4>
|
||||
<div>
|
||||
<pre>#include <<a href="../headers/config/variadics.html">boost/preprocessor/config/variadics.hpp</a>><br><br>#if <a href="variadics.html">BOOST_PP_VARIADICS</a><br>#define SOME_MACRO(...) // replacement list<br>#else<br>#define SOME_MACRO(param1,param2) // replacement list<br>#endif<br></pre>
|
||||
<pre>#include <<a href="../headers/config/variadics.html">boost/preprocessor/config/config.hpp</a>><br><br>#if <a href="variadics.html">BOOST_PP_VARIADICS</a><br>#define SOME_MACRO(...) // replacement list<br>#else<br>#define SOME_MACRO(param1,param2) // replacement list<br>#endif<br></pre>
|
||||
</div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2011</i> </div>
|
||||
<div style="margin-left: 0px;"> <i></i><i><EFBFBD> Copyright Edward Diener 2011,2014</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
|
@ -104,7 +104,6 @@ ACCUMULATE_D(1, ARRAY)// expands to 10
|
||||
</pre></div>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright <a href="http://www.housemarque.com"
|
||||
|
||||
target="_top">Housemarque Oy</a> 2002</i> <br>
|
||||
<i><EFBFBD> Copyright Paul Mensonides 2002<br>
|
||||
</i><i><EFBFBD> Copyright Edward Diener 2014</i><br>
|
||||
|
@ -12,12 +12,12 @@
|
||||
<ul>
|
||||
<li><a href="add_d.html"><span style="color: gray;">BOOST_PP_ADD_D</span></a></li>
|
||||
<li><a href="div_d.html"><span style=" color: gray;">BOOST_PP_DIV_D</span></a></li>
|
||||
<li><a href="file:///C:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/ref/div_d.html"><span
|
||||
<li><a href="div_d.html"><span
|
||||
style=" color: gray;"></span></a><a href="mod_d.html"><span style=" color: gray;">BOOST_PP_MOD_D</span></a></li>
|
||||
<li><a href="file:///C:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/ref/mod_d.html"><span
|
||||
<li><a href="mod_d.html"><span
|
||||
style=" color: gray;"></span></a><a href="mul_d.html"><span
|
||||
style=" color: gray;">BOOST_PP_MUL_D</span></a></li>
|
||||
<li><a href="file:///C:/Programming/VersionControl/modular-boost/libs/preprocessor/doc/ref/mul_d.html"><span
|
||||
<li><a href="mul_d.html"><span
|
||||
style=" color: gray;"></span></a><a href="sub_d.html"><span
|
||||
style=" color: gray;">BOOST_PP_SUB_D</span></a></li>
|
||||
</ul>
|
||||
@ -29,10 +29,12 @@
|
||||
</ul>
|
||||
comparison<br>
|
||||
<ul>
|
||||
<li><a href="equal_d.html"><span style=" color: gray;">BOOST_PP_EQUAL_D</span></a></li>
|
||||
<li><a href="greater_d.html"><span style=" color: gray;">BOOST_PP_GREATER_D</span></a></li>
|
||||
<li><a href="greater_equal_d.html"><span style=" color: gray;">BOOST_PP_GREATER_EQUAL_D</span></a></li>
|
||||
<li><a href="less_d.html"><span style=" color: gray;">BOOST_PP_LESS_D</span></a></li>
|
||||
<li><a href="less_equal_d.html"><span style=" color: gray;">BOOST_PP_LESS_EQUAL_D</span></a></li>
|
||||
<li><a href="not_equal_d.html"><span style=" color: gray;">BOOST_PP_NOT_EQUAL_D</span></a></li>
|
||||
</ul>
|
||||
control<br>
|
||||
<ul>
|
||||
@ -51,6 +53,7 @@
|
||||
<li><a href="list_fold_right_d.html"><span style=" color: gray;">BOOST_PP_LIST_FOLD_RIGHT_d</span></a></li>
|
||||
<li><a href="list_rest_n_d.html"><span style=" color: gray;">BOOST_PP_LIST_REST_N_D</span></a></li>
|
||||
<li><a href="list_reverse_d.html"><span style=" color: gray;">BOOST_PP_LIST_REVERSE_D</span></a></li>
|
||||
<li><a href="list_size_d.html"><span style=" color: gray;">BOOST_PP_LIST_SIZE_D</span></a></li>
|
||||
<li><a href="list_to_array_d.html"><span style=" color: gray;">BOOST_PP_LIST_TO_ARRAY_D</span></a></li>
|
||||
<li><a href="list_transform_d.html"><span style=" color: gray;">BOOST_PP_LIST_TRANSFORM_D</span></a></li>
|
||||
</ul>
|
||||
|
@ -284,6 +284,7 @@
|
||||
<!-- V -->
|
||||
<br>BOOST_PP_VALUE
|
||||
<br>BOOST_PP_VARIADIC_ELEM
|
||||
<br>BOOST_PP_VARIADIC_HAS_OPT
|
||||
<br>BOOST_PP_VARIADIC_SIZE
|
||||
<br>BOOST_PP_VARIADIC_TO_ARRAY
|
||||
<br>BOOST_PP_VARIADIC_TO_LIST
|
||||
|
@ -1,5 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>title.html</title>
|
||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||
</head>
|
||||
@ -11,15 +12,14 @@
|
||||
may be used as a standalone library. </div>
|
||||
<div> An excerpt from <i>C++ Template Metaprogramming: Concepts, Tools, and
|
||||
Techniques from Boost and Beyond</i> by Dave Abrahams and Aleksey
|
||||
Gurtovoy has been made available <a href="http://www.boostpro.com/mplbook/preprocessor.html"
|
||||
target="_top"><font color="blue"><b><u><i>online</i></u></b></font></a>.
|
||||
Gurtovoy has been made <a href="AppendixA-AnIntroductiontoPreprocessorMetaprogramming.html"
|
||||
target="_top"><font color="blue"><b><u><i>available</i></u></b></font></a>.
|
||||
This excerpt contains a basic introduction to the Preprocessor library and
|
||||
preprocessor metaprogramming which may help users new to the library and
|
||||
users interested in seeing some of the facilities offered by the library.
|
||||
</div>
|
||||
<!--
|
||||
<EFBFBD> Copyright Housemarque Oy 2002<30> Copyright Paul Mensonides 2002
|
||||
Distributed under the Boost Software License, Version 1.0.(See accompanying file LICENSE_1_0.txt or copy at
|
||||
<EFBFBD> Copyright Housemarque Oy 2002<30> Copyright Paul Mensonides 2002Distributed 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)-->
|
||||
</body>
|
||||
</html>
|
||||
|
@ -15,6 +15,7 @@
|
||||
<li><a href="topics/file_iteration.html">file iteration</a></li>
|
||||
<li><a href="topics/evaluated_slots.html">evaluated slots</a></li>
|
||||
<li><a href="topics/variadic_macros.html">variadic macros</a></li>
|
||||
<li><a href="topics/emptiness.html">emptiness</a></li>
|
||||
</ul>
|
||||
<!--
|
||||
<EFBFBD> Copyright Housemarque Oy 2002
|
||||
|
211
doc/topics/emptiness.html
Normal file
211
doc/topics/emptiness.html
Normal file
@ -0,0 +1,211 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252"
|
||||
http-equiv="content-type">
|
||||
<title>emptiness.html</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
<style>
|
||||
u { font-weight: normal; text-decoration: none; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h4>Passing nothing</h4>
|
||||
<div> Although rarely desirable it has always been legal in C++ to
|
||||
pass nothing, aka no preprocessor tokens, as an argument when
|
||||
invoking a macro, whether the equivalent parameter be a regular
|
||||
parameter or a variadic one. </div>
|
||||
<div class="code">
|
||||
<pre> #define SOME_MACRO(Parameter1,Parameter2) macro expansion using Parameter1 and Parameter2
|
||||
#define SOME_VARIADIC_MACRO(Parameter1,...) macro expansion using Parameter1 and __VA_ARGS__
|
||||
|
||||
SOME_MACRO(a,b) // Normal
|
||||
SOME_MACRO(a,) // Legal, second argument is empty
|
||||
SOME_MACRO(,b) // Legal, first argument is empty
|
||||
SOME_MACRO(a) // Preprocessor error, passing the wrong number of arguments
|
||||
|
||||
SOME_VARIADIC_MACRO(a,b,c,d) // Normal
|
||||
SOME_VARIADIC_MACRO(a,) // Legal, variadic argument is empty
|
||||
SOME_VARIADIC_MACRO(,b,c,d) // Legal, first argument is empty
|
||||
SOME_VARIADIC_MACRO(a) /* Preprocessor error in standard below C++20 level,
|
||||
but in C++20 exactly equivalent to SOME_VARIADIC_MACRO(a,) */</pre>
|
||||
</div>
|
||||
<h4>Expanding to nothing</h4>
|
||||
<div> Given certain arguments a macro might expand to nothing, aka
|
||||
no preprocessor tokens. This may happen more than in the previous
|
||||
case of an argument to a macro being nothing because the expansion
|
||||
of a macro is often used to initialize some C++ construct, and C++
|
||||
has some places where a part of a compile-time construct can be
|
||||
empty. However a macro which expands to nothing rarely occurs when
|
||||
that macro's expansion is used as an argument to another macro
|
||||
because we would again have a macro where we are passing nothing
|
||||
as an argument. </div>
|
||||
<div class="code">
|
||||
<pre> #define ANOTHER_MACRO(Parameter1,Parameter2) /* expands to nothing when Parameter1 and Parameter2
|
||||
are numbers, otherwise expands to some preprocessing
|
||||
token, such as '1' */
|
||||
|
||||
int another_int = { ANOTHER_MACRO(x,y) }; // ANOTHER_MACRO Expands to 1
|
||||
int some_int = { ANOTHER_MACRO(1,2) }; // ANOTHER_MACRO Expands to nothing
|
||||
SOME_MACRO(ANOTHER_MACRO(x,y),z) // Normal, ANOTHER_MACRO Expands to 1
|
||||
SOME_MACRO(ANOTHER_MACRO(1,2),z) // Legal, first argument is empty as ANOTHER_MACRO Expands to nothing</pre>
|
||||
</div>
|
||||
<h4>Emptiness defined</h4>
|
||||
<div> Passing nothing as a macro argument or a macro expanding to
|
||||
nothing I term as 'emptiness', as 'nothing' is too amorphous a
|
||||
term which can be used in too many other contexts for my liking.
|
||||
In the vast majority of cases when designing a macro for use
|
||||
emptiness is not a part of such a design, and passing emptiness as
|
||||
an argument or expanding to emptiness is not anything that someone
|
||||
writing a macro takes into account when he explains to other
|
||||
programmers how a macro should be used.<br>
|
||||
<br>
|
||||
Other than the fact that macros are generally created so that some
|
||||
actual preprocessor data of a particular kind needs to be passed
|
||||
as arguments or gets generated as part of macro expansion when a
|
||||
macro is invoked, there is another very good reason why working
|
||||
with emptiness is not part of a macro's design: there has been no
|
||||
perfectly fail-safe way to test for emptiness during macro
|
||||
expansion, whether it be in creating macros using just the
|
||||
facilities of the C++ standard or using a 3rd party library, such
|
||||
as this Boost preprocessor library. When I say 'fail-safe' I mean
|
||||
that there has always been some argument input, no matter how
|
||||
small the number of potential cases, where a macro designed to
|
||||
test whether or not the preprocessor data passed to it as an
|
||||
argument when the macro is invoked is actually empty fails in some
|
||||
way, with the failure normally occurring as a preprocessor error.<br>
|
||||
<br>
|
||||
Of course this does not mean that the best macro designed to test
|
||||
for emptiness will not work correctly the vast majority of the
|
||||
time. It only means that there has been no guarantee that such a
|
||||
macro will work correctly all 100% of the time. Nonetheless there
|
||||
have been uses of testing for emptiness, when a macro documents
|
||||
what a particular argument should generally consist of, even if
|
||||
the test is not guaranteed to work 100% of the time if particular
|
||||
unexpected argument data does get passed. </div>
|
||||
<h4>A C++20 solution for testing for emptiness</h4>
|
||||
<div> The C++ standard committee recognized, in the upcoming
|
||||
specification for the C++20 standard, that a way of testing
|
||||
whether variadic data is empty or not in the expansion of a
|
||||
variadic macro would be very useful when designing certain types
|
||||
of macros. Because of this the C++20 standard added a preprocessor
|
||||
construct which could do this in a certain way for variadic data
|
||||
in the expansion of a variadic macro. The construct is called
|
||||
__VA_OPT__, as in '__VA_OPT__ ( prepocessing tokens )' specified
|
||||
in the replacement list of a variadic macro. <br>
|
||||
<br>
|
||||
The way that the __VA_OPT__ constructs works is that if the
|
||||
variadic arguments to the variadic macro are empty or expand to
|
||||
emptiness then the __VA_OPT__ construct and its enclosed
|
||||
preprocessing token data expands to nothing, or in C++ terms "a
|
||||
single placemarker preprocessing token". Otherwise the __VA_OPT__
|
||||
construct expands to its enclosed preprocessing tokens. A further,
|
||||
possibly unintended, upshot of adding the __VA_OPT__ construct to
|
||||
C++20 is that it is now possible to create a variadic macro which
|
||||
is 100% reliable in testing for emptiness whenever a compiler
|
||||
supports the __VA_OPT__ construct in its compilation of
|
||||
preprocessor code.<br>
|
||||
<br>
|
||||
For such a macro to always work which tests for emptiness the code
|
||||
must know when the __VA_OPT__ construct is available. It is not
|
||||
enough to know that a compiler is working at the C++20 level,
|
||||
since as all C++ programmers know an adherence to a C++ standard
|
||||
level never guarantees that a particular compiler supports every
|
||||
aspect of that level. Happily there is a way to test whether a
|
||||
compiler supports the __VA_OPT__ construct as long as the compiler
|
||||
supports variadic macros, and that way has been openly published
|
||||
on the Internet, although the actual macro code would not have
|
||||
been hard to create even if it had not publicly appeared. This
|
||||
library uses that code to test for __VA_OPT__ as a necessary
|
||||
prelude for creating a variadic macro which is 100% reliable in
|
||||
testing for emptiness.<br>
|
||||
<br>
|
||||
The Boost Preprocessor macro for testing whether the __VA_OPT__
|
||||
construct is supported during compilation is called
|
||||
BOOST_PP_VARIADIC_HAS_OPT, which is a function-like macro taking
|
||||
no parameters and returning 1 if the __VA_OPT__ construct is
|
||||
supported and 0 if it is not. The macro only returns 1 when
|
||||
variadic macros are supported, when the compiler is at the C++20
|
||||
level, and when the __VA_OPT__ construct can be used according to
|
||||
the C++20 standard. In particular the macro needs the compiler to
|
||||
be working at the C++20 level despite the fact that at least one
|
||||
major compiler supports the __VA_OPT__ construct in some of its
|
||||
latest releases even when the compiler is being used at a C++
|
||||
standard level below that of C++20. The reason this Boost
|
||||
preprocessor library requires the C++20 level is because that same
|
||||
major compiler can produce a warning, or even an error, when it
|
||||
even sees a macro using the __VA_OPT__ construct at a level below
|
||||
C++20, even though it supports it, if other compiler options
|
||||
requiring strict adherence to the level of the C++ standard being
|
||||
used are passed on the command line. So taking a conservative
|
||||
approach the BOOST_PP_VARIADIC_HAS_OPT macros requires compilation
|
||||
at the C++20 level, along with variadic macro support, along with
|
||||
the testing code expanding to 1, in order to specify that
|
||||
__VA_OPT__ is supported.<br>
|
||||
<br>
|
||||
The actual Boost Preprocessor library for testing for emptiness in
|
||||
C++20 mode is called BOOST_PP_CHECK_EMPTY. The macro is a variadic
|
||||
macro with a single variadic parameter. The macro only exists if
|
||||
our previous macro for testing for __VA_OPT__, called
|
||||
BOOST_PP_VARIADIC_HAS_OPT, expands to 1 when invoked as
|
||||
BOOST_PP_VARIADIC_HAS_OPT(). If BOOST_PP_VARIADIC_HAS_OPT()
|
||||
expands to 0 the BOOST_PP_CHECK_EMPTY macro does not exist at all
|
||||
in this library. The input to the BOOST_PP_CHECK_EMPTY macro can
|
||||
be any variadic data. If the data passed to the macro is empty, or
|
||||
if the data passed to the macro is not empty but when the data
|
||||
itself is expanded it is empty, the macro returns 1, otherwise it
|
||||
returns 0. The macro works 100% of the time and is completely
|
||||
reliable no matter what preprocessor data is passed to it. But of
|
||||
course it only works when compiling at the C++20 level with the
|
||||
__VA_OPT__ construct supported by the compiler. It solves an old
|
||||
problem that it has never been possible, prior to C++20, to
|
||||
provide a 100% reliable implementation of a macro which tests for
|
||||
emptiness in C++.<br>
|
||||
<br>
|
||||
Along with the valuable BOOST_PP_CHECK_EMPTY macro the Boost
|
||||
Preprocessor library has also added a more flexible, if slightly
|
||||
verbose, alternative to the __VA_OPT__ construct, which works by
|
||||
using the ability of BOOST_PP_CHECK_EMPTY to reliably test for
|
||||
emptiness. This macro is called BOOST_PP_VA_OPT and allows the
|
||||
programmer to specify preprocessing tokens for expansion both when
|
||||
the variadic data is <b>not</b> empty and when the variadic data
|
||||
is empty. This improves on the __VA_OPT__ construct's ability to
|
||||
specify preprocessing tokens for expansion only when the variadic
|
||||
data is not empty. Like BOOST_PP_CHECK_EMPTY, which it uses, the
|
||||
BOOST_PP_VA_OPT macro only exists when BOOST_PP_VARIADIC_HAS_OPT()
|
||||
expands to 1. You can read further about how this macro works as
|
||||
an alternative to the C++20 __VA_OPT__ construct in the
|
||||
documentation for the macro itself.<br>
|
||||
<br>
|
||||
Eventually more C++ compilers will support C++20 and the
|
||||
__VA_OPT__ construct and more programmers will use compilers at
|
||||
the C++20 level. At that point the macro BOOST_PP_CHECK_EMPTY can
|
||||
be used reliably for testing emptiness in preprocessor data in
|
||||
macro code by all those programmers. The BOOST_PP_VA_OPT macro
|
||||
serves as a useful example of such use. This does not mean that
|
||||
designing macros with emptiness in mind needs to be done, much
|
||||
less considered, but that the possibility of doing so with
|
||||
complete reliability will be there if needed by the macro
|
||||
programmer. Along with the __VA_OPT__ construct as mandated by the
|
||||
C++20 standard the BOOST_PP_CHECK_EMPTY and BOOST_PP_VA_OPT macros
|
||||
add three more tools in the arsenal of macro programming, which is
|
||||
a good thing, while programmers who wanted to ignore any dealing
|
||||
with emptiness in macro code can continue to do so. </div>
|
||||
<b>See</b> <b>Also</b><br>
|
||||
<ul>
|
||||
<li><a href="../ref/variadic_has_opt.html">BOOST_PP_VARIADIC_HAS_OPT</a></li>
|
||||
<li><a href="../ref/check_empty.html">BOOST_PP_CHECK_EMPTY</a></li>
|
||||
<li><a href="../ref/va_opt.html">BOOST_PP_VA_OPT</a><br>
|
||||
</li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright Edward Diener 2019</i>
|
||||
</div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License, Version
|
||||
1.0. (See accompanying file <a
|
||||
href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
|
||||
copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -1,40 +1,37 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta content="text/html; charset=windows-1252" http-equiv="content-type">
|
||||
<title>variadic_macros.html</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
<style>
|
||||
u { font-weight: normal; text-decoration: none; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h4>Variadic Macros</h4>
|
||||
<div> Variadic macros are supported by a number of compilers.
|
||||
They are
|
||||
macros of the form:
|
||||
</div>
|
||||
<div class="code">
|
||||
<div> Variadic macros are supported by a number of compilers. They are
|
||||
macros of the form: </div>
|
||||
<div class="code">
|
||||
<pre>#define SOME_MACRO(ZeroOrMoreParameters,...) macro expansion possible specifying __VA_ARGS__</pre>
|
||||
</div>
|
||||
<div> The '...' in the parameter list represents the variadic
|
||||
data when the macro is invoked and the __VA_ARGS__ in the expansion
|
||||
represents the variadic data in the expansion of the macro. Variadic
|
||||
data is of the form of 1 or more preprocessor tokens separated by
|
||||
commas.<br>
|
||||
<div> The '...' in the parameter list represents the variadic data when the
|
||||
macro is invoked and the __VA_ARGS__ in the expansion represents the
|
||||
variadic data in the expansion of the macro. Variadic data is of the form
|
||||
of 1 or more preprocessor tokens separated by commas.<br>
|
||||
<br>
|
||||
The '...' must be the last parameter in the macro definition and there
|
||||
may be 0 or more non-variadic parameters preceding it.<br>
|
||||
The '...' must be the last parameter in the macro definition and there may
|
||||
be 0 or more non-variadic parameters preceding it.<br>
|
||||
<br>
|
||||
In the expansion of the macro __VA_ARGS__ may be specified 0 or more
|
||||
times to represent the variadic data. The variadic data in the
|
||||
expansion is a comma separated list of preprocessor tokens representing
|
||||
the variadic data which the invoker of the macro enters as the last
|
||||
arguments to the macro.<br>
|
||||
In the expansion of the macro __VA_ARGS__ may be specified 0 or more times
|
||||
to represent the variadic data. The variadic data in the expansion is a
|
||||
comma separated list of preprocessor tokens representing the variadic data
|
||||
which the invoker of the macro enters as the last arguments to the macro.<br>
|
||||
</div>
|
||||
<h4>Example<u> - Creating and invoking a variadic macro.</u></h4>
|
||||
<div class="code">
|
||||
<div class="code">
|
||||
<pre>#define INITIALIZE_INT_ARRAY(array_name,...) \ <br> static int array_name[] = { __VA_ARGS__ }; \ <br> /**/<br><br> INITIALIZE_INT_ARRAY(myname,45,789,33510,9346,2)</pre>
|
||||
</div>
|
||||
<u> <span style="font-weight: bold;">Preprocessor
|
||||
<u> <span style="font-weight: bold;">Preprocessor
|
||||
Library Support<br>
|
||||
</span></u>
|
||||
<div>The library offers support for variadic macros for those
|
||||
@ -56,7 +53,15 @@
|
||||
When BOOST_PP_VARIADICS is 1, the library offers some extended
|
||||
functionality
|
||||
by using variadic macros, and also offers extended support for working
|
||||
with variadic data.<br>
|
||||
with variadic data.<br><br>
|
||||
<a name="vmvcquirk"></a>Visual C++ has a
|
||||
few quirks related to variadic macros which require the end-user to code
|
||||
slightly differently. When BOOST_PP_VARIADICS is 1 and Visual C++ is the
|
||||
compiler BOOST_PP_VARIADICS_MSVC is 1, else when BOOST_PP_VARIADICS is 1
|
||||
and Visual C++ is not the compiler BOOST_PP_VARIADICS_MSVC is 0. When
|
||||
BOOST_PP_VARIADICS is 0 then BOOST_PP_VARIADICS_MSVC is not defined.
|
||||
In this way the end-user, when using variadic macros, can test for the
|
||||
presence of Visual C++ as the compiler and code accordingly.<br>
|
||||
<br>
|
||||
Support for working with variadic
|
||||
data is largely centered on being able to convert variadic data to
|
||||
@ -64,7 +69,7 @@
|
||||
functionality for working with those Boost preprocessor library data
|
||||
types is much greater than that for working with variadic data directly.<br>
|
||||
</div>
|
||||
<a name="VNotation"></a>
|
||||
<a name="VNotation"></a>
|
||||
<h4>Notation For Variadic Macros<br>
|
||||
</h4>
|
||||
<div>In the documentation, headers which have variadic macros,
|
||||
@ -131,7 +136,28 @@
|
||||
use this variadic data reliably as arguments to other macros, one needs
|
||||
variadic macro support.<br>
|
||||
</div>
|
||||
<u style="font-weight: bold;"> Using a Tuple Instead of an Array<br>
|
||||
<h4>C++20 Support For Variadic Macros</h4>
|
||||
<div>
|
||||
In the C++20 specification there is a new construct which can be
|
||||
used in the expansion of a variadic macro, called __VA_OPT__. This
|
||||
construct when used in the expansion of a variadic macro is followed
|
||||
by an opening paranthesis ('('), preprocessor data, and a closing
|
||||
parenthesis ('}'). When the variadic data passed by the invocation
|
||||
of a variadic macro is empty, this new construct expands to nothing.
|
||||
When the variadic data passed by the invocation of a variadic macro
|
||||
is not empty, this new construct expands to the preprocessor data
|
||||
between its opening and closing parentheses.
|
||||
<br><br>
|
||||
This library offers support for this new C++20 construct by automatically
|
||||
detecting whether this new construct is supported by the compiler's
|
||||
preprocessor when using the library. The library macro which detects
|
||||
support for the __VA_OPT__ construct is called BOOST_PP_VARIADIC_HAS_OPT.
|
||||
This is a function-like macro which takes no parameters and returns
|
||||
1 if the compiler is working in C++20 mode and supports the __VA_OPT__
|
||||
construct, while otherwise it returns 0.
|
||||
<br>
|
||||
</div>
|
||||
<u style="font-weight: bold;"> Using a Tuple Instead of an Array<br>
|
||||
</u>
|
||||
<div>An array as a preprocessor data type is a two-element tuple where the
|
||||
first element is the array size and the second element is a tuple which
|
||||
@ -144,7 +170,7 @@
|
||||
type is essentially obsolete for conforming C++ compilers. Only if your
|
||||
compiler does not support variadic macros is the preprocessor array data
|
||||
type still useful.</div>
|
||||
<u style="font-weight: bold;">Using Variadic Data</u>
|
||||
<u style="font-weight: bold;">Using Variadic Data</u>
|
||||
<div>Variadic data exists in the
|
||||
form of comma-separated preprocessor tokens. This is the case whether
|
||||
the variadic data comes from the __VA_ARGS__ of a variadic macro, from
|
||||
@ -169,7 +195,7 @@
|
||||
variadic data as a whole to variadic macros as the last parameter of
|
||||
the macro. However: <br>
|
||||
<br>
|
||||
<span style="font-weight: bold;">Attempting to pass
|
||||
<span style="font-weight: bold;">Attempting to pass
|
||||
variadic data as a
|
||||
whole directly into a non-variadic macro is not guaranteed to work and
|
||||
may fail.<br>
|
||||
@ -178,7 +204,7 @@
|
||||
of compilers, currently most notably Visual C++. Even passing variadic
|
||||
data as arguments to a non-variadic macro, when it is not represented
|
||||
in
|
||||
the form of __VA_ARGS__, may fail with certain compilers.<br>
|
||||
the form of<EFBFBD> __VA_ARGS__, may fail with certain compilers.<br>
|
||||
<br>
|
||||
What follows are very simple examples, showing how variadic data can be
|
||||
passed to a non-variadic macro.<br>
|
||||
@ -188,9 +214,9 @@
|
||||
<h4>Example<u> - Passing variadic data as a whole to a
|
||||
non-variadic
|
||||
macro. DO NOT DO.</u></h4>
|
||||
<div class="code">
|
||||
<div class="code">
|
||||
<pre>#define MACRO_ARG_2(x,y) BOOST_PP_ADD(x,y)<br>#define VAR_MACRO(...) __VA_ARGS__<br><br>/* The following should not be done and is not guaranteed to work with compilers. */<br><br><span
|
||||
style="font-weight: bold;"><span style="font-family: monospace;"></span></span>int xx = MACRO_ARG_2(VAR_MACRO(2,3));</pre>
|
||||
style="font-weight: bold;"><span style="font-family: monospace;"></span></span>int xx = MACRO_ARG_2(VAR_MACRO(2,3));</pre>
|
||||
</div>
|
||||
<div> There are two ways to pass variadic data to a non-variadic
|
||||
macro.
|
||||
@ -203,7 +229,7 @@ style="font-weight: bold;"><span style="font-family: monospace;"></span></span>i
|
||||
a
|
||||
non-variadic macro.<br>
|
||||
</u></h4>
|
||||
<div class="code">
|
||||
<div class="code">
|
||||
<pre>#define MACRO_ARG_2(x,y) BOOST_PP_ADD(x,y)<br>#define VAR_MACRO(...) __VA_ARGS__<br><br>/* The following will work correctly */<br><br>int xx = MACRO_ARG_2<br> (<br> BOOST_PP_VARIADIC_ELEM(0,VAR_MACRO(2,3)),<br> BOOST_PP_VARIADIC_ELEM(1,VAR_MACRO(2,3))<br> );</pre>
|
||||
</div>
|
||||
<div>The second way is to use a macro in the library called
|
||||
@ -215,7 +241,7 @@ style="font-weight: bold;"><span style="font-family: monospace;"></span></span>i
|
||||
BOOST_PP_OVERLOAD
|
||||
and on to a non-variadic macro.<br>
|
||||
</u></h4>
|
||||
<div class="code">
|
||||
<div class="code">
|
||||
<pre>#define MACRO_ARG_2(x,y) BOOST_PP_ADD(x,y)<br>#define VAR_MACRO(...) __VA_ARGS__<br><br>/* The following will work correctly */<br><br>int xx = BOOST_PP_OVERLOAD(MACRO_ARG_,VAR_MACRO(2,3))(VAR_MACRO(2,3));<br><br>/* For Visual C++ it is necessary to do this */<br><br>int xx = <br>BOOST_PP_CAT(BOOST_PP_OVERLOAD(MACRO_ARG_,VAR_MACRO(2,3))(VAR_MACRO(2,3)),BOOST_PP_EMPTY());</pre>
|
||||
</div>
|
||||
<br>
|
||||
@ -230,27 +256,27 @@ style="font-weight: bold;"><span style="font-family: monospace;"></span></span>i
|
||||
</div>
|
||||
<b>See</b> <b>Also</b><br>
|
||||
<ul>
|
||||
<li><a href="../ref/variadics.html">BOOST_PP_VARIADICS</a></li>
|
||||
<li><a href="../headers/tuple.html">Tuple Macros</a><br>
|
||||
<li><a href="../ref/variadics.html">BOOST_PP_VARIADICS</a></li>
|
||||
<li><a href="../headers/tuple.html">Tuple Macros</a><br>
|
||||
</li>
|
||||
<li><a href="../headers/variadic.html">Variadic
|
||||
<li><a href="../headers/variadic.html">Variadic
|
||||
Macros<br>
|
||||
</a></li>
|
||||
<li><a href="../ref/array_enum.html">BOOST_PP_ARRAY_ENUM</a></li>
|
||||
<li><a href="../ref/list_enum_r.html">BOOST_PP_LIST_ENUM</a></li>
|
||||
<li><a href="../ref/seq_enum.html">BOOST_PP_SEQ_ENUM</a></li>
|
||||
<li><a href="../ref/tuple_enum.html">BOOST_PP_TUPLE_ENUM</a></li>
|
||||
<li><a href="../ref/overload.html">BOOST_PP_OVERLOAD</a></li>
|
||||
<li><a href="../ref/array_enum.html">BOOST_PP_ARRAY_ENUM</a></li>
|
||||
<li><a href="../ref/list_enum_r.html">BOOST_PP_LIST_ENUM</a></li>
|
||||
<li><a href="../ref/seq_enum.html">BOOST_PP_SEQ_ENUM</a></li>
|
||||
<li><a href="../ref/tuple_enum.html">BOOST_PP_TUPLE_ENUM</a></li>
|
||||
<li><a href="../ref/overload.html">BOOST_PP_OVERLOAD</a></li>
|
||||
</ul>
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright
|
||||
<hr size="1">
|
||||
<div style="margin-left: 0px;"> <i><EFBFBD> Copyright
|
||||
Edward Diener
|
||||
2011,2013</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
2011,2013,2016</i> </div>
|
||||
<div style="margin-left: 0px;">
|
||||
<p><small>Distributed under the Boost Software License,
|
||||
Version 1.0.
|
||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
(See accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a>
|
||||
or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
@ -284,5 +284,6 @@
|
||||
# define BOOST_PP_DEC_254 253
|
||||
# define BOOST_PP_DEC_255 254
|
||||
# define BOOST_PP_DEC_256 255
|
||||
# define BOOST_PP_DEC_257 256
|
||||
#
|
||||
# endif
|
||||
|
55
include/boost/preprocessor/array/detail/get_data.hpp
Normal file
55
include/boost/preprocessor/array/detail/get_data.hpp
Normal file
@ -0,0 +1,55 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014. *
|
||||
# * 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) *
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_ARRAY_DETAIL_GET_DATA_HPP
|
||||
# define BOOST_PREPROCESSOR_ARRAY_DETAIL_GET_DATA_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/facilities/is_1.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ARRAY_DETAIL_GET_DATA */
|
||||
#
|
||||
# define BOOST_PP_ARRAY_DETAIL_GET_DATA_NONE(size, data)
|
||||
|
||||
# if BOOST_PP_VARIADICS && !(BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400)
|
||||
# if BOOST_PP_VARIADICS_MSVC
|
||||
# define BOOST_PP_ARRAY_DETAIL_GET_DATA_ANY_VC_DEFAULT(size, data) BOOST_PP_TUPLE_REM(size) data
|
||||
# define BOOST_PP_ARRAY_DETAIL_GET_DATA_ANY_VC_CAT(size, data) BOOST_PP_TUPLE_REM_CAT(size) data
|
||||
# define BOOST_PP_ARRAY_DETAIL_GET_DATA_ANY(size, data) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_IS_1(size), \
|
||||
BOOST_PP_ARRAY_DETAIL_GET_DATA_ANY_VC_CAT, \
|
||||
BOOST_PP_ARRAY_DETAIL_GET_DATA_ANY_VC_DEFAULT \
|
||||
) \
|
||||
(size,data) \
|
||||
/**/
|
||||
# else
|
||||
# define BOOST_PP_ARRAY_DETAIL_GET_DATA_ANY(size, data) BOOST_PP_TUPLE_REM(size) data
|
||||
# endif
|
||||
# else
|
||||
# define BOOST_PP_ARRAY_DETAIL_GET_DATA_ANY(size, data) BOOST_PP_TUPLE_REM(size) data
|
||||
# endif
|
||||
|
||||
# define BOOST_PP_ARRAY_DETAIL_GET_DATA(size, data) \
|
||||
BOOST_PP_IF \
|
||||
( \
|
||||
size, \
|
||||
BOOST_PP_ARRAY_DETAIL_GET_DATA_ANY, \
|
||||
BOOST_PP_ARRAY_DETAIL_GET_DATA_NONE \
|
||||
) \
|
||||
(size,data) \
|
||||
/**/
|
||||
#
|
||||
# endif /* BOOST_PREPROCESSOR_ARRAY_DETAIL_GET_DATA_HPP */
|
@ -1,6 +1,7 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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)
|
||||
@ -18,6 +19,7 @@
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/punctuation/comma_if.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
# include <boost/preprocessor/array/detail/get_data.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ARRAY_PUSH_BACK */
|
||||
#
|
||||
@ -28,6 +30,6 @@
|
||||
# define BOOST_PP_ARRAY_PUSH_BACK_D(array, elem) BOOST_PP_ARRAY_PUSH_BACK_I(BOOST_PP_ARRAY_SIZE(array), BOOST_PP_ARRAY_DATA(array), elem)
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_ARRAY_PUSH_BACK_I(size, data, elem) (BOOST_PP_INC(size), (BOOST_PP_TUPLE_REM(size) data BOOST_PP_COMMA_IF(size) elem))
|
||||
# define BOOST_PP_ARRAY_PUSH_BACK_I(size, data, elem) (BOOST_PP_INC(size), (BOOST_PP_ARRAY_DETAIL_GET_DATA(size,data) BOOST_PP_COMMA_IF(size) elem))
|
||||
#
|
||||
# endif
|
||||
|
@ -1,6 +1,7 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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)
|
||||
@ -18,6 +19,7 @@
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/punctuation/comma_if.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
# include <boost/preprocessor/array/detail/get_data.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ARRAY_PUSH_FRONT */
|
||||
#
|
||||
@ -28,6 +30,6 @@
|
||||
# define BOOST_PP_ARRAY_PUSH_FRONT_D(array, elem) BOOST_PP_ARRAY_PUSH_FRONT_I(BOOST_PP_ARRAY_SIZE(array), BOOST_PP_ARRAY_DATA(array), elem)
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_ARRAY_PUSH_FRONT_I(size, data, elem) (BOOST_PP_INC(size), (elem BOOST_PP_COMMA_IF(size) BOOST_PP_TUPLE_REM(size) data))
|
||||
# define BOOST_PP_ARRAY_PUSH_FRONT_I(size, data, elem) (BOOST_PP_INC(size), (elem BOOST_PP_COMMA_IF(size) BOOST_PP_ARRAY_DETAIL_GET_DATA(size,data)))
|
||||
#
|
||||
# endif
|
||||
|
@ -15,19 +15,33 @@
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/array/size.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
# include <boost/preprocessor/tuple/to_list.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ARRAY_TO_LIST */
|
||||
#
|
||||
# define BOOST_PP_ARRAY_TO_LIST(array) \
|
||||
BOOST_PP_IF \
|
||||
( \
|
||||
BOOST_PP_ARRAY_SIZE(array), \
|
||||
BOOST_PP_ARRAY_TO_LIST_DO, \
|
||||
BOOST_PP_ARRAY_TO_LIST_EMPTY \
|
||||
) \
|
||||
(array) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_ARRAY_TO_LIST_EMPTY(array) BOOST_PP_NIL
|
||||
#
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
# define BOOST_PP_ARRAY_TO_LIST(array) BOOST_PP_ARRAY_TO_LIST_I(BOOST_PP_TUPLE_TO_LIST, array)
|
||||
# define BOOST_PP_ARRAY_TO_LIST_DO(array) BOOST_PP_ARRAY_TO_LIST_I(BOOST_PP_TUPLE_TO_LIST, array)
|
||||
# define BOOST_PP_ARRAY_TO_LIST_I(m, args) BOOST_PP_ARRAY_TO_LIST_II(m, args)
|
||||
# define BOOST_PP_ARRAY_TO_LIST_II(m, args) BOOST_PP_CAT(m ## args,)
|
||||
# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
# define BOOST_PP_ARRAY_TO_LIST(array) BOOST_PP_ARRAY_TO_LIST_I(array)
|
||||
# define BOOST_PP_ARRAY_TO_LIST_DO(array) BOOST_PP_ARRAY_TO_LIST_I(array)
|
||||
# define BOOST_PP_ARRAY_TO_LIST_I(array) BOOST_PP_TUPLE_TO_LIST ## array
|
||||
# else
|
||||
# define BOOST_PP_ARRAY_TO_LIST(array) BOOST_PP_TUPLE_TO_LIST array
|
||||
# define BOOST_PP_ARRAY_TO_LIST_DO(array) BOOST_PP_TUPLE_TO_LIST array
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
|
@ -15,19 +15,32 @@
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/array/size.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
# include <boost/preprocessor/tuple/to_seq.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ARRAY_TO_SEQ */
|
||||
#
|
||||
# define BOOST_PP_ARRAY_TO_SEQ(array) \
|
||||
BOOST_PP_IF \
|
||||
( \
|
||||
BOOST_PP_ARRAY_SIZE(array), \
|
||||
BOOST_PP_ARRAY_TO_SEQ_DO, \
|
||||
BOOST_PP_ARRAY_TO_SEQ_EMPTY \
|
||||
) \
|
||||
(array) \
|
||||
/**/
|
||||
# define BOOST_PP_ARRAY_TO_SEQ_EMPTY(array)
|
||||
#
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
# define BOOST_PP_ARRAY_TO_SEQ(array) BOOST_PP_ARRAY_TO_SEQ_I(BOOST_PP_TUPLE_TO_SEQ, array)
|
||||
# define BOOST_PP_ARRAY_TO_SEQ_DO(array) BOOST_PP_ARRAY_TO_SEQ_I(BOOST_PP_TUPLE_TO_SEQ, array)
|
||||
# define BOOST_PP_ARRAY_TO_SEQ_I(m, args) BOOST_PP_ARRAY_TO_SEQ_II(m, args)
|
||||
# define BOOST_PP_ARRAY_TO_SEQ_II(m, args) BOOST_PP_CAT(m ## args,)
|
||||
# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
# define BOOST_PP_ARRAY_TO_SEQ(array) BOOST_PP_ARRAY_TO_SEQ_I(array)
|
||||
# define BOOST_PP_ARRAY_TO_SEQ_DO(array) BOOST_PP_ARRAY_TO_SEQ_I(array)
|
||||
# define BOOST_PP_ARRAY_TO_SEQ_I(array) BOOST_PP_TUPLE_TO_SEQ ## array
|
||||
# else
|
||||
# define BOOST_PP_ARRAY_TO_SEQ(array) BOOST_PP_TUPLE_TO_SEQ array
|
||||
# define BOOST_PP_ARRAY_TO_SEQ_DO(array) BOOST_PP_TUPLE_TO_SEQ array
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
|
@ -14,9 +14,20 @@
|
||||
# define BOOST_PREPROCESSOR_ARRAY_TO_TUPLE_HPP
|
||||
#
|
||||
# include <boost/preprocessor/array/data.hpp>
|
||||
# include <boost/preprocessor/array/size.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ARRAY_TO_TUPLE */
|
||||
#
|
||||
# define BOOST_PP_ARRAY_TO_TUPLE BOOST_PP_ARRAY_DATA
|
||||
# define BOOST_PP_ARRAY_TO_TUPLE(array) \
|
||||
BOOST_PP_IF \
|
||||
( \
|
||||
BOOST_PP_ARRAY_SIZE(array), \
|
||||
BOOST_PP_ARRAY_DATA, \
|
||||
BOOST_PP_ARRAY_TO_TUPLE_EMPTY \
|
||||
) \
|
||||
(array) \
|
||||
/**/
|
||||
# define BOOST_PP_ARRAY_TO_TUPLE_EMPTY(array)
|
||||
#
|
||||
# endif
|
||||
|
@ -25,7 +25,7 @@
|
||||
# define BOOST_PP_CAT_OO(par) BOOST_PP_CAT_I ## par
|
||||
# endif
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
# if (~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700)
|
||||
# define BOOST_PP_CAT_I(a, b) a ## b
|
||||
# else
|
||||
# define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b)
|
||||
|
@ -25,18 +25,20 @@
|
||||
# define BOOST_PP_CONFIG_DMC() 0x0040
|
||||
#
|
||||
# ifndef BOOST_PP_CONFIG_FLAGS
|
||||
# if defined(__GCCXML__)
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
|
||||
# elif defined(__WAVE__)
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
|
||||
# elif defined(__MWERKS__) && __MWERKS__ >= 0x3200
|
||||
# if defined(__GCCXML__) || defined(__WAVE__) || defined(__MWERKS__) && __MWERKS__ >= 0x3200
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
|
||||
# elif defined(__EDG__) || defined(__EDG_VERSION__)
|
||||
# if defined(_MSC_VER) && __EDG_VERSION__ >= 308
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC())
|
||||
# if defined(_MSC_VER) && !defined(__clang__) && (defined(__INTELLISENSE__) || __EDG_VERSION__ >= 308)
|
||||
# if !defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC())
|
||||
# else
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
|
||||
# endif
|
||||
# else
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_EDG() | BOOST_PP_CONFIG_STRICT())
|
||||
# endif
|
||||
# elif defined(_MSC_VER) && defined(__clang__)
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
|
||||
# elif defined(__MWERKS__)
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MWCC())
|
||||
# elif defined(__DMC__)
|
||||
@ -45,8 +47,12 @@
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
|
||||
# elif defined(__BORLANDC__) || defined(__IBMC__) || defined(__IBMCPP__) || defined(__SUNPRO_CC)
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_BCC())
|
||||
# elif defined(_MSC_VER) && !defined(__clang__)
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC())
|
||||
# elif defined(_MSC_VER)
|
||||
# if !defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC())
|
||||
# else
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
|
||||
# endif
|
||||
# else
|
||||
# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
|
||||
# endif
|
||||
@ -70,19 +76,23 @@
|
||||
#
|
||||
# /* BOOST_PP_VARIADICS */
|
||||
#
|
||||
# define BOOST_PP_VARIADICS_MSVC 0
|
||||
# if !defined BOOST_PP_VARIADICS
|
||||
# /* variadic support explicitly disabled for all untested compilers */
|
||||
# if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI
|
||||
|
||||
# if defined __GCCXML__ || (defined __NVCC__ && defined __CUDACC__) || defined __PATHSCALE__ || defined __DMC__ || (defined __CODEGEARC__ && !defined(__clang__)) || (defined __BORLANDC__ && !defined(__clang__)) || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5120 ) || (defined __HP_aCC && !defined __EDG__) || defined __MRC__ || defined __SC__ || (defined(__PGI) && !defined(__EDG__))
|
||||
# define BOOST_PP_VARIADICS 0
|
||||
# /* Clang, all versions */
|
||||
# elif defined __clang__
|
||||
# elif defined(_MSC_VER) && defined(__clang__)
|
||||
# define BOOST_PP_VARIADICS 1
|
||||
# /* VC++ (C/C++) */
|
||||
# elif defined _MSC_VER && _MSC_VER >= 1400 && !defined __EDG__
|
||||
# /* VC++ (C/C++) and Intel C++ Compiler >= 17.0 with MSVC */
|
||||
# elif defined _MSC_VER && _MSC_VER >= 1400 && (!defined __EDG__ || defined(__INTELLISENSE__) || defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700)
|
||||
# define BOOST_PP_VARIADICS 1
|
||||
# define BOOST_PP_VARIADICS_MSVC 1
|
||||
# if !defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL
|
||||
# undef BOOST_PP_VARIADICS_MSVC
|
||||
# define BOOST_PP_VARIADICS_MSVC 1
|
||||
# endif
|
||||
# /* Wave (C/C++), GCC (C++) */
|
||||
# elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__ && __GXX_EXPERIMENTAL_CXX0X__
|
||||
# elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__ && defined __GXX_EXPERIMENTAL_CXX0X__ && __GXX_EXPERIMENTAL_CXX0X__
|
||||
# define BOOST_PP_VARIADICS 1
|
||||
# /* EDG-based (C/C++), GCC (C), and unknown (C/C++) */
|
||||
# elif !defined __cplusplus && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L
|
||||
@ -93,7 +103,8 @@
|
||||
# elif !BOOST_PP_VARIADICS + 1 < 2
|
||||
# undef BOOST_PP_VARIADICS
|
||||
# define BOOST_PP_VARIADICS 1
|
||||
# if defined _MSC_VER && _MSC_VER >= 1400 && !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)
|
||||
# if defined _MSC_VER && _MSC_VER >= 1400 && !defined(__clang__) && (defined(__INTELLISENSE__) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700) || !(defined __EDG__ || defined __GCCXML__ || (defined __NVCC__ && defined __CUDACC__) || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)
|
||||
# undef BOOST_PP_VARIADICS_MSVC
|
||||
# define BOOST_PP_VARIADICS_MSVC 1
|
||||
# endif
|
||||
# else
|
||||
|
@ -14,10 +14,12 @@
|
||||
# define BOOST_PREPROCESSOR_FACILITIES_HPP
|
||||
#
|
||||
# include <boost/preprocessor/facilities/apply.hpp>
|
||||
# include <boost/preprocessor/facilities/check_empty.hpp>
|
||||
# include <boost/preprocessor/facilities/empty.hpp>
|
||||
# include <boost/preprocessor/facilities/expand.hpp>
|
||||
# include <boost/preprocessor/facilities/identity.hpp>
|
||||
# include <boost/preprocessor/facilities/intercept.hpp>
|
||||
# include <boost/preprocessor/facilities/overload.hpp>
|
||||
# include <boost/preprocessor/facilities/va_opt.hpp>
|
||||
#
|
||||
# endif
|
||||
|
19
include/boost/preprocessor/facilities/check_empty.hpp
Normal file
19
include/boost/preprocessor/facilities/check_empty.hpp
Normal file
@ -0,0 +1,19 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2019.
|
||||
# * 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_FACILITIES_CHECK_EMPTY_HPP
|
||||
# define BOOST_PREPROCESSOR_FACILITIES_CHECK_EMPTY_HPP
|
||||
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||
# include <boost/preprocessor/facilities/is_empty_variadic.hpp>
|
||||
# define BOOST_PP_CHECK_EMPTY(...) BOOST_PP_IS_EMPTY_OPT(__VA_ARGS__)
|
||||
# endif /* BOOST_PP_VARIADIC_HAS_OPT() */
|
||||
# endif /* BOOST_PREPROCESSOR_FACILITIES_CHECK_EMPTY_HPP */
|
55
include/boost/preprocessor/facilities/detail/is_empty.hpp
Normal file
55
include/boost/preprocessor/facilities/detail/is_empty.hpp
Normal file
@ -0,0 +1,55 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
#ifndef BOOST_PREPROCESSOR_DETAIL_IS_EMPTY_HPP
|
||||
#define BOOST_PREPROCESSOR_DETAIL_IS_EMPTY_HPP
|
||||
|
||||
#include <boost/preprocessor/punctuation/is_begin_parens.hpp>
|
||||
|
||||
#if BOOST_PP_VARIADICS_MSVC
|
||||
|
||||
# pragma warning(once:4002)
|
||||
|
||||
#define BOOST_PP_DETAIL_IS_EMPTY_IIF_0(t, b) b
|
||||
#define BOOST_PP_DETAIL_IS_EMPTY_IIF_1(t, b) t
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_PP_DETAIL_IS_EMPTY_IIF_0(t, ...) __VA_ARGS__
|
||||
#define BOOST_PP_DETAIL_IS_EMPTY_IIF_1(t, ...) t
|
||||
|
||||
#endif
|
||||
|
||||
#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400
|
||||
|
||||
#define BOOST_PP_DETAIL_IS_EMPTY_PROCESS(param) \
|
||||
BOOST_PP_IS_BEGIN_PARENS \
|
||||
( \
|
||||
BOOST_PP_DETAIL_IS_EMPTY_NON_FUNCTION_C param () \
|
||||
) \
|
||||
/**/
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_PP_DETAIL_IS_EMPTY_PROCESS(...) \
|
||||
BOOST_PP_IS_BEGIN_PARENS \
|
||||
( \
|
||||
BOOST_PP_DETAIL_IS_EMPTY_NON_FUNCTION_C __VA_ARGS__ () \
|
||||
) \
|
||||
/**/
|
||||
|
||||
#endif
|
||||
|
||||
#define BOOST_PP_DETAIL_IS_EMPTY_PRIMITIVE_CAT(a, b) a ## b
|
||||
#define BOOST_PP_DETAIL_IS_EMPTY_IIF(bit) BOOST_PP_DETAIL_IS_EMPTY_PRIMITIVE_CAT(BOOST_PP_DETAIL_IS_EMPTY_IIF_,bit)
|
||||
#define BOOST_PP_DETAIL_IS_EMPTY_NON_FUNCTION_C(...) ()
|
||||
|
||||
#endif /* BOOST_PREPROCESSOR_DETAIL_IS_EMPTY_HPP */
|
@ -14,6 +14,8 @@
|
||||
# ifndef BOOST_PREPROCESSOR_FACILITIES_EMPTY_HPP
|
||||
# define BOOST_PREPROCESSOR_FACILITIES_EMPTY_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# /* BOOST_PP_EMPTY */
|
||||
#
|
||||
# define BOOST_PP_EMPTY()
|
||||
|
@ -8,6 +8,7 @@
|
||||
# */
|
||||
#
|
||||
# /* Revised by Paul Mensonides (2002) */
|
||||
# /* Revised by Edward Diener (2015) */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
@ -15,9 +16,12 @@
|
||||
# define BOOST_PREPROCESSOR_FACILITIES_IDENTITY_HPP
|
||||
#
|
||||
# include <boost/preprocessor/facilities/empty.hpp>
|
||||
# include <boost/preprocessor/tuple/eat.hpp>
|
||||
#
|
||||
# /* BOOST_PP_IDENTITY */
|
||||
#
|
||||
# define BOOST_PP_IDENTITY(item) item BOOST_PP_EMPTY
|
||||
#
|
||||
# define BOOST_PP_IDENTITY_N(item,n) item BOOST_PP_TUPLE_EAT_N(n)
|
||||
#
|
||||
# endif
|
||||
|
@ -1,6 +1,7 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2003.
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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)
|
||||
@ -13,17 +14,27 @@
|
||||
# define BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
#
|
||||
# include <boost/preprocessor/facilities/is_empty_variadic.hpp>
|
||||
#
|
||||
# else
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/facilities/empty.hpp>
|
||||
# include <boost/preprocessor/facilities/identity.hpp>
|
||||
# else
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/detail/split.hpp>
|
||||
# endif
|
||||
#
|
||||
# /* BOOST_PP_IS_EMPTY */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
# define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I(x BOOST_PP_IS_EMPTY_HELPER)
|
||||
# define BOOST_PP_IS_EMPTY_I(contents) BOOST_PP_TUPLE_ELEM(2, 1, (BOOST_PP_IS_EMPTY_DEF_ ## contents()))
|
||||
# define BOOST_PP_IS_EMPTY_DEF_BOOST_PP_IS_EMPTY_HELPER 1, 1 BOOST_PP_EMPTY
|
||||
# define BOOST_PP_IS_EMPTY_DEF_BOOST_PP_IS_EMPTY_HELPER 1, BOOST_PP_IDENTITY(1)
|
||||
# define BOOST_PP_IS_EMPTY_HELPER() , 0
|
||||
# else
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
@ -40,4 +51,6 @@
|
||||
# define BOOST_PP_IS_EMPTY_DEF_BOOST_PP_IS_EMPTY_HELPER 0, BOOST_PP_NIL
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
# endif /* BOOST_PP_VARIADICS */
|
||||
#
|
||||
# endif /* BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP */
|
||||
|
@ -14,6 +14,7 @@
|
||||
#
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/facilities/empty.hpp>
|
||||
# include <boost/preprocessor/facilities/identity.hpp>
|
||||
# include <boost/preprocessor/facilities/is_1.hpp>
|
||||
# include <boost/preprocessor/facilities/is_empty.hpp>
|
||||
#
|
||||
@ -22,7 +23,7 @@
|
||||
# define BOOST_PP_IS_EMPTY_OR_1(x) \
|
||||
BOOST_PP_IIF( \
|
||||
BOOST_PP_IS_EMPTY(x BOOST_PP_EMPTY()), \
|
||||
1 BOOST_PP_EMPTY, \
|
||||
BOOST_PP_IDENTITY(1), \
|
||||
BOOST_PP_IS_1 \
|
||||
)(x) \
|
||||
/**/
|
||||
|
84
include/boost/preprocessor/facilities/is_empty_variadic.hpp
Normal file
84
include/boost/preprocessor/facilities/is_empty_variadic.hpp
Normal file
@ -0,0 +1,84 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014,2019.
|
||||
# * 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP
|
||||
# define BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
#
|
||||
# include <boost/preprocessor/punctuation/is_begin_parens.hpp>
|
||||
# include <boost/preprocessor/facilities/detail/is_empty.hpp>
|
||||
#
|
||||
#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400
|
||||
#
|
||||
#define BOOST_PP_IS_EMPTY(param) \
|
||||
BOOST_PP_DETAIL_IS_EMPTY_IIF \
|
||||
( \
|
||||
BOOST_PP_IS_BEGIN_PARENS \
|
||||
( \
|
||||
param \
|
||||
) \
|
||||
) \
|
||||
( \
|
||||
BOOST_PP_IS_EMPTY_ZERO, \
|
||||
BOOST_PP_DETAIL_IS_EMPTY_PROCESS \
|
||||
) \
|
||||
(param) \
|
||||
/**/
|
||||
#define BOOST_PP_IS_EMPTY_ZERO(param) 0
|
||||
# else
|
||||
# if defined(__cplusplus) && __cplusplus > 201703L
|
||||
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||
#define BOOST_PP_IS_EMPTY(...) \
|
||||
BOOST_PP_DETAIL_IS_EMPTY_IIF \
|
||||
( \
|
||||
BOOST_PP_VARIADIC_HAS_OPT() \
|
||||
) \
|
||||
( \
|
||||
BOOST_PP_IS_EMPTY_OPT, \
|
||||
BOOST_PP_IS_EMPTY_NO_OPT \
|
||||
) \
|
||||
(__VA_ARGS__) \
|
||||
/**/
|
||||
#define BOOST_PP_IS_EMPTY_FUNCTION2(...) \
|
||||
__VA_OPT__(0,) 1 \
|
||||
/**/
|
||||
#define BOOST_PP_IS_EMPTY_FUNCTION(...) \
|
||||
BOOST_PP_IS_EMPTY_FUNCTION2(__VA_ARGS__) \
|
||||
/**/
|
||||
#define BOOST_PP_IS_EMPTY_OPT(...) \
|
||||
BOOST_PP_VARIADIC_HAS_OPT_ELEM0(BOOST_PP_IS_EMPTY_FUNCTION(__VA_ARGS__),) \
|
||||
/**/
|
||||
# else
|
||||
#define BOOST_PP_IS_EMPTY(...) \
|
||||
BOOST_PP_IS_EMPTY_NO_OPT(__VA_ARGS__) \
|
||||
/**/
|
||||
# endif /* defined(__cplusplus) && __cplusplus > 201703L */
|
||||
#define BOOST_PP_IS_EMPTY_NO_OPT(...) \
|
||||
BOOST_PP_DETAIL_IS_EMPTY_IIF \
|
||||
( \
|
||||
BOOST_PP_IS_BEGIN_PARENS \
|
||||
( \
|
||||
__VA_ARGS__ \
|
||||
) \
|
||||
) \
|
||||
( \
|
||||
BOOST_PP_IS_EMPTY_ZERO, \
|
||||
BOOST_PP_DETAIL_IS_EMPTY_PROCESS \
|
||||
) \
|
||||
(__VA_ARGS__) \
|
||||
/**/
|
||||
#define BOOST_PP_IS_EMPTY_ZERO(...) 0
|
||||
# endif /* BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 */
|
||||
# endif /* BOOST_PP_VARIADICS */
|
||||
# endif /* BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP */
|
34
include/boost/preprocessor/facilities/va_opt.hpp
Normal file
34
include/boost/preprocessor/facilities/va_opt.hpp
Normal file
@ -0,0 +1,34 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2019.
|
||||
# * 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_FACILITIES_VA_OPT_HPP
|
||||
# define BOOST_PREPROCESSOR_FACILITIES_VA_OPT_HPP
|
||||
# include <boost/preprocessor/variadic/has_opt.hpp>
|
||||
# if BOOST_PP_VARIADIC_HAS_OPT()
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/facilities/check_empty.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
# define BOOST_PP_VA_OPT_IMPL(atuple) \
|
||||
BOOST_PP_TUPLE_REM() atuple \
|
||||
/**/
|
||||
# define BOOST_PP_VA_OPT(rdata,rempty,...) \
|
||||
BOOST_PP_VA_OPT_IMPL \
|
||||
( \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_CHECK_EMPTY(__VA_ARGS__), \
|
||||
rempty, \
|
||||
rdata \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
# endif /* BOOST_PP_VARIADIC_HAS_OPT() */
|
||||
# endif /* BOOST_PREPROCESSOR_FACILITIES_VA_OPT_HPP */
|
@ -32,5 +32,6 @@
|
||||
# include <boost/preprocessor/stringize.hpp>
|
||||
# include <boost/preprocessor/tuple.hpp>
|
||||
# include <boost/preprocessor/variadic.hpp>
|
||||
# include <boost/preprocessor/wstringize.hpp>
|
||||
#
|
||||
# endif
|
||||
|
@ -1,6 +1,7 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2011.
|
||||
# * (C) Copyright Paul Mensonides 2011.
|
||||
# * (C) Copyright Edward Diener 2011,2014.
|
||||
# * 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)
|
||||
@ -19,16 +20,33 @@
|
||||
# include <boost/preprocessor/list/adt.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC && (_MSC_VER <= 1400)
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# endif
|
||||
#
|
||||
# /* BOOST_PP_LIST_TO_ARRAY */
|
||||
#
|
||||
# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC && (_MSC_VER <= 1400)
|
||||
# define BOOST_PP_LIST_TO_ARRAY(list) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_LIST_IS_NIL(list), \
|
||||
BOOST_PP_LIST_TO_ARRAY_VC8ORLESS_EMPTY, \
|
||||
BOOST_PP_LIST_TO_ARRAY_VC8ORLESS_DO \
|
||||
) \
|
||||
(list) \
|
||||
/**/
|
||||
# define BOOST_PP_LIST_TO_ARRAY_VC8ORLESS_EMPTY(list) (0,())
|
||||
# define BOOST_PP_LIST_TO_ARRAY_VC8ORLESS_DO(list) BOOST_PP_LIST_TO_ARRAY_I(BOOST_PP_WHILE, list)
|
||||
# else
|
||||
# define BOOST_PP_LIST_TO_ARRAY(list) BOOST_PP_LIST_TO_ARRAY_I(BOOST_PP_WHILE, list)
|
||||
# endif
|
||||
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
# define BOOST_PP_LIST_TO_ARRAY_I(w, list) \
|
||||
BOOST_PP_LIST_TO_ARRAY_II(((BOOST_PP_TUPLE_REM_CTOR( \
|
||||
3, \
|
||||
w(BOOST_PP_LIST_TO_ARRAY_P, BOOST_PP_LIST_TO_ARRAY_O, (list, 1, (~))) \
|
||||
w(BOOST_PP_LIST_TO_ARRAY_P, BOOST_PP_LIST_TO_ARRAY_O, (list, 1, (~))) \
|
||||
)))) \
|
||||
/**/
|
||||
# define BOOST_PP_LIST_TO_ARRAY_II(p) BOOST_PP_LIST_TO_ARRAY_II_B(p)
|
||||
@ -38,7 +56,7 @@
|
||||
# define BOOST_PP_LIST_TO_ARRAY_I(w, list) \
|
||||
BOOST_PP_LIST_TO_ARRAY_II(BOOST_PP_TUPLE_REM_CTOR( \
|
||||
3, \
|
||||
w(BOOST_PP_LIST_TO_ARRAY_P, BOOST_PP_LIST_TO_ARRAY_O, (list, 1, (~))) \
|
||||
w(BOOST_PP_LIST_TO_ARRAY_P, BOOST_PP_LIST_TO_ARRAY_O, (list, 1, (~))) \
|
||||
)) \
|
||||
/**/
|
||||
# define BOOST_PP_LIST_TO_ARRAY_II(im) BOOST_PP_LIST_TO_ARRAY_III(im)
|
||||
@ -118,6 +136,20 @@
|
||||
#
|
||||
# /* BOOST_PP_LIST_TO_ARRAY_D */
|
||||
#
|
||||
# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC && (_MSC_VER <= 1400)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_D(d, list) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_LIST_IS_NIL(list), \
|
||||
BOOST_PP_LIST_TO_ARRAY_D_VC8ORLESS_EMPTY, \
|
||||
BOOST_PP_LIST_TO_ARRAY_D_VC8ORLESS_DO \
|
||||
) \
|
||||
(d, list) \
|
||||
/**/
|
||||
# define BOOST_PP_LIST_TO_ARRAY_D_VC8ORLESS_EMPTY(d, list) (0,())
|
||||
# define BOOST_PP_LIST_TO_ARRAY_D_VC8ORLESS_DO(d, list) BOOST_PP_LIST_TO_ARRAY_I(BOOST_PP_WHILE_ ## d, list)
|
||||
# else
|
||||
# define BOOST_PP_LIST_TO_ARRAY_D(d, list) BOOST_PP_LIST_TO_ARRAY_I(BOOST_PP_WHILE_ ## d, list)
|
||||
# endif
|
||||
#
|
||||
# endif /* BOOST_PREPROCESSOR_LIST_TO_ARRAY_HPP */
|
||||
|
@ -16,22 +16,45 @@
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/list/enum.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
#
|
||||
# /* BOOST_PP_LIST_TO_TUPLE */
|
||||
#
|
||||
# define BOOST_PP_LIST_TO_TUPLE(list) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_LIST_IS_NIL(list), \
|
||||
BOOST_PP_LIST_TO_TUPLE_EMPTY, \
|
||||
BOOST_PP_LIST_TO_TUPLE_DO \
|
||||
) \
|
||||
(list) \
|
||||
/**/
|
||||
# define BOOST_PP_LIST_TO_TUPLE_EMPTY(list)
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_LIST_TO_TUPLE(list) (BOOST_PP_LIST_ENUM(list))
|
||||
# define BOOST_PP_LIST_TO_TUPLE_DO(list) (BOOST_PP_LIST_ENUM(list))
|
||||
# else
|
||||
# define BOOST_PP_LIST_TO_TUPLE(list) BOOST_PP_LIST_TO_TUPLE_I(list)
|
||||
# define BOOST_PP_LIST_TO_TUPLE_DO(list) BOOST_PP_LIST_TO_TUPLE_I(list)
|
||||
# define BOOST_PP_LIST_TO_TUPLE_I(list) (BOOST_PP_LIST_ENUM(list))
|
||||
# endif
|
||||
#
|
||||
# /* BOOST_PP_LIST_TO_TUPLE_R */
|
||||
#
|
||||
# define BOOST_PP_LIST_TO_TUPLE_R(r, list) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_LIST_IS_NIL(list), \
|
||||
BOOST_PP_LIST_TO_TUPLE_R_EMPTY, \
|
||||
BOOST_PP_LIST_TO_TUPLE_R_DO \
|
||||
) \
|
||||
(r, list) \
|
||||
/**/
|
||||
# define BOOST_PP_LIST_TO_TUPLE_R_EMPTY(r,list)
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_LIST_TO_TUPLE_R(r, list) (BOOST_PP_LIST_ENUM_R(r, list))
|
||||
# define BOOST_PP_LIST_TO_TUPLE_R_DO(r, list) (BOOST_PP_LIST_ENUM_R(r, list))
|
||||
# else
|
||||
# define BOOST_PP_LIST_TO_TUPLE_R(r, list) BOOST_PP_LIST_TO_TUPLE_R_I(r, list)
|
||||
# define BOOST_PP_LIST_TO_TUPLE_R_DO(r, list) BOOST_PP_LIST_TO_TUPLE_R_I(r, list)
|
||||
# define BOOST_PP_LIST_TO_TUPLE_R_I(r, list) (BOOST_PP_LIST_ENUM_R(r, list))
|
||||
# endif
|
||||
#
|
||||
|
@ -14,7 +14,9 @@
|
||||
#
|
||||
# include <boost/preprocessor/punctuation/comma.hpp>
|
||||
# include <boost/preprocessor/punctuation/comma_if.hpp>
|
||||
# include <boost/preprocessor/punctuation/is_begin_parens.hpp>
|
||||
# include <boost/preprocessor/punctuation/paren.hpp>
|
||||
# include <boost/preprocessor/punctuation/paren_if.hpp>
|
||||
# include <boost/preprocessor/punctuation/remove_parens.hpp>
|
||||
#
|
||||
# endif
|
||||
|
@ -0,0 +1,48 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
#ifndef BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP
|
||||
#define BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP
|
||||
|
||||
#if BOOST_PP_VARIADICS_MSVC
|
||||
|
||||
#include <boost/preprocessor/facilities/empty.hpp>
|
||||
|
||||
#define BOOST_PP_DETAIL_VD_IBP_CAT(a, b) BOOST_PP_DETAIL_VD_IBP_CAT_I(a, b)
|
||||
#define BOOST_PP_DETAIL_VD_IBP_CAT_I(a, b) BOOST_PP_DETAIL_VD_IBP_CAT_II(a ## b)
|
||||
#define BOOST_PP_DETAIL_VD_IBP_CAT_II(res) res
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_SPLIT(i, ...) \
|
||||
BOOST_PP_DETAIL_VD_IBP_CAT(BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(BOOST_PP_DETAIL_IBP_SPLIT_,i)(__VA_ARGS__),BOOST_PP_EMPTY()) \
|
||||
/**/
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_C(...) 1 1
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_SPLIT(i, ...) \
|
||||
BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(BOOST_PP_DETAIL_IBP_SPLIT_,i)(__VA_ARGS__) \
|
||||
/**/
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_C(...) 1
|
||||
|
||||
#endif /* BOOST_PP_VARIADICS_MSVC */
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_SPLIT_0(a, ...) a
|
||||
#define BOOST_PP_DETAIL_IBP_SPLIT_1(a, ...) __VA_ARGS__
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_CAT(a, ...) BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(a,__VA_ARGS__)
|
||||
#define BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(a, ...) a ## __VA_ARGS__
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_1 1,
|
||||
#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_BOOST_PP_DETAIL_IBP_IS_VARIADIC_C 0,
|
||||
|
||||
#endif /* BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP */
|
51
include/boost/preprocessor/punctuation/is_begin_parens.hpp
Normal file
51
include/boost/preprocessor/punctuation/is_begin_parens.hpp
Normal file
@ -0,0 +1,51 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP
|
||||
# define BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP
|
||||
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
#include <boost/preprocessor/punctuation/detail/is_begin_parens.hpp>
|
||||
|
||||
#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400
|
||||
|
||||
#define BOOST_PP_IS_BEGIN_PARENS(param) \
|
||||
BOOST_PP_DETAIL_IBP_SPLIT \
|
||||
( \
|
||||
0, \
|
||||
BOOST_PP_DETAIL_IBP_CAT \
|
||||
( \
|
||||
BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_, \
|
||||
BOOST_PP_DETAIL_IBP_IS_VARIADIC_C param \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_PP_IS_BEGIN_PARENS(...) \
|
||||
BOOST_PP_DETAIL_IBP_SPLIT \
|
||||
( \
|
||||
0, \
|
||||
BOOST_PP_DETAIL_IBP_CAT \
|
||||
( \
|
||||
BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_, \
|
||||
BOOST_PP_DETAIL_IBP_IS_VARIADIC_C __VA_ARGS__ \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
|
||||
#endif /* BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 */
|
||||
#endif /* BOOST_PP_VARIADICS */
|
||||
#endif /* BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP */
|
39
include/boost/preprocessor/punctuation/remove_parens.hpp
Normal file
39
include/boost/preprocessor/punctuation/remove_parens.hpp
Normal file
@ -0,0 +1,39 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
#ifndef BOOST_PREPROCESSOR_REMOVE_PARENS_HPP
|
||||
#define BOOST_PREPROCESSOR_REMOVE_PARENS_HPP
|
||||
|
||||
#include <boost/preprocessor/config/config.hpp>
|
||||
|
||||
#if BOOST_PP_VARIADICS
|
||||
|
||||
#include <boost/preprocessor/control/iif.hpp>
|
||||
#include <boost/preprocessor/facilities/identity.hpp>
|
||||
#include <boost/preprocessor/punctuation/is_begin_parens.hpp>
|
||||
#include <boost/preprocessor/tuple/enum.hpp>
|
||||
|
||||
#define BOOST_PP_REMOVE_PARENS(param) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_IS_BEGIN_PARENS(param), \
|
||||
BOOST_PP_REMOVE_PARENS_DO, \
|
||||
BOOST_PP_IDENTITY \
|
||||
) \
|
||||
(param)() \
|
||||
/**/
|
||||
|
||||
#define BOOST_PP_REMOVE_PARENS_DO(param) \
|
||||
BOOST_PP_IDENTITY(BOOST_PP_TUPLE_ENUM(param)) \
|
||||
/**/
|
||||
|
||||
#endif /* BOOST_PP_VARIADICS */
|
||||
#endif /* BOOST_PREPROCESSOR_REMOVE_PARENS_HPP */
|
@ -16,6 +16,8 @@
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/debug/error.hpp>
|
||||
# include <boost/preprocessor/facilities/empty.hpp>
|
||||
# include <boost/preprocessor/logical/bool.hpp>
|
||||
# include <boost/preprocessor/detail/auto_rec.hpp>
|
||||
#
|
||||
# /* BOOST_PP_FOR */
|
||||
@ -42,7 +44,23 @@
|
||||
# include <boost/preprocessor/repetition/detail/for.hpp>
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_FOR_257(s, p, o, m) BOOST_PP_ERROR(0x0002)
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC()
|
||||
# define BOOST_PP_FOR_257_PR(s, p) BOOST_PP_BOOL(p##(257, s))
|
||||
# else
|
||||
# define BOOST_PP_FOR_257_PR(s, p) BOOST_PP_BOOL(p(257, s))
|
||||
# endif
|
||||
|
||||
# define BOOST_PP_FOR_257_ERROR() BOOST_PP_ERROR(0x0002)
|
||||
# define BOOST_PP_FOR_257(s, p, o, m) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_FOR_257_PR(s,p), \
|
||||
BOOST_PP_FOR_257_ERROR, \
|
||||
BOOST_PP_EMPTY \
|
||||
) \
|
||||
() \
|
||||
/**/
|
||||
// # define BOOST_PP_FOR_257(s, p, o, m) BOOST_PP_ERROR(0x0002)
|
||||
#
|
||||
# define BOOST_PP_FOR_CHECK_BOOST_PP_NIL 1
|
||||
#
|
||||
|
@ -16,6 +16,7 @@
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/tuple/eat.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
# include <boost/preprocessor/variadic/detail/is_single_return.hpp>
|
||||
#
|
||||
# /* BOOST_PP_SEQ_BINARY_TRANSFORM */
|
||||
#
|
||||
@ -28,8 +29,14 @@
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM(seq) BOOST_PP_CAT(BOOST_PP_SEQ_BINARY_TRANSFORM_A seq, 0)
|
||||
# endif
|
||||
# if BOOST_PP_VARIADICS
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM_A(...) (BOOST_PP_REM, __VA_ARGS__)() BOOST_PP_SEQ_BINARY_TRANSFORM_B
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM_B(...) (BOOST_PP_REM, __VA_ARGS__)() BOOST_PP_SEQ_BINARY_TRANSFORM_A
|
||||
# if BOOST_PP_VARIADICS_MSVC
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM_REM(data) data
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM_A(...) (BOOST_PP_SEQ_BINARY_TRANSFORM_REM, __VA_ARGS__)() BOOST_PP_SEQ_BINARY_TRANSFORM_B
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM_B(...) (BOOST_PP_SEQ_BINARY_TRANSFORM_REM, __VA_ARGS__)() BOOST_PP_SEQ_BINARY_TRANSFORM_A
|
||||
# else
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM_A(...) (BOOST_PP_REM, __VA_ARGS__)() BOOST_PP_SEQ_BINARY_TRANSFORM_B
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM_B(...) (BOOST_PP_REM, __VA_ARGS__)() BOOST_PP_SEQ_BINARY_TRANSFORM_A
|
||||
# endif
|
||||
# else
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM_A(e) (BOOST_PP_REM, e)() BOOST_PP_SEQ_BINARY_TRANSFORM_B
|
||||
# define BOOST_PP_SEQ_BINARY_TRANSFORM_B(e) (BOOST_PP_REM, e)() BOOST_PP_SEQ_BINARY_TRANSFORM_A
|
||||
|
49
include/boost/preprocessor/seq/detail/is_empty.hpp
Normal file
49
include/boost/preprocessor/seq/detail/is_empty.hpp
Normal file
@ -0,0 +1,49 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2015.
|
||||
# * 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)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_SEQ_DETAIL_IS_EMPTY_HPP
|
||||
# define BOOST_PREPROCESSOR_SEQ_DETAIL_IS_EMPTY_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||
# include <boost/preprocessor/logical/bool.hpp>
|
||||
# include <boost/preprocessor/logical/compl.hpp>
|
||||
# include <boost/preprocessor/seq/size.hpp>
|
||||
#
|
||||
/* An empty seq is one that is just BOOST_PP_SEQ_NIL */
|
||||
#
|
||||
# define BOOST_PP_SEQ_DETAIL_IS_EMPTY(seq) \
|
||||
BOOST_PP_COMPL \
|
||||
( \
|
||||
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq) \
|
||||
) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_SEQ_DETAIL_IS_EMPTY_SIZE(size) \
|
||||
BOOST_PP_COMPL \
|
||||
( \
|
||||
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size) \
|
||||
) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq) \
|
||||
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq)) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size) \
|
||||
BOOST_PP_BOOL(size) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq) \
|
||||
BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq (nil))) \
|
||||
/**/
|
||||
#
|
||||
# endif
|
55
include/boost/preprocessor/seq/detail/to_list_msvc.hpp
Normal file
55
include/boost/preprocessor/seq/detail/to_list_msvc.hpp
Normal file
@ -0,0 +1,55 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2016. *
|
||||
# * 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) *
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_SEQ_DETAIL_TO_LIST_MSVC_HPP
|
||||
# define BOOST_PREPROCESSOR_SEQ_DETAIL_TO_LIST_MSVC_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||
# include <boost/preprocessor/control/while.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
#
|
||||
# define BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_STATE_RESULT(state) \
|
||||
BOOST_PP_TUPLE_ELEM(2, 0, state) \
|
||||
/**/
|
||||
# define BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_STATE_SIZE(state) \
|
||||
BOOST_PP_TUPLE_ELEM(2, 1, state) \
|
||||
/**/
|
||||
# define BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_PRED(d,state) \
|
||||
BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_STATE_SIZE(state) \
|
||||
/**/
|
||||
# define BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_OP(d,state) \
|
||||
( \
|
||||
BOOST_PP_CAT(BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_STATE_RESULT(state),), \
|
||||
BOOST_PP_DEC(BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_STATE_SIZE(state)) \
|
||||
) \
|
||||
/**/
|
||||
#
|
||||
# /* BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC */
|
||||
#
|
||||
# define BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC(result,seqsize) \
|
||||
BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_STATE_RESULT \
|
||||
( \
|
||||
BOOST_PP_WHILE \
|
||||
( \
|
||||
BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_PRED, \
|
||||
BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC_OP, \
|
||||
(result,seqsize) \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
# endif // BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
#
|
||||
# endif // BOOST_PREPROCESSOR_SEQ_DETAIL_TO_LIST_MSVC_HPP
|
@ -14,47 +14,94 @@
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/repetition/for.hpp>
|
||||
# include <boost/preprocessor/seq/seq.hpp>
|
||||
# include <boost/preprocessor/seq/size.hpp>
|
||||
# include <boost/preprocessor/seq/detail/is_empty.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
#
|
||||
# /* BOOST_PP_SEQ_FOR_EACH */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)
|
||||
# define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK(macro, data, seq)
|
||||
# else
|
||||
# define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK(macro, data, seq)
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_SEQ_FOR_EACH_P(r, x) BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(3, 2, x)))
|
||||
# define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EXEC(macro, data, seq) BOOST_PP_FOR((macro, data, seq, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EMPTY(macro, data, seq)
|
||||
#
|
||||
# define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK(macro, data, seq) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \
|
||||
BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EXEC, \
|
||||
BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EMPTY \
|
||||
) \
|
||||
(macro, data, seq) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_SEQ_FOR_EACH_P(r, x) BOOST_PP_TUPLE_ELEM(4, 3, x)
|
||||
#
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
|
||||
# define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I x
|
||||
# else
|
||||
# define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I(BOOST_PP_TUPLE_ELEM(3, 0, x), BOOST_PP_TUPLE_ELEM(3, 1, x), BOOST_PP_TUPLE_ELEM(3, 2, x))
|
||||
# define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I(BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x))
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_SEQ_FOR_EACH_O_I(macro, data, seq) (macro, data, BOOST_PP_SEQ_TAIL(seq))
|
||||
# define BOOST_PP_SEQ_FOR_EACH_O_I(macro, data, seq, sz) \
|
||||
BOOST_PP_SEQ_FOR_EACH_O_I_DEC(macro, data, seq, BOOST_PP_DEC(sz)) \
|
||||
/**/
|
||||
# define BOOST_PP_SEQ_FOR_EACH_O_I_DEC(macro, data, seq, sz) \
|
||||
( \
|
||||
macro, \
|
||||
data, \
|
||||
BOOST_PP_IF \
|
||||
( \
|
||||
sz, \
|
||||
BOOST_PP_SEQ_FOR_EACH_O_I_TAIL, \
|
||||
BOOST_PP_SEQ_FOR_EACH_O_I_NIL \
|
||||
) \
|
||||
(seq), \
|
||||
sz \
|
||||
) \
|
||||
/**/
|
||||
# define BOOST_PP_SEQ_FOR_EACH_O_I_TAIL(seq) BOOST_PP_SEQ_TAIL(seq)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_O_I_NIL(seq) BOOST_PP_NIL
|
||||
#
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
|
||||
# define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_IM(r, BOOST_PP_TUPLE_REM_3 x)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_IM(r, BOOST_PP_TUPLE_REM_4 x)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_M_I(r, im)
|
||||
# else
|
||||
# define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_I(r, BOOST_PP_TUPLE_ELEM(3, 0, x), BOOST_PP_TUPLE_ELEM(3, 1, x), BOOST_PP_TUPLE_ELEM(3, 2, x))
|
||||
# define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_I(r, BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x))
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_SEQ_FOR_EACH_M_I(r, macro, data, seq) macro(r, data, BOOST_PP_SEQ_HEAD(seq))
|
||||
# define BOOST_PP_SEQ_FOR_EACH_M_I(r, macro, data, seq, sz) macro(r, data, BOOST_PP_SEQ_HEAD(seq))
|
||||
#
|
||||
# /* BOOST_PP_SEQ_FOR_EACH_R */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_R(r, macro, data, seq)
|
||||
# else
|
||||
# define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_R(r, macro, data, seq)
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EXEC_R(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EMPTY_R(r, macro, data, seq)
|
||||
#
|
||||
# define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_R(r, macro, data, seq) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \
|
||||
BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EXEC_R, \
|
||||
BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EMPTY_R \
|
||||
) \
|
||||
(r, macro, data, seq) \
|
||||
/**/
|
||||
#
|
||||
# endif
|
||||
|
@ -15,47 +15,95 @@
|
||||
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||
# include <boost/preprocessor/arithmetic/inc.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/repetition/for.hpp>
|
||||
# include <boost/preprocessor/seq/seq.hpp>
|
||||
# include <boost/preprocessor/seq/size.hpp>
|
||||
# include <boost/preprocessor/seq/detail/is_empty.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
#
|
||||
# /* BOOST_PP_SEQ_FOR_EACH_I */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq)
|
||||
# else
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq)
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_P(r, x) BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(4, 2, x)))
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EXEC(macro, data, seq) BOOST_PP_FOR((macro, data, seq, 0, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EMPTY(macro, data, seq)
|
||||
#
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \
|
||||
BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EXEC, \
|
||||
BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EMPTY \
|
||||
) \
|
||||
(macro, data, seq) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_P(r, x) BOOST_PP_TUPLE_ELEM(5, 4, x)
|
||||
#
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I x
|
||||
# else
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I(BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x))
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I(BOOST_PP_TUPLE_ELEM(5, 0, x), BOOST_PP_TUPLE_ELEM(5, 1, x), BOOST_PP_TUPLE_ELEM(5, 2, x), BOOST_PP_TUPLE_ELEM(5, 3, x), BOOST_PP_TUPLE_ELEM(5, 4, x))
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_O_I(macro, data, seq, i) (macro, data, BOOST_PP_SEQ_TAIL(seq), BOOST_PP_INC(i))
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_O_I(macro, data, seq, i, sz) \
|
||||
BOOST_PP_SEQ_FOR_EACH_I_O_I_DEC(macro, data, seq, i, BOOST_PP_DEC(sz)) \
|
||||
/**/
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_O_I_DEC(macro, data, seq, i, sz) \
|
||||
( \
|
||||
macro, \
|
||||
data, \
|
||||
BOOST_PP_IF \
|
||||
( \
|
||||
sz, \
|
||||
BOOST_PP_SEQ_FOR_EACH_I_O_I_TAIL, \
|
||||
BOOST_PP_SEQ_FOR_EACH_I_O_I_NIL \
|
||||
) \
|
||||
(seq), \
|
||||
BOOST_PP_INC(i), \
|
||||
sz \
|
||||
) \
|
||||
/**/
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_O_I_TAIL(seq) BOOST_PP_SEQ_TAIL(seq)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_O_I_NIL(seq) BOOST_PP_NIL
|
||||
#
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, BOOST_PP_TUPLE_REM_4 x)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, BOOST_PP_TUPLE_REM_5 x)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, im)
|
||||
# else
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x))
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, BOOST_PP_TUPLE_ELEM(5, 0, x), BOOST_PP_TUPLE_ELEM(5, 1, x), BOOST_PP_TUPLE_ELEM(5, 2, x), BOOST_PP_TUPLE_ELEM(5, 3, x), BOOST_PP_TUPLE_ELEM(5, 4, x))
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq))
|
||||
#
|
||||
# /* BOOST_PP_SEQ_FOR_EACH_I_R */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq)
|
||||
# else
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq)
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EXEC(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq, 0, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M)
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EMPTY(r, macro, data, seq)
|
||||
#
|
||||
# define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \
|
||||
BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EXEC, \
|
||||
BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EMPTY \
|
||||
) \
|
||||
(r, macro, data, seq) \
|
||||
/**/
|
||||
#
|
||||
# endif
|
||||
|
@ -12,18 +12,34 @@
|
||||
# ifndef BOOST_PREPROCESSOR_SEQ_REPLACE_HPP
|
||||
# define BOOST_PREPROCESSOR_SEQ_REPLACE_HPP
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||
# include <boost/preprocessor/arithmetic/inc.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/comparison/equal.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/seq/first_n.hpp>
|
||||
# include <boost/preprocessor/seq/rest_n.hpp>
|
||||
# include <boost/preprocessor/seq/size.hpp>
|
||||
#
|
||||
# /* BOOST_PP_SEQ_REPLACE */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_SEQ_REPLACE(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq)
|
||||
# define BOOST_PP_SEQ_REPLACE(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REPLACE_DETAIL_REST(seq, i)
|
||||
# else
|
||||
# define BOOST_PP_SEQ_REPLACE(seq, i, elem) BOOST_PP_SEQ_REPLACE_I(seq, i, elem)
|
||||
# define BOOST_PP_SEQ_REPLACE_I(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq)
|
||||
# define BOOST_PP_SEQ_REPLACE_I(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REPLACE_DETAIL_REST(seq, i)
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_SEQ_REPLACE_DETAIL_REST_EMPTY(seq, i)
|
||||
# define BOOST_PP_SEQ_REPLACE_DETAIL_REST_VALID(seq, i) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq)
|
||||
# define BOOST_PP_SEQ_REPLACE_DETAIL_REST(seq, i) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_EQUAL(i,BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq))), \
|
||||
BOOST_PP_SEQ_REPLACE_DETAIL_REST_EMPTY, \
|
||||
BOOST_PP_SEQ_REPLACE_DETAIL_REST_VALID \
|
||||
) \
|
||||
(seq, i) \
|
||||
/**/
|
||||
#
|
||||
# endif
|
||||
|
@ -13,18 +13,34 @@
|
||||
# define BOOST_PREPROCESSOR_SEQ_REST_N_HPP
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/inc.hpp>
|
||||
# include <boost/preprocessor/comparison/not_equal.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/facilities/empty.hpp>
|
||||
# include <boost/preprocessor/control/expr_iif.hpp>
|
||||
# include <boost/preprocessor/facilities/identity.hpp>
|
||||
# include <boost/preprocessor/logical/bitand.hpp>
|
||||
# include <boost/preprocessor/seq/detail/is_empty.hpp>
|
||||
# include <boost/preprocessor/seq/detail/split.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
#
|
||||
# /* BOOST_PP_SEQ_REST_N */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), (nil) seq BOOST_PP_EMPTY))()
|
||||
# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq))
|
||||
# else
|
||||
# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_I(n, seq)
|
||||
# define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), (nil) seq BOOST_PP_EMPTY))()
|
||||
# define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq))
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, size) \
|
||||
BOOST_PP_EXPR_IIF \
|
||||
( \
|
||||
BOOST_PP_BITAND \
|
||||
( \
|
||||
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size), \
|
||||
BOOST_PP_NOT_EQUAL(n,size) \
|
||||
), \
|
||||
BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), BOOST_PP_IDENTITY( (nil) seq )))() \
|
||||
) \
|
||||
/**/
|
||||
#
|
||||
# endif
|
||||
|
@ -543,5 +543,6 @@
|
||||
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_254 254
|
||||
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_255 255
|
||||
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_256 256
|
||||
# define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_257 257
|
||||
#
|
||||
# endif
|
||||
|
@ -19,7 +19,19 @@
|
||||
#
|
||||
# /* BOOST_PP_SEQ_TO_LIST */
|
||||
#
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
# include <boost/preprocessor/seq/size.hpp>
|
||||
# include <boost/preprocessor/seq/detail/to_list_msvc.hpp>
|
||||
# define BOOST_PP_SEQ_TO_LIST(seq) \
|
||||
BOOST_PP_SEQ_DETAIL_TO_LIST_MSVC \
|
||||
( \
|
||||
BOOST_PP_SEQ_TO_LIST_I(BOOST_PP_SEQ_BINARY_TRANSFORM(seq)), \
|
||||
BOOST_PP_SEQ_SIZE(seq) \
|
||||
) \
|
||||
/**/
|
||||
# else
|
||||
# define BOOST_PP_SEQ_TO_LIST(seq) BOOST_PP_SEQ_TO_LIST_I(BOOST_PP_SEQ_BINARY_TRANSFORM(seq))
|
||||
# endif
|
||||
# define BOOST_PP_SEQ_TO_LIST_I(bseq) BOOST_PP_SEQ_TO_LIST_A bseq BOOST_PP_NIL BOOST_PP_SEQ_TO_LIST_B bseq
|
||||
# define BOOST_PP_SEQ_TO_LIST_A(m, e) m(BOOST_PP_LPAREN() e BOOST_PP_COMMA() BOOST_PP_SEQ_TO_LIST_A_ID)
|
||||
# define BOOST_PP_SEQ_TO_LIST_A_ID() BOOST_PP_SEQ_TO_LIST_A
|
||||
|
@ -28,6 +28,10 @@
|
||||
# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_I(text)
|
||||
# endif
|
||||
#
|
||||
#if BOOST_PP_VARIADICS
|
||||
# define BOOST_PP_STRINGIZE_I(...) #__VA_ARGS__
|
||||
#else
|
||||
# define BOOST_PP_STRINGIZE_I(text) #text
|
||||
#endif
|
||||
#
|
||||
# endif
|
||||
|
28
include/boost/preprocessor/tuple/detail/is_single_return.hpp
Normal file
28
include/boost/preprocessor/tuple/detail/is_single_return.hpp
Normal file
@ -0,0 +1,28 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014. *
|
||||
# * 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) *
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP
|
||||
# define BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_IS_SINGLE_RETURN */
|
||||
#
|
||||
# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# include <boost/preprocessor/facilities/is_1.hpp>
|
||||
# include <boost/preprocessor/tuple/size.hpp>
|
||||
# define BOOST_PP_TUPLE_IS_SINGLE_RETURN(sr,nsr,tuple) \
|
||||
BOOST_PP_IIF(BOOST_PP_IS_1(BOOST_PP_TUPLE_SIZE(tuple)),sr,nsr) \
|
||||
/**/
|
||||
# endif /* BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC */
|
||||
#
|
||||
# endif /* BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP */
|
@ -8,7 +8,7 @@
|
||||
# */
|
||||
#
|
||||
# /* Revised by Paul Mensonides (2002-2011) */
|
||||
# /* Revised by Edward Diener (2011) */
|
||||
# /* Revised by Edward Diener (2011,2015) */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
@ -38,6 +38,15 @@
|
||||
# endif
|
||||
# define BOOST_PP_TUPLE_EAT_I(size) BOOST_PP_TUPLE_EAT_ ## size
|
||||
# endif
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
# define BOOST_PP_TUPLE_EAT_N(size) BOOST_PP_TUPLE_EAT_N_I(size)
|
||||
# else
|
||||
# define BOOST_PP_TUPLE_EAT_N(size) BOOST_PP_TUPLE_EAT_N_OO((size))
|
||||
# define BOOST_PP_TUPLE_EAT_N_OO(par) BOOST_PP_TUPLE_EAT_N_I ## par
|
||||
# endif
|
||||
# define BOOST_PP_TUPLE_EAT_N_I(size) BOOST_PP_TUPLE_EAT_ ## size
|
||||
#
|
||||
# define BOOST_PP_TUPLE_EAT_1(e0)
|
||||
# define BOOST_PP_TUPLE_EAT_2(e0, e1)
|
||||
# define BOOST_PP_TUPLE_EAT_3(e0, e1, e2)
|
||||
|
@ -8,7 +8,7 @@
|
||||
# */
|
||||
#
|
||||
# /* Revised by Paul Mensonides (2002-2011) */
|
||||
# /* Revised by Edward Diener (2011) */
|
||||
# /* Revised by Edward Diener (2011,2014) */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
@ -17,19 +17,29 @@
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/facilities/expand.hpp>
|
||||
# include <boost/preprocessor/facilities/overload.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
# include <boost/preprocessor/variadic/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/detail/is_single_return.hpp>
|
||||
#
|
||||
# if BOOST_PP_VARIADICS
|
||||
# if BOOST_PP_VARIADICS_MSVC
|
||||
# define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__), (__VA_ARGS__))
|
||||
# define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args)
|
||||
# define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,)
|
||||
/*
|
||||
Use BOOST_PP_REM_CAT if it is a single element tuple ( which might be empty )
|
||||
else use BOOST_PP_REM. This fixes a VC++ problem with an empty tuple and BOOST_PP_TUPLE_ELEM
|
||||
functionality. See tuple_elem_bug_test.cxx.
|
||||
*/
|
||||
# define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) \
|
||||
BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_EXPAND(BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple)) \
|
||||
/**/
|
||||
# else
|
||||
# define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__)(__VA_ARGS__)
|
||||
# define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_REM tuple)
|
||||
# endif
|
||||
# define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_REM tuple)
|
||||
# define BOOST_PP_TUPLE_ELEM_O_3(size, n, tuple) BOOST_PP_TUPLE_ELEM_O_2(n, tuple)
|
||||
# else
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
|
@ -23,13 +23,13 @@
|
||||
# /* BOOST_PP_TUPLE_INSERT */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_INSERT(tuple, i, elem) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_INSERT(BOOST_PP_TUPLE_TO_ARRAY(tuple), i, elem)) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_INSERT(BOOST_PP_TUPLE_TO_ARRAY(tuple), i, elem)) \
|
||||
/**/
|
||||
#
|
||||
# /* BOOST_PP_TUPLE_INSERT_D */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_INSERT_D(d, tuple, i, elem) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_INSERT_D(d, BOOST_PP_TUPLE_TO_ARRAY(tuple), i, elem)) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_INSERT_D(d, BOOST_PP_TUPLE_TO_ARRAY(tuple), i, elem)) \
|
||||
/**/
|
||||
#
|
||||
# endif // BOOST_PP_VARIADICS
|
||||
|
@ -26,17 +26,17 @@
|
||||
# /* BOOST_PP_TUPLE_POP_BACK */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_BACK(tuple) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
|
||||
BOOST_PP_TUPLE_POP_BACK_EXEC, \
|
||||
BOOST_PP_TUPLE_POP_BACK_RETURN \
|
||||
) \
|
||||
(tuple) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
|
||||
BOOST_PP_TUPLE_POP_BACK_EXEC, \
|
||||
BOOST_PP_TUPLE_POP_BACK_RETURN \
|
||||
) \
|
||||
(tuple) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_BACK_EXEC(tuple) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_POP_BACK(BOOST_PP_TUPLE_TO_ARRAY(tuple))) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_POP_BACK(BOOST_PP_TUPLE_TO_ARRAY(tuple))) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_BACK_RETURN(tuple) tuple
|
||||
@ -44,17 +44,17 @@
|
||||
# /* BOOST_PP_TUPLE_POP_BACK_Z */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_BACK_Z(z, tuple) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
|
||||
BOOST_PP_TUPLE_POP_BACK_Z_EXEC, \
|
||||
BOOST_PP_TUPLE_POP_BACK_Z_RETURN \
|
||||
) \
|
||||
(z, tuple) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
|
||||
BOOST_PP_TUPLE_POP_BACK_Z_EXEC, \
|
||||
BOOST_PP_TUPLE_POP_BACK_Z_RETURN \
|
||||
) \
|
||||
(z, tuple) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_BACK_Z_EXEC(z, tuple) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_POP_BACK_Z(z, BOOST_PP_TUPLE_TO_ARRAY(tuple))) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_POP_BACK_Z(z, BOOST_PP_TUPLE_TO_ARRAY(tuple))) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_BACK_Z_RETURN(z, tuple) tuple
|
||||
|
@ -27,17 +27,17 @@
|
||||
# /* BOOST_PP_TUPLE_POP_FRONT */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_FRONT(tuple) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
|
||||
BOOST_PP_TUPLE_POP_FRONT_EXEC, \
|
||||
BOOST_PP_TUPLE_POP_FRONT_RETURN \
|
||||
) \
|
||||
(tuple) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
|
||||
BOOST_PP_TUPLE_POP_FRONT_EXEC, \
|
||||
BOOST_PP_TUPLE_POP_FRONT_RETURN \
|
||||
) \
|
||||
(tuple) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_FRONT_EXEC(tuple) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_POP_FRONT(BOOST_PP_TUPLE_TO_ARRAY(tuple))) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_POP_FRONT(BOOST_PP_TUPLE_TO_ARRAY(tuple))) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_FRONT_RETURN(tuple) tuple
|
||||
@ -45,17 +45,17 @@
|
||||
# /* BOOST_PP_TUPLE_POP_FRONT_Z */
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_FRONT_Z(z, tuple) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
|
||||
BOOST_PP_TUPLE_POP_FRONT_Z_EXEC, \
|
||||
BOOST_PP_TUPLE_POP_FRONT_Z_RETURN \
|
||||
) \
|
||||
(z, tuple) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_GREATER(BOOST_PP_TUPLE_SIZE(tuple),1), \
|
||||
BOOST_PP_TUPLE_POP_FRONT_Z_EXEC, \
|
||||
BOOST_PP_TUPLE_POP_FRONT_Z_RETURN \
|
||||
) \
|
||||
(z, tuple) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_FRONT_Z_EXEC(z, tuple) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_POP_FRONT_Z(z, BOOST_PP_TUPLE_TO_ARRAY(tuple))) \
|
||||
BOOST_PP_ARRAY_TO_TUPLE(BOOST_PP_ARRAY_POP_FRONT_Z(z, BOOST_PP_TUPLE_TO_ARRAY(tuple))) \
|
||||
/**/
|
||||
#
|
||||
# define BOOST_PP_TUPLE_POP_FRONT_Z_RETURN(z, tuple) tuple
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user