From 3e8b6f5322bd290b097d2ae8cbdfa1939cfdf7aa Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 14 Jun 2016 18:37:24 +0100 Subject: [PATCH 1/6] Move files into standard directory structure. --- example/Jamfile.v2 | 20 +++++++++++++ .../static_assert_example_1.cpp | 0 .../static_assert_example_2.cpp | 0 .../static_assert_example_3.cpp | 0 test/Jamfile.v2 | 30 +++++++++++++++++++ .../static_assert_test.cpp | 0 .../static_assert_test_fail_1.cpp | 0 .../static_assert_test_fail_10.cpp | 0 .../static_assert_test_fail_2.cpp | 0 .../static_assert_test_fail_3.cpp | 0 .../static_assert_test_fail_4.cpp | 0 .../static_assert_test_fail_5.cpp | 0 .../static_assert_test_fail_6.cpp | 0 .../static_assert_test_fail_7.cpp | 0 .../static_assert_test_fail_8.cpp | 0 .../static_assert_test_fail_9.cpp | 0 16 files changed, 50 insertions(+) create mode 100644 example/Jamfile.v2 rename static_assert_example_1.cpp => example/static_assert_example_1.cpp (100%) rename static_assert_example_2.cpp => example/static_assert_example_2.cpp (100%) rename static_assert_example_3.cpp => example/static_assert_example_3.cpp (100%) create mode 100644 test/Jamfile.v2 rename static_assert_test.cpp => test/static_assert_test.cpp (100%) rename static_assert_test_fail_1.cpp => test/static_assert_test_fail_1.cpp (100%) rename static_assert_test_fail_10.cpp => test/static_assert_test_fail_10.cpp (100%) rename static_assert_test_fail_2.cpp => test/static_assert_test_fail_2.cpp (100%) rename static_assert_test_fail_3.cpp => test/static_assert_test_fail_3.cpp (100%) rename static_assert_test_fail_4.cpp => test/static_assert_test_fail_4.cpp (100%) rename static_assert_test_fail_5.cpp => test/static_assert_test_fail_5.cpp (100%) rename static_assert_test_fail_6.cpp => test/static_assert_test_fail_6.cpp (100%) rename static_assert_test_fail_7.cpp => test/static_assert_test_fail_7.cpp (100%) rename static_assert_test_fail_8.cpp => test/static_assert_test_fail_8.cpp (100%) rename static_assert_test_fail_9.cpp => test/static_assert_test_fail_9.cpp (100%) diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 new file mode 100644 index 0000000..0f3c356 --- /dev/null +++ b/example/Jamfile.v2 @@ -0,0 +1,20 @@ +# copyright John Maddock 2003 +# Use, modification and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file +# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# bring in the rules for testing +import testing ; + +test-suite static_assert : +# [ run static_assert_example_1.cpp ] + [ run static_assert_example_2.cpp ] + [ run static_assert_example_3.cpp ] +; + + + + + + + diff --git a/static_assert_example_1.cpp b/example/static_assert_example_1.cpp similarity index 100% rename from static_assert_example_1.cpp rename to example/static_assert_example_1.cpp diff --git a/static_assert_example_2.cpp b/example/static_assert_example_2.cpp similarity index 100% rename from static_assert_example_2.cpp rename to example/static_assert_example_2.cpp diff --git a/static_assert_example_3.cpp b/example/static_assert_example_3.cpp similarity index 100% rename from static_assert_example_3.cpp rename to example/static_assert_example_3.cpp diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 new file mode 100644 index 0000000..acb28e7 --- /dev/null +++ b/test/Jamfile.v2 @@ -0,0 +1,30 @@ +# copyright John Maddock 2003 +# Use, modification and distribution are subject to the +# Boost Software License, Version 1.0. (See accompanying file +# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +# bring in the rules for testing +import testing ; + +test-suite static_assert : + [ run static_assert_test.cpp ] + [ compile-fail static_assert_test_fail_1.cpp ] + [ compile-fail static_assert_test_fail_2.cpp ] + [ compile-fail static_assert_test_fail_3.cpp ] + [ compile-fail static_assert_test_fail_4.cpp ] + [ compile-fail static_assert_test_fail_5.cpp ] + [ compile-fail static_assert_test_fail_6.cpp ] + [ compile-fail static_assert_test_fail_7.cpp ] + [ compile-fail static_assert_test_fail_8.cpp ] + [ compile-fail static_assert_test_fail_9.cpp ] + [ compile-fail static_assert_test_fail_10.cpp ] +; + +build-project ../example ; + + + + + + + diff --git a/static_assert_test.cpp b/test/static_assert_test.cpp similarity index 100% rename from static_assert_test.cpp rename to test/static_assert_test.cpp diff --git a/static_assert_test_fail_1.cpp b/test/static_assert_test_fail_1.cpp similarity index 100% rename from static_assert_test_fail_1.cpp rename to test/static_assert_test_fail_1.cpp diff --git a/static_assert_test_fail_10.cpp b/test/static_assert_test_fail_10.cpp similarity index 100% rename from static_assert_test_fail_10.cpp rename to test/static_assert_test_fail_10.cpp diff --git a/static_assert_test_fail_2.cpp b/test/static_assert_test_fail_2.cpp similarity index 100% rename from static_assert_test_fail_2.cpp rename to test/static_assert_test_fail_2.cpp diff --git a/static_assert_test_fail_3.cpp b/test/static_assert_test_fail_3.cpp similarity index 100% rename from static_assert_test_fail_3.cpp rename to test/static_assert_test_fail_3.cpp diff --git a/static_assert_test_fail_4.cpp b/test/static_assert_test_fail_4.cpp similarity index 100% rename from static_assert_test_fail_4.cpp rename to test/static_assert_test_fail_4.cpp diff --git a/static_assert_test_fail_5.cpp b/test/static_assert_test_fail_5.cpp similarity index 100% rename from static_assert_test_fail_5.cpp rename to test/static_assert_test_fail_5.cpp diff --git a/static_assert_test_fail_6.cpp b/test/static_assert_test_fail_6.cpp similarity index 100% rename from static_assert_test_fail_6.cpp rename to test/static_assert_test_fail_6.cpp diff --git a/static_assert_test_fail_7.cpp b/test/static_assert_test_fail_7.cpp similarity index 100% rename from static_assert_test_fail_7.cpp rename to test/static_assert_test_fail_7.cpp diff --git a/static_assert_test_fail_8.cpp b/test/static_assert_test_fail_8.cpp similarity index 100% rename from static_assert_test_fail_8.cpp rename to test/static_assert_test_fail_8.cpp diff --git a/static_assert_test_fail_9.cpp b/test/static_assert_test_fail_9.cpp similarity index 100% rename from static_assert_test_fail_9.cpp rename to test/static_assert_test_fail_9.cpp From d0967cbf65a471bc1592a8daf2541c113815a73c Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 14 Jun 2016 18:39:54 +0100 Subject: [PATCH 2/6] Fix doc directory paths. --- doc/static_assert.qbk | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/static_assert.qbk b/doc/static_assert.qbk index 2fab4d9..643591a 100644 --- a/doc/static_assert.qbk +++ b/doc/static_assert.qbk @@ -222,19 +222,19 @@ working at namespace, function, and class scope outweighed the ugliness of a mac [table Test programs provided with static_assert [[Test Program][Expected to Compile][Description]] -[[[@../../libs/static_assert/static_assert_test.cpp static_assert_test.cpp]] [Yes] [Illustrates usage, and should always compile, really just tests compiler compatibility.]] -[[[@../../libs/static_assert/static_assert_example_1.cpp static_assert_example_1.cpp]] [Platform dependent.] [Namespace scope test program, may compile depending upon the platform. ]] -[[[@../../libs/static_assert/static_assert_example_2.cpp static_assert_example_2.cpp]] [Yes] [Function scope test program. ]] -[[[@../../libs/static_assert/static_assert_example_3.cpp static_assert_example_3.cpp]] [Yes] [Class scope test program. ]] -[[[@../../libs/static_assert/static_assert_test_fail_1.cpp static_assert_test_fail_1.cpp]] [No] [Illustrates failure at namespace scope. ]] -[[[@../../libs/static_assert/static_assert_test_fail_2.cpp static_assert_test_fail_2.cpp]] [No] [Illustrates failure at non-template function scope. ]] -[[[@../../libs/static_assert/static_assert_test_fail_3.cpp static_assert_test_fail_3.cpp]] [No] [Illustrates failure at non-template class scope. ]] -[[[@../../libs/static_assert/static_assert_test_fail_4.cpp static_assert_test_fail_4.cpp]] [No] [Illustrates failure at non-template class scope. ]] -[[[@../../libs/static_assert/static_assert_test_fail_5.cpp static_assert_test_fail_5.cpp]] [No] [Illustrates failure at template class scope. ]] -[[[@../../libs/static_assert/static_assert_test_fail_6.cpp static_assert_test_fail_6.cpp]] [No] [Illustrates failure at template class member function scope. ]] -[[[@../../libs/static_assert/static_assert_test_fail_7.cpp static_assert_test_fail_7.cpp]] [No] [Illustrates failure of class scope example. ]] -[[[@../../libs/static_assert/static_assert_test_fail_8.cpp static_assert_test_fail_8.cpp]] [No] [Illustrates failure of function scope example. ]] -[[[@../../libs/static_assert/static_assert_test_fail_9.cpp static_assert_test_fail_9.cpp]] [No] [Illustrates failure of function scope example (part 2). ]] +[[[@../../libs/static_assert/example/static_assert_example_1.cpp static_assert_example_1.cpp]] [Platform dependent.] [Namespace scope test program, may compile depending upon the platform. ]] +[[[@../../libs/static_assert/example/static_assert_example_2.cpp static_assert_example_2.cpp]] [Yes] [Function scope test program. ]] +[[[@../../libs/static_assert/example/static_assert_example_3.cpp static_assert_example_3.cpp]] [Yes] [Class scope test program. ]] +[[[@../../libs/static_assert/test/static_assert_test.cpp static_assert_test.cpp]] [Yes] [Illustrates usage, and should always compile, really just tests compiler compatibility.]] +[[[@../../libs/static_assert/test/static_assert_test_fail_1.cpp static_assert_test_fail_1.cpp]] [No] [Illustrates failure at namespace scope. ]] +[[[@../../libs/static_assert/test/static_assert_test_fail_2.cpp static_assert_test_fail_2.cpp]] [No] [Illustrates failure at non-template function scope. ]] +[[[@../../libs/static_assert/test/static_assert_test_fail_3.cpp static_assert_test_fail_3.cpp]] [No] [Illustrates failure at non-template class scope. ]] +[[[@../../libs/static_assert/test/static_assert_test_fail_4.cpp static_assert_test_fail_4.cpp]] [No] [Illustrates failure at non-template class scope. ]] +[[[@../../libs/static_assert/test/static_assert_test_fail_5.cpp static_assert_test_fail_5.cpp]] [No] [Illustrates failure at template class scope. ]] +[[[@../../libs/static_assert/test/static_assert_test_fail_6.cpp static_assert_test_fail_6.cpp]] [No] [Illustrates failure at template class member function scope. ]] +[[[@../../libs/static_assert/test/static_assert_test_fail_7.cpp static_assert_test_fail_7.cpp]] [No] [Illustrates failure of class scope example. ]] +[[[@../../libs/static_assert/test/static_assert_test_fail_8.cpp static_assert_test_fail_8.cpp]] [No] [Illustrates failure of function scope example. ]] +[[[@../../libs/static_assert/test/static_assert_test_fail_9.cpp static_assert_test_fail_9.cpp]] [No] [Illustrates failure of function scope example (part 2). ]] ] From 0d27f7bcf621a6fb9ba639e21fab6216442bee23 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 14 Jun 2016 18:43:24 +0100 Subject: [PATCH 3/6] temporarily fix up paths until we can delete this file. --- Jamfile.v2 | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/Jamfile.v2 b/Jamfile.v2 index 14dfe2f..7c0a96b 100644 --- a/Jamfile.v2 +++ b/Jamfile.v2 @@ -6,26 +6,4 @@ # bring in the rules for testing import testing ; -test-suite static_assert : - [ run static_assert_test.cpp ] -# [ run static_assert_example_1.cpp ] - [ run static_assert_example_2.cpp ] - [ run static_assert_example_3.cpp ] - [ compile-fail static_assert_test_fail_1.cpp ] - [ compile-fail static_assert_test_fail_2.cpp ] - [ compile-fail static_assert_test_fail_3.cpp ] - [ compile-fail static_assert_test_fail_4.cpp ] - [ compile-fail static_assert_test_fail_5.cpp ] - [ compile-fail static_assert_test_fail_6.cpp ] - [ compile-fail static_assert_test_fail_7.cpp ] - [ compile-fail static_assert_test_fail_8.cpp ] - [ compile-fail static_assert_test_fail_9.cpp ] - [ compile-fail static_assert_test_fail_10.cpp ] -; - - - - - - - +build-project test ; \ No newline at end of file From c2f58a187a67502a20aaa14c88625f12e400c5c1 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 7 Oct 2016 23:07:36 -0500 Subject: [PATCH 4/6] Add, and update, documentation build targets. --- doc/Jamfile.v2 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index 1f8565d..e32225b 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -37,3 +37,13 @@ boostbook standalone pdf:admon.graphics.path=$(boost-images)/ pdf:boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html ; + +############################################################################### +alias boostdoc + : static_assert + : + : + : ; +explicit boostdoc ; +alias boostrelease ; +explicit boostrelease ; From 662ecd3d9fdb4cbde1759703e5c40f9b9c732220 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 16 May 2017 18:17:17 +0100 Subject: [PATCH 5/6] Add .travis.yml --- .travis.yml | 327 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 327 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..aa2e1df --- /dev/null +++ b/.travis.yml @@ -0,0 +1,327 @@ +# Copyright 2016, 2017 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 + +sudo: false + +python: "2.7" + +os: + - linux + - osx + +branches: + only: + - master + - develop + +env: + matrix: + - BOGUS_JOB=true + +matrix: + + exclude: + - env: BOGUS_JOB=true + + include: + - os: linux + env: TOOLSET=gcc COMPILER=g++ CXXSTD=c++03 + + - os: linux + env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=c++03 + addons: + apt: + packages: + - g++-4.7 + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=c++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: + apt: + packages: + - g++-4.8 + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=c++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: + apt: + packages: + - g++-4.9 + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=c++11 + addons: + apt: + packages: + - g++-4.9 + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++03 + addons: + apt: + packages: + - g++-5 + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=c++11 + 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: + apt: + packages: + - g++-6 + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++11 + addons: + apt: + packages: + - g++-6 + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++14 + addons: + apt: + packages: + - g++-6 + sources: + - ubuntu-toolchain-r-test + + - os: linux + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=c++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: + apt: + packages: + - clang-3.5 + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-precise-3.5 + + - os: linux + env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=c++11 + 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: + apt: + packages: + - clang-3.6 + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-precise-3.6 + + - os: linux + env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=c++11 + 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: + apt: + packages: + - clang-3.7 + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-precise-3.7 + + - os: linux + env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=c++11 + 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: + 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++11 + 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: + apt: + packages: + - clang-3.9 + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-precise-3.9 + + - os: linux + env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=c++11 + addons: + apt: + packages: + - clang-3.9 + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-precise-3.9 + + - os: linux + env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=c++14 + addons: + apt: + packages: + - clang-3.9 + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-precise-3.9 + + - 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 + env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++03 + + - os: osx + env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++11 + + - os: osx + env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++14 + + - os: osx + env: TOOLSET=clang COMPILER=clang++ CXXSTD=c++1z + +install: + - cd .. + - git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + - cd boost-root + - git submodule update --init tools/build + - git submodule update --init libs/config + - git submodule update --init tools/boostdep + - cp -r $TRAVIS_BUILD_DIR/* libs/static_assert + - python tools/boostdep/depinst/depinst.py static_assert + - ./bootstrap.sh + - ./b2 headers + +script: + - |- + echo "using $TOOLSET : : $COMPILER : -std=$CXXSTD ;" > ~/user-config.jam + - ./b2 libs/static_assert/test toolset=$TOOLSET + +notifications: + email: + on_success: always From b91e4747ceded6e8585e5c9e91f39930b02f9c56 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Tue, 25 Sep 2018 18:25:26 +0100 Subject: [PATCH 6/6] Move header dependencies around - to try to fix a clang-3.x issue with ::gets not found when compiling std lib header. --- example/static_assert_example_2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/static_assert_example_2.cpp b/example/static_assert_example_2.cpp index a32b79d..38a284b 100644 --- a/example/static_assert_example_2.cpp +++ b/example/static_assert_example_2.cpp @@ -5,11 +5,11 @@ // See http://www.boost.org for most recent version including documentation. +#include +#include #include #include #include -#include -#include template RandomAccessIterator foo(RandomAccessIterator from, RandomAccessIterator /*to*/)