Merge branch 'develop'

This commit is contained in:
Peter Dimov
2018-01-13 21:33:48 +02:00
23 changed files with 561 additions and 430 deletions

View File

@ -6,16 +6,11 @@ language: cpp
sudo: false sudo: false
python: "2.7"
os:
- linux
- osx
branches: branches:
only: only:
- master - master
- develop - develop
- /feature\/.*/
env: env:
matrix: matrix:
@ -28,10 +23,10 @@ matrix:
include: include:
- os: linux - os: linux
env: TOOLSET=gcc COMPILER=g++ CXXSTD=c++03 env: TOOLSET=gcc COMPILER=g++ CXXSTD=03,11
- os: linux - os: linux
env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=c++03 env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11
addons: addons:
apt: apt:
packages: packages:
@ -40,16 +35,7 @@ matrix:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- os: linux - os: linux
env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=c++11 env: TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11
addons:
apt:
packages:
- g++-4.7
sources:
- ubuntu-toolchain-r-test
- os: linux
env: TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=c++03
addons: addons:
apt: apt:
packages: packages:
@ -58,16 +44,7 @@ matrix:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- os: linux - os: linux
env: TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=c++11 env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11
addons:
apt:
packages:
- g++-4.8
sources:
- ubuntu-toolchain-r-test
- os: linux
env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=c++03
addons: addons:
apt: apt:
packages: packages:
@ -76,16 +53,7 @@ matrix:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- os: linux - os: linux
env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=c++11 env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14,1z
addons:
apt:
packages:
- g++-4.9
sources:
- ubuntu-toolchain-r-test
- os: linux
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++03
addons: addons:
apt: apt:
packages: packages:
@ -94,25 +62,7 @@ matrix:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- os: linux - os: linux
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++11 env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z
addons:
apt:
packages:
- g++-5
sources:
- ubuntu-toolchain-r-test
- os: linux
env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++14
addons:
apt:
packages:
- g++-5
sources:
- ubuntu-toolchain-r-test
- os: linux
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++03
addons: addons:
apt: apt:
packages: packages:
@ -121,7 +71,7 @@ matrix:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- os: linux - os: linux
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z CXXSTD_DIALECT=cxxstd-dialect=gnu
addons: addons:
apt: apt:
packages: packages:
@ -130,67 +80,19 @@ matrix:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- os: linux - os: linux
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17
addons: addons:
apt: apt:
packages: packages:
- g++-6 - g++-7
sources: sources:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- os: linux - os: linux
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++1z env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11
addons:
apt:
packages:
- g++-6
sources:
- ubuntu-toolchain-r-test
- os: linux - os: linux
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=gnu++03 env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03,11,14,1z
addons:
apt:
packages:
- g++-6
sources:
- ubuntu-toolchain-r-test
- os: linux
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=gnu++11
addons:
apt:
packages:
- g++-6
sources:
- ubuntu-toolchain-r-test
- os: linux
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=gnu++14
addons:
apt:
packages:
- g++-6
sources:
- ubuntu-toolchain-r-test
- os: linux
env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=gnu++1z
addons:
apt:
packages:
- g++-6
sources:
- ubuntu-toolchain-r-test
- os: linux
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++03
- os: linux
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++11
- os: linux
env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=c++03
addons: addons:
apt: apt:
packages: packages:
@ -200,17 +102,7 @@ matrix:
- llvm-toolchain-precise-3.5 - llvm-toolchain-precise-3.5
- os: linux - os: linux
env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=c++11 env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03,11,14,1z
addons:
apt:
packages:
- clang-3.5
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.5
- os: linux
env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=c++03
addons: addons:
apt: apt:
packages: packages:
@ -220,17 +112,7 @@ matrix:
- llvm-toolchain-precise-3.6 - llvm-toolchain-precise-3.6
- os: linux - os: linux
env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=c++11 env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03,11,14,1z
addons:
apt:
packages:
- clang-3.6
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.6
- os: linux
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=c++03
addons: addons:
apt: apt:
packages: packages:
@ -240,17 +122,7 @@ matrix:
- llvm-toolchain-precise-3.7 - llvm-toolchain-precise-3.7
- os: linux - os: linux
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=c++11 env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03,11,14,1z
addons:
apt:
packages:
- clang-3.7
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
- os: linux
env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=c++03
addons: addons:
apt: apt:
packages: packages:
@ -260,37 +132,7 @@ matrix:
- llvm-toolchain-precise-3.8 - llvm-toolchain-precise-3.8
- os: linux - os: linux
env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=c++11 env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03,11,14,1z
addons:
apt:
packages:
- clang-3.8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
- os: linux
env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=c++14
addons:
apt:
packages:
- clang-3.8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
- os: linux
env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=c++1z
addons:
apt:
packages:
- clang-3.8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
- os: linux
env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=c++03
addons: addons:
apt: apt:
packages: packages:
@ -300,134 +142,55 @@ matrix:
- llvm-toolchain-precise-3.9 - llvm-toolchain-precise-3.9
- os: linux - os: linux
env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=c++11 compiler: clang++-4.0
env: TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03,11,14,1z
addons: addons:
apt: apt:
packages: packages:
- clang-3.9 - clang-4.0
sources: sources:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.9 - llvm-toolchain-trusty-4.0
- os: linux - os: linux
env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=c++14 compiler: clang++-5.0
env: TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03,11,14,1z
addons: addons:
apt: apt:
packages: packages:
- clang-3.9 - clang-5.0
sources: sources:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.9 - llvm-toolchain-trusty-5.0
- os: linux
env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=c++1z
addons:
apt:
packages:
- clang-3.9
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.9
- os: osx - os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++03 env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
osx_image: xcode9.1
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
osx_image: xcode9
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
osx_image: xcode8.3 osx_image: xcode8.3
- os: osx - os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++11 env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
osx_image: xcode8.3 osx_image: xcode8
- os: osx - os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
osx_image: xcode8.3
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++1z
osx_image: xcode8.3
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++03
osx_image: xcode8.2
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++11
osx_image: xcode8.2
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14
osx_image: xcode8.2
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++1z
osx_image: xcode8.1
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++03
osx_image: xcode8.1
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++11
osx_image: xcode8.1
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14
osx_image: xcode8.1
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++1z
osx_image: xcode8.1
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++03
osx_image: xcode8.0
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++11
osx_image: xcode8.0
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14
osx_image: xcode8.0
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++1z
osx_image: xcode8.0
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++03
osx_image: xcode7.3 osx_image: xcode7.3
- os: osx - os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++11 env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z
osx_image: xcode7.3
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14
osx_image: xcode7.3
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++1z
osx_image: xcode7.3
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++03
osx_image: xcode6.4
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++11
osx_image: xcode6.4
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14
osx_image: xcode6.4
- os: osx
env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++1z
osx_image: xcode6.4 osx_image: xcode6.4
install: install:
- BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true
- cd .. - cd ..
- git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
- cd boost-root - cd boost-root
- git submodule update --init tools/build - git submodule update --init tools/build
- git submodule update --init libs/detail - git submodule update --init libs/detail
@ -440,9 +203,11 @@ install:
script: script:
- |- - |-
echo "using $TOOLSET : : $COMPILER : <cxxflags>-std=$CXXSTD ;" > ~/user-config.jam echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam
- (cd libs/config/test && ../../../b2 config_info_travis_install toolset=$TOOLSET && ./config_info_travis) - IFS=','
- ./b2 -j3 libs/config/test toolset=$TOOLSET - for CXXLOCAL in $CXXSTD; do (cd libs/config/test && ../../../b2 config_info_travis_install toolset=$TOOLSET cxxstd=$CXXLOCAL $CXXSTD_DIALECT && echo With Standard Version $CXXLOCAL && ./config_info_travis && rm ./config_info_travis) done
- unset IFS
- ./b2 -j3 libs/config/test toolset=$TOOLSET cxxstd=$CXXSTD $CXXSTD_DIALECT
notifications: notifications:
email: email:

View File

@ -21,7 +21,7 @@ environment:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARGS: --toolset=msvc-14.1 address-model=32 ARGS: --toolset=msvc-14.1 address-model=32
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARGS: --toolset=msvc-14.1 address-model=64 cxxflags=-std:c++latest ARGS: --toolset=msvc-14.1 address-model=64 cxxflags=-std:c++latest cxxflags=-permissive-
- ARGS: --toolset=msvc-9.0 address-model=32 - ARGS: --toolset=msvc-9.0 address-model=32
- ARGS: --toolset=msvc-10.0 address-model=32 - ARGS: --toolset=msvc-10.0 address-model=32
- ARGS: --toolset=msvc-11.0 address-model=32 - ARGS: --toolset=msvc-11.0 address-model=32

View File

@ -939,7 +939,8 @@
<td> <td>
<p> <p>
The C++ implementation fails to provide the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iterator</span></code> The C++ implementation fails to provide the <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iterator</span></code>
class. class. Note that post C++17, this macro is re-purposed to indicate
that std::iterator has been removed or deprecated.
</p> </p>
</td> </td>
</tr> </tr>
@ -3829,6 +3830,18 @@
</p> </p>
</td> </td>
</tr> </tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">BOOST_NO_CXX17_ITERATOR_TRAITS</span></code>
</p>
</td>
<td>
<p>
The compiler does not support SFINAE-friendly <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">iterator_traits</span></code>.
</p>
</td>
</tr>
</tbody> </tbody>
</table></div> </table></div>
</div> </div>
@ -3956,7 +3969,7 @@
that is not otherwise described by one of the other Boost.Config that is not otherwise described by one of the other Boost.Config
macros. To use the macro you must first macros. To use the macro you must first
</p> </p>
<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">detail</span><span class="special">/</span><span class="identifier">workaround</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span> <pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">config</span><span class="special">/</span><span class="identifier">workaround</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
</pre> </pre>
<p> <p>
usage is then: usage is then:
@ -3987,7 +4000,7 @@
</p> </p>
<p> <p>
<span class="bold"><strong>Note</strong></span>: the ultimate source of documentation <span class="bold"><strong>Note</strong></span>: the ultimate source of documentation
for this macro is in <a href="../../../../../boost/detail/workaround.hpp" target="_top">boost/detail/workaround.hpp</a>. for this macro is in <a href="../../../../../boost/config/workaround.hpp" target="_top">boost/config/workaround.hpp</a>.
</p> </p>
</td> </td>
</tr> </tr>
@ -4183,7 +4196,16 @@
<tr> <tr>
<td> <td>
<p> <p>
<code class="computeroutput"><span class="identifier">BOOST_EXPLICIT_TEMPLATE_TYPE</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span></code> <code class="computeroutput"><span class="identifier">BOOST_EXPLICIT_TEMPLATE_NON_TYPE</span><span class="special">(</span><span class="identifier">t</span><span class="special">,</span><span class="identifier">v</span><span class="special">)</span></code> <code class="computeroutput"><span class="identifier">BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span></code> <code class="computeroutput"><span class="identifier">BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE</span><span class="special">(</span><span class="identifier">t</span><span class="special">,</span><span class="identifier">v</span><span class="special">)</span></code> <code class="computeroutput"><span class="identifier">BOOST_EXPLICIT_TEMPLATE_TYPE</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span></code>
</p>
<p>
<code class="computeroutput"><span class="identifier">BOOST_EXPLICIT_TEMPLATE_NON_TYPE</span><span class="special">(</span><span class="identifier">t</span><span class="special">,</span><span class="identifier">v</span><span class="special">)</span></code>
</p>
<p>
<code class="computeroutput"><span class="identifier">BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE</span><span class="special">(</span><span class="identifier">t</span><span class="special">)</span></code>
</p>
<p>
<code class="computeroutput"><span class="identifier">BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE</span><span class="special">(</span><span class="identifier">t</span><span class="special">,</span><span class="identifier">v</span><span class="special">)</span></code>
</p> </p>
</td> </td>
<td> <td>
@ -4452,6 +4474,8 @@
<td> <td>
<p> <p>
<code class="computeroutput"><span class="identifier">BOOST_LIKELY</span><span class="special">(</span><span class="identifier">X</span><span class="special">)</span></code> <code class="computeroutput"><span class="identifier">BOOST_LIKELY</span><span class="special">(</span><span class="identifier">X</span><span class="special">)</span></code>
</p>
<p>
<code class="computeroutput"><span class="identifier">BOOST_UNLIKELY</span><span class="special">(</span><span class="identifier">X</span><span class="special">)</span></code> <code class="computeroutput"><span class="identifier">BOOST_UNLIKELY</span><span class="special">(</span><span class="identifier">X</span><span class="special">)</span></code>
</p> </p>
</td> </td>
@ -4520,6 +4544,23 @@
</p> </p>
</td> </td>
</tr> </tr>
<tr>
<td>
<p>
<code class="computeroutput"><span class="identifier">BOOST_PRAGMA_MESSAGE</span><span class="special">(</span><span class="identifier">M</span><span class="special">)</span></code>
</p>
</td>
<td>
<p>
Defined in header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">config</span><span class="special">/</span><span class="identifier">pragma_message</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>,
this macro expands to the equivalent of <code class="computeroutput"><span class="preprocessor">#pragma</span>
<span class="identifier">message</span><span class="special">(</span><span class="identifier">M</span><span class="special">)</span></code>.
<code class="computeroutput"><span class="identifier">M</span></code> must be a string
literal. Example: <code class="computeroutput"><span class="identifier">BOOST_PRAGMA_MESSAGE</span><span class="special">(</span><span class="string">"This header
is deprecated."</span><span class="special">)</span></code>.
</p>
</td>
</tr>
</tbody> </tbody>
</table></div> </table></div>
</div> </div>

View File

@ -992,7 +992,7 @@
</div> </div>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: July 21, 2017 at 18:08:20 GMT</small></p></td> <td align="left"><p><small>Last revised: December 12, 2017 at 18:14:39 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td> <td align="right"><div class="copyright-footer"></div></td>
</tr></table> </tr></table>
<hr> <hr>

View File

@ -232,7 +232,8 @@ The C++ standard library does not provide a standards conforming
The platform does not have a conforming version of `std::distance`. The platform does not have a conforming version of `std::distance`.
]] ]]
[[`BOOST_NO_STD_ITERATOR`][Standard library][ [[`BOOST_NO_STD_ITERATOR`][Standard library][
The C++ implementation fails to provide the `std::iterator` class. The C++ implementation fails to provide the `std::iterator` class.
Note that post C++17, this macro is re-purposed to indicate that std::iterator has been removed or deprecated.
]] ]]
[[`BOOST_NO_STD_ITERATOR_TRAITS`][Standard library][ [[`BOOST_NO_STD_ITERATOR_TRAITS`][Standard library][
The compiler does not provide a standard compliant implementation of The compiler does not provide a standard compliant implementation of
@ -979,7 +980,7 @@ workarounds for compiler/standard library defects.
This macro is used where a compiler specific workaround is required that is not otherwise This macro is used where a compiler specific workaround is required that is not otherwise
described by one of the other Boost.Config macros. To use the macro you must first described by one of the other Boost.Config macros. To use the macro you must first
`` ``
#include <boost/detail/workaround.hpp> #include <boost/config/workaround.hpp>
`` ``
usage is then: usage is then:
`` ``
@ -1001,7 +1002,7 @@ For example
of `__BORLANDC__` /unless/ the macro `BOOST_DETECT_OUTDATED_WORKAROUNDS` is defined, in which case evaluates to of `__BORLANDC__` /unless/ the macro `BOOST_DETECT_OUTDATED_WORKAROUNDS` is defined, in which case evaluates to
`(__BORLANDC__ <= 0x590)`. `(__BORLANDC__ <= 0x590)`.
[*Note]: the ultimate source of documentation for this macro is in [@../../../../boost/detail/workaround.hpp boost/detail/workaround.hpp]. [*Note]: the ultimate source of documentation for this macro is in [@../../../../boost/config/workaround.hpp boost/config/workaround.hpp].
]] ]]
[[`BOOST_PREVENT_MACRO_SUBSTITUTION`][ [[`BOOST_PREVENT_MACRO_SUBSTITUTION`][
Sometimes you have a function name with the same name as a C macro, for example "min" and "max" Sometimes you have a function name with the same name as a C macro, for example "min" and "max"
@ -1095,8 +1096,11 @@ In either case this macro has no effect on runtime behavior and performance
of code. of code.
]] ]]
[[`BOOST_EXPLICIT_TEMPLATE_TYPE(t)` [[`BOOST_EXPLICIT_TEMPLATE_TYPE(t)`
`BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t,v)` `BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t,v)`
`BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)` `BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)`
`BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t,v)`][ `BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t,v)`][
Some compilers silently "fold" different function template instantiations if Some compilers silently "fold" different function template instantiations if
some of the template parameters don't appear in the function parameter list. some of the template parameters don't appear in the function parameter list.
@ -1247,6 +1251,7 @@ If the compiler does not support this markup, `BOOST_NORETURN` is defined empty
additional macro `BOOST_NO_NORETURN` is defined. additional macro `BOOST_NO_NORETURN` is defined.
]] ]]
[[`BOOST_LIKELY(X)` [[`BOOST_LIKELY(X)`
`BOOST_UNLIKELY(X)`][ `BOOST_UNLIKELY(X)`][
These macros communicate to the compiler that the conditional expression `X` is likely These macros communicate to the compiler that the conditional expression `X` is likely
or unlikely to yield a positive result. The expression should result in a boolean value. or unlikely to yield a positive result. The expression should result in a boolean value.
@ -1275,6 +1280,9 @@ Usage example:
typedef unsigned int BOOST_MAY_ALIAS aliasing_uint; typedef unsigned int BOOST_MAY_ALIAS aliasing_uint;
`` ``
]] ]]
[[`BOOST_PRAGMA_MESSAGE(M)`][Defined in header `<boost/config/pragma_message.hpp>`,
this macro expands to the equivalent of `#pragma message(M)`. `M` must be a string
literal. Example: `BOOST_PRAGMA_MESSAGE("This header is deprecated.")`.]]
] ]
[endsect] [endsect]

View File

@ -12,8 +12,15 @@
#include "boost/config/compiler/common_edg.hpp" #include "boost/config/compiler/common_edg.hpp"
#define BOOST_HAS_LONG_LONG
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP #define BOOST_NO_TWO_PHASE_NAME_LOOKUP
#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS
#define BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE
#define BOOST_LOG_NO_MEMBER_TEMPLATE_FRIENDS
#define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
#define BOOST_NO_CXX11_HDR_CODECVT #define BOOST_NO_CXX11_HDR_CODECVT
#define BOOST_NO_CXX11_NUMERIC_LIMITS
#define BOOST_COMPILER "Wind River Diab " BOOST_STRINGIZE(__VERSION_NUMBER__) #define BOOST_COMPILER "Wind River Diab " BOOST_STRINGIZE(__VERSION_NUMBER__)

View File

@ -217,17 +217,29 @@
// https://connect.microsoft.com/VisualStudio/feedback/details/1582233/c-subobjects-still-not-value-initialized-correctly // https://connect.microsoft.com/VisualStudio/feedback/details/1582233/c-subobjects-still-not-value-initialized-correctly
// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
// (Niels Dekker, LKEB, May 2010) // (Niels Dekker, LKEB, May 2010)
// Still present in VC15.5, Dec 2017.
#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
// //
// C++ 11: // C++ 11:
// //
#define BOOST_NO_TWO_PHASE_NAME_LOOKUP // This is supported with /permissive- for 15.5 onwards, unfortunately we appear to have no way to tell
// if this is in effect or not, in any case nothing in Boost is currently using this, so we'll just go
// on defining it for now:
//
# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
#if (_MSC_VER < 1912) || (_MSVC_LANG < 201402)
// Supported from msvc-15.5 onwards:
#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_SFINAE_EXPR
#endif
// C++ 14: // C++ 14:
// Still gives internal compiler error for msvc-15.5:
# define BOOST_NO_CXX14_CONSTEXPR # define BOOST_NO_CXX14_CONSTEXPR
// C++ 17: // C++ 17:
#if (_MSC_VER < 1912) || (_MSVC_LANG < 201703)
#define BOOST_NO_CXX17_INLINE_VARIABLES #define BOOST_NO_CXX17_INLINE_VARIABLES
#define BOOST_NO_CXX17_FOLD_EXPRESSIONS #define BOOST_NO_CXX17_FOLD_EXPRESSIONS
#endif
// //
// Things that don't work in clr mode: // Things that don't work in clr mode:
@ -325,12 +337,14 @@
# define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) # define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
#endif #endif
#include <boost/config/pragma_message.hpp>
// //
// last known and checked version is 19.11.25547 (VC++ 2017.4): // last known and checked version is 19.12.25830.2 (VC++ 2017.3):
#if (_MSC_VER > 1911) #if (_MSC_VER > 1912)
# if defined(BOOST_ASSERT_CONFIG) # if defined(BOOST_ASSERT_CONFIG)
# error "Boost.Config is older than your current compiler version." # error "Boost.Config is older than your current compiler version."
# elif !defined(BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE) # elif !defined(BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE)
# pragma message("Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an update Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.") BOOST_PRAGMA_MESSAGE("Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an updated Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.")
# endif # endif
#endif #endif

View File

@ -537,25 +537,10 @@ namespace std{ using ::type_info; }
// ---------------------------------------------------------------------------// // ---------------------------------------------------------------------------//
//
// Helper macro BOOST_STRINGIZE: // Helper macro BOOST_STRINGIZE:
// Converts the parameter X to a string after macro replacement
// on X has been performed.
//
#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
#define BOOST_DO_STRINGIZE(X) #X
//
// Helper macro BOOST_JOIN: // Helper macro BOOST_JOIN:
// The following piece of macro magic joins the two
// arguments together, even when one of the arguments is #include <boost/config/helper_macros.hpp>
// itself a macro (see 16.3.1 in C++ standard). The key
// is that macro expansion of macro arguments does not
// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
//
#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
#define BOOST_DO_JOIN2( X, Y ) X##Y
// //
// Set some default values for compiler/library/platform names. // Set some default values for compiler/library/platform names.

View File

@ -0,0 +1,37 @@
#ifndef BOOST_CONFIG_HELPER_MACROS_HPP_INCLUDED
#define BOOST_CONFIG_HELPER_MACROS_HPP_INCLUDED
// Copyright 2001 John Maddock.
// Copyright 2017 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
//
// BOOST_STRINGIZE(X)
// BOOST_JOIN(X, Y)
//
// Note that this header is C compatible.
//
// Helper macro BOOST_STRINGIZE:
// Converts the parameter X to a string after macro replacement
// on X has been performed.
//
#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
#define BOOST_DO_STRINGIZE(X) #X
//
// Helper macro BOOST_JOIN:
// The following piece of macro magic joins the two
// arguments together, even when one of the arguments is
// itself a macro (see 16.3.1 in C++ standard). The key
// is that macro expansion of macro arguments does not
// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
//
#define BOOST_JOIN(X, Y) BOOST_DO_JOIN(X, Y)
#define BOOST_DO_JOIN(X, Y) BOOST_DO_JOIN2(X,Y)
#define BOOST_DO_JOIN2(X, Y) X##Y
#endif // BOOST_CONFIG_HELPER_MACROS_HPP_INCLUDED

View File

@ -1,30 +1,50 @@
// (C) Copyright Dustin Spicuzza 2009. // (C) Copyright Dustin Spicuzza 2009.
// Adapted to vxWorks 6.9 by Peter Brockamp 2012. // Adapted to vxWorks 6.9 by Peter Brockamp 2012.
// Updated for VxWorks 7 by Brian Kuhl 2016
// Use, modification and distribution are subject to the // Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file // Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for most recent version. // See http://www.boost.org for most recent version.
// Since WRS does not yet properly support boost under vxWorks // Old versions of vxWorks (namely everything below 6.x) are
// and this file was badly outdated, but I was keen on using it, // absolutely unable to use boost. Old STLs and compilers
// I patched boost myself to make things work. This has been tested // like (GCC 2.96) . Do not even think of getting this to work,
// and adapted by me for vxWorks 6.9 *only*, as I'm lacking access // a miserable failure will be guaranteed!
// to earlier 6.X versions! The only thing I know for sure is that //
// very old versions of vxWorks (namely everything below 6.x) are
// absolutely unable to use boost. This is mainly due to the completely
// outdated libraries and ancient compiler (GCC 2.96 or worse). Do
// not even think of getting this to work, a miserable failure will
// be guaranteed!
// Equally, this file has been tested for RTPs (Real Time Processes) // Equally, this file has been tested for RTPs (Real Time Processes)
// only, not for DKMs (Downloadable Kernel Modules). These two types // only, not for DKMs (Downloadable Kernel Modules). These two types
// of executables differ largely in the available functionality of // of executables differ largely in the available functionality of
// the C-library, STL, and so on. A DKM uses a library similar to those // the C-library, STL, and so on. A DKM uses a C89 library with no
// of vxWorks 5.X - with all its limitations and incompatibilities // wide character support and no guarantee of ANSI C. The same Dinkum
// with respect to ANSI C++ and STL. So probably there might be problems // STL library is used in both contexts.
// with the usage of boost from DKMs. WRS or any voluteers are free to //
// prove the opposite! // Similarly the Dinkum abridged STL that supports the loosely specified
// embedded C++ standard has not been tested and is unlikely to work
// on anything but the simplest library.
// ====================================================================
//
// Additional Configuration
// -------------------------------------------------------------------
//
// Because of the ordering of include files and other issues the following
// additional definitions worked better outside this file.
//
// When building the log library add the following to the b2 invocation
// define=BOOST_LOG_WITHOUT_IPC
// and
// -DBOOST_LOG_WITHOUT_DEFAULT_FACTORIES
// to your compile options.
//
// When building the test library add
// -DBOOST_TEST_LIMITED_SIGNAL_DETAILS
// to your compile options
//
// When building containers library add
// -DHAVE_MORECORE=0
// to your c compile options so dlmalloc heap library is compiled
// without brk() calls
//
// ==================================================================== // ====================================================================
// //
// Some important information regarding the usage of POSIX semaphores: // Some important information regarding the usage of POSIX semaphores:
@ -38,29 +58,14 @@
// Now, VxWorks POSIX-semaphores for DKM's default to the usage of // Now, VxWorks POSIX-semaphores for DKM's default to the usage of
// priority inverting semaphores, which is fine. On the other hand, // priority inverting semaphores, which is fine. On the other hand,
// for RTP's it defaults to using non priority inverting semaphores, // for RTP's it defaults to using non priority inverting semaphores,
// which could easily pose a serious problem for a real time process, // which could easily pose a serious problem for a real time process.
// i.e. deadlocks! To overcome this two possibilities do exist:
// //
// a) Patch every piece of boost that uses semaphores to instanciate // To change the default properties for POSIX-semaphores in VxWorks 7
// the proper type of semaphores. This is non-intrusive with respect // enable core > CORE_USER Menu > DEFAULT_PTHREAD_PRIO_INHERIT
// to the OS and could relatively easy been done by giving all //
// semaphores attributes deviating from the default (for in-depth // In VxWorks 6.x so as to integrate with boost.
// information see the POSIX functions pthread_mutexattr_init() // - Edit the file
// and pthread_mutexattr_setprotocol()). However this breaks all // installDir/vxworks-6.x/target/usr/src/posix/pthreadLib.c
// too easily, as with every new version some boost library could
// all in a sudden start using semaphores, resurrecting the very
// same, hard to locate problem over and over again!
//
// b) We could change the default properties for POSIX-semaphores
// that VxWorks uses for RTP's and this is being suggested here,
// as it will more or less seamlessly integrate with boost. I got
// the following information from WRS how to do this, compare
// Wind River TSR# 1209768:
//
// Instructions for changing the default properties of POSIX-
// semaphores for RTP's in VxWorks 6.9:
// - Edit the file /vxworks-6.9/target/usr/src/posix/pthreadLib.c
// in the root of your Workbench-installation.
// - Around line 917 there should be the definition of the default // - Around line 917 there should be the definition of the default
// mutex attributes: // mutex attributes:
// //
@ -81,30 +86,11 @@
// pAttr->mutexAttrType = PTHREAD_MUTEX_DEFAULT; // pAttr->mutexAttrType = PTHREAD_MUTEX_DEFAULT;
// //
// Here again, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT. // Here again, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT.
// - Finally, rebuild your VSB. This will create a new VxWorks kernel // - Finally, rebuild your VSB. This will rebuild the libraries
// with the changed properties. That's it! Now, using boost should // with the changed properties. That's it! Now, using boost should
// no longer cause any problems with task deadlocks! // no longer cause any problems with task deadlocks!
// //
// And here's another useful piece of information concerning VxWorks' // ====================================================================
// POSIX-functionality in general:
// VxWorks is not a genuine POSIX-OS in itself, rather it is using a
// kind of compatibility layer (sort of a wrapper) to emulate the
// POSIX-functionality by using its own resources and functions.
// At the time a task (thread) calls it's first POSIX-function during
// runtime it is being transformed by the OS into a POSIX-thread.
// This transformation does include a call to malloc() to allocate the
// memory required for the housekeeping of POSIX-threads. In a high
// priority RTP this malloc() call may be highly undesirable, as its
// timing is more or less unpredictable (depending on what your actual
// heap looks like). You can circumvent this problem by calling the
// function thread_self() at a well defined point in the code of the
// task, e.g. shortly after the task spawns up. Thereby you are able
// to define the time when the task-transformation will take place and
// you could shift it to an uncritical point where a malloc() call is
// tolerable. So, if this could pose a problem for your code, remember
// to call thread_self() from the affected task at an early stage.
//
// ====================================================================
// Block out all versions before vxWorks 6.x, as these don't work: // Block out all versions before vxWorks 6.x, as these don't work:
// Include header with the vxWorks version information and query them // Include header with the vxWorks version information and query them
@ -158,11 +144,6 @@
#define BOOST_HAS_CLOCK_GETTIME #define BOOST_HAS_CLOCK_GETTIME
#define BOOST_HAS_MACRO_USE_FACET #define BOOST_HAS_MACRO_USE_FACET
// Generally unavailable functionality, delivered by boost's test function:
//#define BOOST_NO_DEDUCED_TYPENAME // Commented this out, boost's test gives an errorneous result!
#define BOOST_NO_CXX11_EXTERN_TEMPLATE
#define BOOST_NO_CXX11_VARIADIC_MACROS
// Generally available threading API's: // Generally available threading API's:
#define BOOST_HAS_PTHREADS #define BOOST_HAS_PTHREADS
#define BOOST_HAS_SCHED_YIELD #define BOOST_HAS_SCHED_YIELD
@ -191,14 +172,7 @@
# endif # endif
#endif #endif
// vxWorks doesn't work with asio serial ports: #if (_WRS_VXWORKS_MAJOR < 7)
#define BOOST_ASIO_DISABLE_SERIAL_PORT
// TODO: The problem here seems to bee that vxWorks uses its own, very specific
// ways to handle serial ports, incompatible with POSIX or anything...
// Maybe a specific implementation would be possible, but until the
// straight need arises... This implementation would presumably consist
// of some vxWorks specific ioctl-calls, etc. Any voluteers?
// vxWorks-around: <time.h> #defines CLOCKS_PER_SEC as sysClkRateGet() but // vxWorks-around: <time.h> #defines CLOCKS_PER_SEC as sysClkRateGet() but
// miserably fails to #include the required <sysLib.h> to make // miserably fails to #include the required <sysLib.h> to make
// sysClkRateGet() available! So we manually include it here. // sysClkRateGet() available! So we manually include it here.
@ -208,11 +182,12 @@
#endif #endif
// vxWorks-around: In <stdint.h> the macros INT32_C(), UINT32_C(), INT64_C() and // vxWorks-around: In <stdint.h> the macros INT32_C(), UINT32_C(), INT64_C() and
// UINT64_C() are defined errorneously, yielding not a signed/ // UINT64_C() are defined erroneously, yielding not a signed/
// unsigned long/long long type, but a signed/unsigned int/long // unsigned long/long long type, but a signed/unsigned int/long
// type. Eventually this leads to compile errors in ratio_fwd.hpp, // type. Eventually this leads to compile errors in ratio_fwd.hpp,
// when trying to define several constants which do not fit into a // when trying to define several constants which do not fit into a
// long type! We correct them here by redefining. // long type! We correct them here by redefining.
#include <cstdint> #include <cstdint>
// Some macro-magic to do the job // Some macro-magic to do the job
@ -231,12 +206,16 @@
#define UINT64_C(x) VX_JOIN(x, ULL) #define UINT64_C(x) VX_JOIN(x, ULL)
// #include Libraries required for the following function adaption // #include Libraries required for the following function adaption
#include <sys/time.h>
#endif // _WRS_VXWORKS_MAJOR < 7
#include <ioLib.h> #include <ioLib.h>
#include <tickLib.h> #include <tickLib.h>
#include <sys/time.h>
// Use C-linkage for the following helper functions // Use C-linkage for the following helper functions
#ifdef __cplusplus
extern "C" { extern "C" {
#endif
// vxWorks-around: The required functions getrlimit() and getrlimit() are missing. // vxWorks-around: The required functions getrlimit() and getrlimit() are missing.
// But we have the similar functions getprlimit() and setprlimit(), // But we have the similar functions getprlimit() and setprlimit(),
@ -248,7 +227,7 @@ extern "C" {
// TODO: getprlimit() and setprlimit() do exist for RTPs only, for whatever reason. // TODO: getprlimit() and setprlimit() do exist for RTPs only, for whatever reason.
// Thus for DKMs there would have to be another implementation. // Thus for DKMs there would have to be another implementation.
#ifdef __RTP__ #if defined ( __RTP__) && (_WRS_VXWORKS_MAJOR < 7)
inline int getrlimit(int resource, struct rlimit *rlp){ inline int getrlimit(int resource, struct rlimit *rlp){
return getprlimit(0, 0, resource, rlp); return getprlimit(0, 0, resource, rlp);
} }
@ -273,14 +252,20 @@ inline int truncate(const char *p, off_t l){
return close(fd); return close(fd);
} }
#ifdef __GNUC__
#define ___unused __attribute__((unused))
#else
#define ___unused
#endif
// Fake symlink handling by dummy functions: // Fake symlink handling by dummy functions:
inline int symlink(const char*, const char*){ inline int symlink(const char* path1 ___unused, const char* path2 ___unused){
// vxWorks has no symlinks -> always return an error! // vxWorks has no symlinks -> always return an error!
errno = EACCES; errno = EACCES;
return -1; return -1;
} }
inline ssize_t readlink(const char*, char*, size_t){ inline ssize_t readlink(const char* path1 ___unused, char* path2 ___unused, size_t size ___unused){
// vxWorks has no symlinks -> always return an error! // vxWorks has no symlinks -> always return an error!
errno = EACCES; errno = EACCES;
return -1; return -1;
@ -297,8 +282,18 @@ inline int gettimeofday(struct timeval *tv, void * /*tzv*/) {
} }
#endif #endif
#ifdef __cplusplus
} // extern "C"
#endif
// vxWorks does provide neither struct tms nor function times()! /*
* moved to os/utils/unix/freind_h/times.h in VxWorks 7
* to avoid conflict with MPL operator times
*/
#if (_WRS_VXWORKS_MAJOR < 7)
#ifdef __cplusplus
// vxWorks provides neither struct tms nor function times()!
// We implement an empty dummy-function, simply setting the user // We implement an empty dummy-function, simply setting the user
// and system time to the half of thew actual system ticks-value // and system time to the half of thew actual system ticks-value
// and the child user and system time to 0. // and the child user and system time to 0.
@ -315,7 +310,8 @@ struct tms{
clock_t tms_cstime; // System CPU time of terminated child processes clock_t tms_cstime; // System CPU time of terminated child processes
}; };
inline clock_t times(struct tms *t){
inline clock_t times(struct tms *t){
struct timespec ts; struct timespec ts;
clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts); clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts);
clock_t ticks(static_cast<clock_t>(static_cast<double>(ts.tv_sec) * CLOCKS_PER_SEC + clock_t ticks(static_cast<clock_t>(static_cast<double>(ts.tv_sec) * CLOCKS_PER_SEC +
@ -327,8 +323,16 @@ inline clock_t times(struct tms *t){
return ticks; return ticks;
} }
extern void bzero (void *, size_t); // FD_ZERO uses bzero() but doesn't include strings.h
} // extern "C" namespace std {
using ::times;
}
#endif // __cplusplus
#endif // _WRS_VXWORKS_MAJOR < 7
#ifdef __cplusplus
extern "C" void bzero (void *, size_t); // FD_ZERO uses bzero() but doesn't include strings.h
// Put the selfmade functions into the std-namespace, just in case // Put the selfmade functions into the std-namespace, just in case
namespace std { namespace std {
@ -339,9 +343,11 @@ namespace std {
using ::truncate; using ::truncate;
using ::symlink; using ::symlink;
using ::readlink; using ::readlink;
using ::times; #if (_WRS_VXWORKS_MAJOR < 7)
using ::gettimeofday; using ::gettimeofday;
#endif
} }
#endif // __cplusplus
// Some more macro-magic: // Some more macro-magic:
// vxWorks-around: Some functions are not present or broken in vxWorks // vxWorks-around: Some functions are not present or broken in vxWorks
@ -349,12 +355,13 @@ namespace std {
// Include signal.h which might contain a typo to be corrected here // Include signal.h which might contain a typo to be corrected here
#include <signal.h> #include <signal.h>
#if (_WRS_VXWORKS_MAJOR < 7)
inline int getpagesize() { return sysconf(_SC_PAGESIZE); } // getpagesize is deprecated anyway! #define getpagesize() sysconf(_SC_PAGESIZE) // getpagesize is deprecated anyway!
inline int lstat(p, b) { return stat(p, b); } // lstat() == stat(), as vxWorks has no symlinks!
#endif
#ifndef S_ISSOCK #ifndef S_ISSOCK
# define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket? # define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket?
#endif #endif
inline int lstat(p, b) { return stat(p, b); } // lstat() == stat(), as vxWorks has no symlinks!
#ifndef FPE_FLTINV #ifndef FPE_FLTINV
# define FPE_FLTINV (FPE_FLTSUB+1) // vxWorks has no FPE_FLTINV, so define one as a dummy # define FPE_FLTINV (FPE_FLTSUB+1) // vxWorks has no FPE_FLTINV, so define one as a dummy
#endif #endif
@ -371,22 +378,56 @@ typedef int locale_t; // locale_t is a POSIX-ex
// vxWorks 7 adds C++11 support // vxWorks 7 adds C++11 support
// however it is optional, and does not match exactly the support determined // however it is optional, and does not match exactly the support determined
// by examining Dinkum STL version and GCC version (or ICC and DCC) // by examining the Dinkum STL version and GCC version (or ICC and DCC)
#ifndef _WRS_CONFIG_LANG_LIB_CPLUS_CPLUS_USER_2011 #ifndef _WRS_CONFIG_LANG_LIB_CPLUS_CPLUS_USER_2011
# define BOOST_NO_CXX11_ADDRESSOF // C11 addressof operator on memory location
# define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_NUMERIC_LIMITS // max_digits10 in test/../print_helper.hpp
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_STD_ALIGN
# define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_ARRAY
# define BOOST_NO_CXX11_HDR_ATOMIC
# define BOOST_NO_CXX11_HDR_CHRONO
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
# define BOOST_NO_CXX11_HDR_FORWARD_LIST //serialization/test/test_list.cpp
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
# define BOOST_NO_CXX11_HDR_FUTURE
# define BOOST_NO_CXX11_HDR_MUTEX
# define BOOST_NO_CXX11_HDR_RANDOM //math/../test_data.hpp
# define BOOST_NO_CXX11_HDR_RATIO
# define BOOST_NO_CXX11_HDR_REGEX
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
# define BOOST_NO_CXX11_HDR_THREAD
# define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_TYPEINDEX
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_TYPE_TRAITS
# define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_TUPLE
# define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_STD_ALIGN
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_MAP
# define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_HDR_ATOMIC
#else #else
# define BOOST_NO_CXX11_NULLPTR #ifndef BOOST_SYSTEM_NO_DEPRECATED
# define BOOST_SYSTEM_NO_DEPRECATED // workaround link error in spirit
#endif
#endif #endif
// NONE is used in enums in lamda and other libraries
#undef NONE
// restrict is an iostreams class
#undef restrict
// use fake poll() from Unix layer in ASIO to get full functionality
// most libraries will use select() but this define allows 'iostream' functionality
// which is based on poll() only
#if (_WRS_VXWORKS_MAJOR > 6)
# ifndef BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR
# define BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR
# endif
#else
# define BOOST_ASIO_DISABLE_SERIAL_PORT
#endif

View File

@ -0,0 +1,29 @@
#ifndef BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED
#define BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED
// Copyright 2017 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
//
// BOOST_PRAGMA_MESSAGE("message")
//
// Expands to the equivalent of #pragma message("message")
//
// Note that this header is C compatible.
#include <boost/config/helper_macros.hpp>
#if defined(BOOST_DISABLE_PRAGMA_MESSAGE)
# define BOOST_PRAGMA_MESSAGE(x)
#elif defined(__GNUC__)
# define BOOST_PRAGMA_MESSAGE(x) _Pragma(BOOST_STRINGIZE(message(x)))
#elif defined(_MSC_VER)
# define BOOST_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ "(" BOOST_STRINGIZE(__LINE__) "): note: " x))
#else
# define BOOST_PRAGMA_MESSAGE(x)
#endif
#endif // BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED

View File

@ -96,7 +96,8 @@
#include <exception> #include <exception>
#endif #endif
#include <typeinfo> #include <typeinfo>
#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__) #if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__) \
&& !defined(__VXWORKS__)
# define BOOST_NO_STD_TYPEINFO # define BOOST_NO_STD_TYPEINFO
#endif #endif
@ -172,10 +173,15 @@
// C++17 features // C++17 features
#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(BOOST_MSVC) || (BOOST_MSVC < 1910) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0) #if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(BOOST_MSVC) || (BOOST_MSVC < 1910) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0)
# define BOOST_NO_CXX17_STD_APPLY # define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_ITERATOR_TRAITS
#endif #endif
#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) #if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650)
# define BOOST_NO_CXX17_STD_INVOKE # define BOOST_NO_CXX17_STD_INVOKE
# define BOOST_NO_CXX17_ITERATOR_TRAITS #endif
#if !(!defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(BOOST_MSVC) || (BOOST_MSVC < 1912) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0))
// Deprecated std::iterator:
# define BOOST_NO_STD_ITERATOR
#endif #endif
#if defined(BOOST_INTEL) && (BOOST_INTEL <= 1400) #if defined(BOOST_INTEL) && (BOOST_INTEL <= 1400)

View File

@ -78,6 +78,7 @@
# include <unistd.h> # include <unistd.h>
#endif #endif
#ifndef __VXWORKS__ // VxWorks uses Dinkum, not GNU STL with GCC
#if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0 #if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0
# define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx # define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx
# define BOOST_HAS_SLIST # define BOOST_HAS_SLIST
@ -91,6 +92,7 @@
# define BOOST_HASH_MAP_HEADER <backward/hash_map> # define BOOST_HASH_MAP_HEADER <backward/hash_map>
# endif # endif
#endif #endif
#endif
// //
// Decide whether we have C++11 support turned on: // Decide whether we have C++11 support turned on:

View File

@ -87,8 +87,10 @@
#endif #endif
#ifndef BOOST_GCC #ifndef BOOST_GCC
#define BOOST_GCC_WORKAROUND_GUARD 1 #define BOOST_GCC_WORKAROUND_GUARD 1
#define BOOST_GCC_VERSION_WORKAROUND_GUARD 1
#else #else
#define BOOST_GCC_WORKAROUND_GUARD 0 #define BOOST_GCC_WORKAROUND_GUARD 0
#define BOOST_GCC_VERSION_WORKAROUND_GUARD 0
#endif #endif
#ifndef BOOST_XLCPP_ZOS #ifndef BOOST_XLCPP_ZOS
#define BOOST_XLCPP_ZOS_WORKAROUND_GUARD 1 #define BOOST_XLCPP_ZOS_WORKAROUND_GUARD 1

View File

@ -19,7 +19,7 @@
// BOOST_VERSION / 100 % 1000 is the minor version // BOOST_VERSION / 100 % 1000 is the minor version
// BOOST_VERSION / 100000 is the major version // BOOST_VERSION / 100000 is the major version
#define BOOST_VERSION 106600 #define BOOST_VERSION 106700
// //
// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION // BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
@ -27,6 +27,6 @@
// number, y is the minor version number, and z is the patch level if not 0. // number, y is the minor version number, and z is the patch level if not 0.
// This is used by <config/auto_link.hpp> to select which library version to link to. // This is used by <config/auto_link.hpp> to select which library version to link to.
#define BOOST_LIB_VERSION "1_66" #define BOOST_LIB_VERSION "1_67"
#endif #endif

View File

@ -69,6 +69,7 @@ test-suite config
: #input-files : #input-files
: #requirements : #requirements
<exception-handling>off <exception-handling>off
<target-os>vxworks:<build>no # vx requires complete library rebuild to turn off exceptions
[ check-target-builds has_atomic_lib : <source>atomic ] [ check-target-builds has_atomic_lib : <source>atomic ]
[ check-target-builds has_pthread_lib : <source>pthread ] [ check-target-builds has_pthread_lib : <source>pthread ]
[ check-target-builds has_rt_lib : <source>rt ] [ check-target-builds has_rt_lib : <source>rt ]
@ -77,7 +78,9 @@ test-suite config
[ run config_info.cpp : : : <test-info>always_show_run_output <threading>single <toolset>msvc:<runtime-link>static <toolset>msvc:<link>static ] [ run config_info.cpp : : : <test-info>always_show_run_output <threading>single <toolset>msvc:<runtime-link>static <toolset>msvc:<link>static ]
[ run config_info.cpp : : : <test-info>always_show_run_output <threading>multi : config_info_threaded ] [ run config_info.cpp : : : <test-info>always_show_run_output <threading>multi : config_info_threaded ]
[ run config_info.cpp : : : <test-info>always_show_run_output <rtti>off : config_info_no_rtti ] [ run config_info.cpp : : : <test-info>always_show_run_output <rtti>off : config_info_no_rtti ]
[ run config_info.cpp : : : <test-info>always_show_run_output <exception-handling>off : config_info_no_except ] [ run config_info.cpp : : : <test-info>always_show_run_output <exception-handling>off
<target-os>vxworks:<build>no
: config_info_no_except ]
[ run math_info.cpp : : : <test-info>always_show_run_output <toolset>borland:<runtime-link>static <toolset>borland:<link>static ] [ run math_info.cpp : : : <test-info>always_show_run_output <toolset>borland:<runtime-link>static <toolset>borland:<link>static ]
[ run abi/abi_test.cpp abi/main.cpp ] [ run abi/abi_test.cpp abi/main.cpp ]
[ run limits_test.cpp ] [ run limits_test.cpp ]
@ -88,6 +91,7 @@ test-suite config
<runtime-link>shared <runtime-link>shared
<define>BOOST_DYN_LINK=1 <define>BOOST_DYN_LINK=1
<define>BOOST_CONFIG_NO_LIB=1 <define>BOOST_CONFIG_NO_LIB=1
<target-os>vxworks:<link>shared
: :
config_link_test config_link_test
] ]
@ -99,6 +103,8 @@ test-suite config
[ run cstdint_test2.cpp : : : <warnings>all <toolset>gcc:<cxxflags>"-Wno-long-long -Wextra" <toolset>darwin:<cxxflags>-Wno-long-long ] [ run cstdint_test2.cpp : : : <warnings>all <toolset>gcc:<cxxflags>"-Wno-long-long -Wextra" <toolset>darwin:<cxxflags>-Wno-long-long ]
[ compile cstdint_include_test.cpp : <warnings>all <toolset>gcc:<cxxflags>-Wextra ] [ compile cstdint_include_test.cpp : <warnings>all <toolset>gcc:<cxxflags>-Wextra ]
[ run config_build_check.cpp : : : [ requires int128 cxx11_constexpr cxx11_user_defined_literals ] ] [ run config_build_check.cpp : : : [ requires int128 cxx11_constexpr cxx11_user_defined_literals ] ]
[ run helper_macros_test.cpp ]
[ compile pragma_message_test.cpp ]
; ;
obj has_clang_implicit_fallthrough : cmd_line_check.cpp : obj has_clang_implicit_fallthrough : cmd_line_check.cpp :

View File

@ -28,6 +28,7 @@ template <class T>
int test_allocator(const T& i) int test_allocator(const T& i)
{ {
typedef std::allocator<int> alloc1_t; typedef std::allocator<int> alloc1_t;
#if !((__cplusplus > 201700) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700)))
typedef typename alloc1_t::size_type size_type; typedef typename alloc1_t::size_type size_type;
typedef typename alloc1_t::difference_type difference_type BOOST_UNUSED_ATTRIBUTE; typedef typename alloc1_t::difference_type difference_type BOOST_UNUSED_ATTRIBUTE;
typedef typename alloc1_t::pointer pointer; typedef typename alloc1_t::pointer pointer;
@ -35,9 +36,10 @@ int test_allocator(const T& i)
typedef typename alloc1_t::reference reference; typedef typename alloc1_t::reference reference;
typedef typename alloc1_t::const_reference const_reference; typedef typename alloc1_t::const_reference const_reference;
typedef typename alloc1_t::value_type value_type BOOST_UNUSED_ATTRIBUTE; typedef typename alloc1_t::value_type value_type BOOST_UNUSED_ATTRIBUTE;
#endif
alloc1_t a1; alloc1_t a1;
#if !((__cplusplus > 201700) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700)))
pointer p = a1.allocate(1); pointer p = a1.allocate(1);
const_pointer cp = p; const_pointer cp = p;
a1.construct(p,i); a1.construct(p,i);
@ -49,7 +51,7 @@ int test_allocator(const T& i)
if(cp != a1.address(cr)) return -1; if(cp != a1.address(cr)) return -1;
a1.destroy(p); a1.destroy(p);
a1.deallocate(p,1); a1.deallocate(p,1);
#endif
return 0; return 0;
} }

View File

@ -45,7 +45,11 @@ int test()
using std::is_trivially_copyable; using std::is_trivially_copyable;
using std::is_standard_layout; using std::is_standard_layout;
using std::is_pod; using std::is_pod;
#if !((__cplusplus > 201700) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700)))
// deprecated in C++ 17:
using std::is_literal_type; using std::is_literal_type;
using std::result_of;
#endif
using std::is_empty; using std::is_empty;
using std::is_polymorphic; using std::is_polymorphic;
using std::is_abstract; using std::is_abstract;
@ -99,7 +103,6 @@ int test()
using std::conditional; using std::conditional;
using std::common_type; using std::common_type;
using std::underlying_type; using std::underlying_type;
using std::result_of;
return 0; return 0;
} }

View File

@ -13,9 +13,16 @@
namespace boost_no_cxx17_iterator_traits { namespace boost_no_cxx17_iterator_traits {
struct iterator : struct iterator
public std::iterator< std::random_access_iterator_tag, char >
{ {
typedef std::random_access_iterator_tag iterator_category;
typedef char value_type;
typedef std::ptrdiff_t difference_type;
typedef char* pointer;
typedef char& reference;
reference operator*()const;
iterator operator++();
}; };
struct non_iterator {}; struct non_iterator {};
@ -37,11 +44,9 @@ struct has_iterator_category< Traits, typename void_type< typename Traits::itera
int test() int test()
{ {
if (!has_iterator_category< std::iterator_traits< boost_no_cxx17_iterator_traits::iterator > >::value) static_assert(has_iterator_category< std::iterator_traits< boost_no_cxx17_iterator_traits::iterator > >::value, "has_iterator_category failed");
return 1;
if (has_iterator_category< std::iterator_traits< boost_no_cxx17_iterator_traits::non_iterator > >::value) static_assert(!has_iterator_category< std::iterator_traits< boost_no_cxx17_iterator_traits::non_iterator > >::value, "has_iterator_category negative check failed");
return 2;
return 0; return 0;
} }

View File

@ -28,20 +28,33 @@ template <class T>
int test_allocator(const T& i) int test_allocator(const T& i)
{ {
typedef std::allocator<int> alloc1_t; typedef std::allocator<int> alloc1_t;
#if !((__cplusplus > 201700) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700)))
// stuff deprecated in C++17:
typedef typename alloc1_t::size_type size_type; typedef typename alloc1_t::size_type size_type;
typedef typename alloc1_t::difference_type difference_type BOOST_UNUSED_ATTRIBUTE; typedef typename alloc1_t::difference_type difference_type BOOST_UNUSED_ATTRIBUTE;
typedef typename alloc1_t::pointer pointer; typedef typename alloc1_t::pointer pointer;
typedef typename alloc1_t::const_pointer const_pointer; typedef typename alloc1_t::const_pointer const_pointer;
typedef typename alloc1_t::reference reference; typedef typename alloc1_t::reference reference;
typedef typename alloc1_t::const_reference const_reference; typedef typename alloc1_t::const_reference const_reference;
#endif
typedef typename alloc1_t::value_type value_type BOOST_UNUSED_ATTRIBUTE; typedef typename alloc1_t::value_type value_type BOOST_UNUSED_ATTRIBUTE;
typedef typename alloc1_t::BOOST_NESTED_TEMPLATE rebind<double> binder_t;
typedef typename binder_t::other alloc2_t;
alloc1_t a1; alloc1_t a1;
alloc1_t a2(a1); alloc1_t a2(a1);
#if !((__cplusplus > 201700) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700)))
// stuff deprecated in C++17:
typedef typename alloc1_t::BOOST_NESTED_TEMPLATE rebind<double> binder_t;
typedef typename binder_t::other alloc2_t;
alloc2_t a3(a1);
// this chokes early versions of the MSL library
// and isn't currently required by anything in boost
// so don't test for now...
// a3 = a2;
(void)a2;
#endif
#if !((__cplusplus > 201700) || (defined(_MSVC_LANG) && (_MSVC_LANG > 201700)))
pointer p = a1.allocate(1); pointer p = a1.allocate(1);
const_pointer cp = p; const_pointer cp = p;
a1.construct(p,i); a1.construct(p,i);
@ -52,15 +65,11 @@ int test_allocator(const T& i)
if(p != a1.address(r)) return -1; if(p != a1.address(r)) return -1;
if(cp != a1.address(cr)) return -1; if(cp != a1.address(cr)) return -1;
a1.destroy(p); a1.destroy(p);
#else
auto p = a1.allocate(1);
#endif
a1.deallocate(p,1); a1.deallocate(p,1);
alloc2_t a3(a1);
// this chokes early versions of the MSL library
// and isn't currently required by anything in boost
// so don't test for now...
// a3 = a2;
(void)a2;
return 0; return 0;
} }

View File

@ -143,19 +143,53 @@ void print_compiler_macros()
PRINT_MACRO(_WCHAR_T_DEFINED); PRINT_MACRO(_WCHAR_T_DEFINED);
#endif #endif
// MSVC macros: // MSVC macros:
PRINT_MACRO(_ALIGNED_NEW_SUPPORTED);
PRINT_MACRO(__ATOM__);
PRINT_MACRO(__AVX__);
PRINT_MACRO(__AVX2__);
PRINT_MACRO(_CHAR_UNSIGNED);
PRINT_MACRO(_CLR_VER);
PRINT_MACRO(_CONTROL_FLOW_GUARD);
PRINT_MACRO(__cplusplus_cli);
PRINT_MACRO(__cplusplus_winrt);
PRINT_MACRO(_CPPRTTI); PRINT_MACRO(_CPPRTTI);
PRINT_MACRO(_CPPUNWIND);
PRINT_MACRO(_DLL); PRINT_MACRO(_DLL);
PRINT_MACRO(_INLINE_VARIABLES_SUPPORTED);
PRINT_MACRO(_ISO_VOLATILE);
PRINT_MACRO(_M_AMD64);
PRINT_MACRO(_M_ARM);
PRINT_MACRO(_M_ARM_ARMV7VE);
PRINT_MACRO(_M_ARM_FP);
PRINT_MACRO(_M_ARM64);
PRINT_MACRO(_M_CEE);
PRINT_MACRO(_M_CEE_PURE);
PRINT_MACRO(_M_CEE_SAFE);
PRINT_MACRO(_M_FP_EXCEPT);
PRINT_MACRO(_M_FP_FAST);
PRINT_MACRO(_M_FP_PRECISE);
PRINT_MACRO(_M_FP_STRICT);
PRINT_MACRO(_M_IX86);
PRINT_MACRO(_M_IX86_FP);
PRINT_MACRO(_M_X64);
PRINT_MACRO(_M_ALPHA); PRINT_MACRO(_M_ALPHA);
PRINT_MACRO(_M_MPPC); PRINT_MACRO(_M_MPPC);
PRINT_MACRO(_M_MRX000); PRINT_MACRO(_M_MRX000);
PRINT_MACRO(_M_PPC); PRINT_MACRO(_M_PPC);
PRINT_MACRO(_MANAGED);
PRINT_MACRO(_MSC_BUILD);
PRINT_MACRO(_MFC_VER); PRINT_MACRO(_MFC_VER);
PRINT_MACRO(_MSC_EXTENSIONS); PRINT_MACRO(_MSC_EXTENSIONS);
PRINT_MACRO(_MSC_VER); PRINT_MACRO(_MSC_VER);
PRINT_MACRO(_MSC_FULL_VER); PRINT_MACRO(_MSC_FULL_VER);
PRINT_MACRO(_MSVC_LANG); PRINT_MACRO(_MSVC_LANG);
PRINT_MACRO(_MSVC_WARNING_LEVEL);
PRINT_MACRO(__MSVC_RUNTIME_CHECKS);
PRINT_MACRO(_MT); PRINT_MACRO(_MT);
PRINT_MACRO(_NATIVE_WCHAR_T_DEFINED); PRINT_MACRO(_NATIVE_WCHAR_T_DEFINED);
PRINT_MACRO(_NOEXCEPT_TYPES_SUPPORTED);
PRINT_MACRO(_OPENMP);
PRINT_MACRO(_PREFAST_);
// GNUC options: // GNUC options:
PRINT_MACRO(__GNUC__); PRINT_MACRO(__GNUC__);
PRINT_MACRO(__GNUC_MINOR__); PRINT_MACRO(__GNUC_MINOR__);
@ -581,10 +615,33 @@ void print_stdlib_macros()
#endif #endif
// Dinkumware options: // Dinkumware options:
PRINT_MACRO(_CPPLIB_VER); PRINT_MACRO(_CPPLIB_VER);
PRINT_MACRO(_MSVC_STL_VERSION); // VS2017 15.5+
PRINT_MACRO(_MSVC_STL_UPDATE); // VS2017 15.5+
PRINT_MACRO(_GLOBAL_USING); PRINT_MACRO(_GLOBAL_USING);
PRINT_MACRO(_HAS_EXCEPTIONS); PRINT_MACRO(_HAS_EXCEPTIONS);
PRINT_MACRO(_HAS_MEMBER_TEMPLATES_REBIND); PRINT_MACRO(_HAS_MEMBER_TEMPLATES_REBIND);
PRINT_MACRO(_HAS_TEMPLATE_PARTIAL_ORDERING); PRINT_MACRO(_HAS_TEMPLATE_PARTIAL_ORDERING);
// https://blogs.msdn.microsoft.com/vcblog/2016/08/12/stl-fixes-in-vs-2015-update-3/
PRINT_MACRO(_HAS_CXX17);
PRINT_MACRO(_HAS_AUTO_PTR_ETC);
PRINT_MACRO(_HAS_OLD_IOSTREAMS_MEMBERS);
PRINT_MACRO(_HAS_FUNCTION_ASSIGN);
PRINT_MACRO(_HAS_TR1_NAMESPACE);
PRINT_MACRO(_HAS_IDENTITY_STRUCT);
// VS2017 15.5+
PRINT_MACRO(_HAS_STATIC_RTTI);
PRINT_MACRO(_HAS_UNEXPECTED);
PRINT_MACRO(_HAS_STD_BYTE);
PRINT_MACRO(_HAS_FUNCTION_ALLOCATOR_SUPPORT);
PRINT_MACRO(_HAS_TR2_SYS_NAMESPACE);
PRINT_MACRO(_ENFORCE_MATCHING_ALLOCATORS);
PRINT_MACRO(_HAS_HAS_UNIQUE_OBJECT_REPRESENTATIONS);
PRINT_MACRO(_HAS_INLINE_VARIABLES);
PRINT_MACRO(_HAS_ALIGNED_NEW);
PRINT_MACRO(_HAS_NOEXCEPT_FUNCTION_TYPES);
PRINT_MACRO(_ITERATOR_DEBUG_LEVEL);
PRINT_MACRO(_HAS_ITERATOR_DEBUGGING);
PRINT_MACRO(_ITERATOR_DEBUG_ARRAY_OVERLOADS);
// Libc++: // Libc++:
PRINT_MACRO(_LIBCPP_VERSION); PRINT_MACRO(_LIBCPP_VERSION);
// STLPort and generic SGI STL options: // STLPort and generic SGI STL options:
@ -764,6 +821,7 @@ void print_stdlib_macros()
PRINT_MACRO(_GLIBCXX_MEM_LIMITS); PRINT_MACRO(_GLIBCXX_MEM_LIMITS);
PRINT_MACRO(_GLIBCXX_HOSTED); PRINT_MACRO(_GLIBCXX_HOSTED);
PRINT_MACRO(_GLIBCXX_SJLJ_EXCEPTIONS); PRINT_MACRO(_GLIBCXX_SJLJ_EXCEPTIONS);
PRINT_MACRO(_GLIBCXX_RELEASE);
// Modena C++ standard library // Modena C++ standard library
PRINT_MACRO(MSIPL_ANSI_HEADER); PRINT_MACRO(MSIPL_ANSI_HEADER);
@ -1146,6 +1204,8 @@ void print_boost_macros()
PRINT_MACRO(BOOST_INTEL); PRINT_MACRO(BOOST_INTEL);
PRINT_MACRO(BOOST_MSVC); PRINT_MACRO(BOOST_MSVC);
PRINT_MACRO(BOOST_GCC);
PRINT_MACRO(BOOST_LIBSTDCXX_VERSION);
PRINT_MACRO(BOOST_STD_EXTENSION_NAMESPACE); PRINT_MACRO(BOOST_STD_EXTENSION_NAMESPACE);
PRINT_MACRO(BOOST_UNREACHABLE_RETURN(0)); PRINT_MACRO(BOOST_UNREACHABLE_RETURN(0));
PRINT_MACRO(BOOST_CONSTEXPR); PRINT_MACRO(BOOST_CONSTEXPR);
@ -1159,6 +1219,65 @@ void print_boost_macros()
PRINT_MACRO(BOOST_NO_MAY_ALIAS); PRINT_MACRO(BOOST_NO_MAY_ALIAS);
} }
void print_sd6_macros()
{
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0096r5.html
// C++17:
PRINT_MACRO(__cpp_hex_float);
PRINT_MACRO(__cpp_inline_variables);
PRINT_MACRO(__cpp_aligned_new);
PRINT_MACRO(__cpp_guaranteed_copy_elision);
PRINT_MACRO(__cpp_noexcept_function_type);
PRINT_MACRO(__cpp_fold_expressions);
PRINT_MACRO(__cpp_capture_star_this);
PRINT_MACRO(__cpp_constexpr);
PRINT_MACRO(__cpp_if_constexpr);
PRINT_MACRO(__cpp_range_based_for);
PRINT_MACRO(__cpp_static_assert);
PRINT_MACRO(__cpp_deduction_guides);
PRINT_MACRO(__cpp_nontype_template_parameter_auto);
PRINT_MACRO(__cpp_namespace_attributes);
PRINT_MACRO(__cpp_enumerator_attributes);
PRINT_MACRO(__cpp_inheriting_constructors);
PRINT_MACRO(__cpp_variadic_using);
PRINT_MACRO(__cpp_structured_bindings);
PRINT_MACRO(__cpp_aggregate_bases);
PRINT_MACRO(__cpp_nontype_template_args);
PRINT_MACRO(__cpp_template_template_args);
// C++14:
PRINT_MACRO(__cpp_binary_literals);
PRINT_MACRO(__cpp_init_captures);
PRINT_MACRO(__cpp_generic_lambdas);
PRINT_MACRO(__cpp_sized_deallocation);
PRINT_MACRO(__cpp_decltype_auto);
PRINT_MACRO(__cpp_return_type_deduction);
PRINT_MACRO(__cpp_aggregate_nsdmi);
PRINT_MACRO(__cpp_variable_templates);
// C++11:
PRINT_MACRO(__cpp_unicode_characters);
PRINT_MACRO(__cpp_raw_strings);
PRINT_MACRO(__cpp_unicode_literals);
PRINT_MACRO(__cpp_user_defined_literals);
PRINT_MACRO(__cpp_threadsafe_static_init);
PRINT_MACRO(__cpp_lambdas);
PRINT_MACRO(__cpp_decltype);
PRINT_MACRO(__cpp_attributes);
PRINT_MACRO(__cpp_rvalue_references);
PRINT_MACRO(__cpp_variadic_templates);
PRINT_MACRO(__cpp_initializer_lists);
PRINT_MACRO(__cpp_delegating_constructors);
PRINT_MACRO(__cpp_nsdmi);
PRINT_MACRO(__cpp_ref_qualifiers);
PRINT_MACRO(__cpp_alias_templates);
// C++98:
PRINT_MACRO(__cpp_rtti);
PRINT_MACRO(__cpp_exceptions);
}
void print_separator() void print_separator()
{ {
std::cout << std::cout <<
@ -1176,6 +1295,8 @@ int main()
print_platform_macros(); print_platform_macros();
print_separator(); print_separator();
print_boost_macros(); print_boost_macros();
print_separator();
print_sd6_macros();
return 0; return 0;
} }

View File

@ -0,0 +1,30 @@
// Copyright 2017 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
#include <boost/config/helper_macros.hpp>
#include <boost/core/lightweight_test.hpp>
int main()
{
#define X pumpkin
BOOST_TEST_CSTR_EQ( BOOST_STRINGIZE(X), "pumpkin" );
BOOST_TEST_CSTR_EQ( BOOST_STRINGIZE(__LINE__), "16" );
#define Y 2
int BOOST_JOIN(X, Y) = 0;
(void)pumpkin2;
int BOOST_JOIN(X, __LINE__) = 0;
(void)pumpkin23;
BOOST_TEST_CSTR_EQ( BOOST_STRINGIZE(BOOST_JOIN(X, Y)), "pumpkin2" );
BOOST_TEST_CSTR_EQ( BOOST_STRINGIZE(BOOST_JOIN(X, __LINE__)), "pumpkin27" );
return boost::report_errors();
}

View File

@ -0,0 +1,18 @@
// Copyright 2017 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
#include <boost/config/pragma_message.hpp>
BOOST_PRAGMA_MESSAGE("first message")
#define MSG2 "second message"
BOOST_PRAGMA_MESSAGE(MSG2)
#include <boost/config.hpp> // BOOST_STRINGIZE
#define MSG3 third message
BOOST_PRAGMA_MESSAGE(BOOST_STRINGIZE(MSG3))