From 79e39d9d4351735f6bea1632fda1810e9cb6508f Mon Sep 17 00:00:00 2001 From: Daniel James Date: Fri, 1 Jul 2016 11:12:29 +0100 Subject: [PATCH 1/3] Copy build changes from the develop branch. --- .travis.yml | 4 +-- test/Jamfile.v2 | 73 +++++++++++++++++++++++++++++++++++++-- test/exception/Jamfile.v2 | 29 ---------------- test/unordered/Jamfile.v2 | 63 --------------------------------- 4 files changed, 73 insertions(+), 96 deletions(-) delete mode 100644 test/exception/Jamfile.v2 delete mode 100644 test/unordered/Jamfile.v2 diff --git a/.travis.yml b/.travis.yml index a005cd16..732a983f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,9 +27,9 @@ matrix: before_script: - | - echo "using gcc : : g++-4.8 ;" > ~/user-config.jam + echo "using gcc : : g++-4.8 --std=c++03 ;" > ~/user-config.jam echo "using gcc : std11 : g++-4.8 --std=c++11 ;" >> ~/user-config.jam - echo "using clang : : clang++ ;" >> ~/user-config.jam + echo "using clang : : clang++ --std=c++03 ;" >> ~/user-config.jam echo "using clang : std11 : clang++ --std=c++11 ;" >> ~/user-config.jam - cat ~/user-config.jam - touch Jamroot.jam diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index a6ab923c..6f844095 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -5,5 +5,74 @@ import testing ; -build-project unordered ; -build-project exception ; +project unordered-test/unordered + : requirements + all + intel:on + # Would be nice to define -Wundef, but I'm getting warnings from + # Boost.Preprocessor on trunk. + gcc:"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow -Wno-long-long" + darwin:"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow" + ; + +#alias framework : /boost/test//boost_unit_test_framework ; +alias framework : ; + +test-suite unordered + : + [ run unordered/fwd_set_test.cpp ] + [ run unordered/fwd_map_test.cpp ] + [ run unordered/allocator_traits.cpp ] + [ run unordered/minimal_allocator.cpp ] + [ run unordered/compile_set.cpp ] + [ run unordered/compile_map.cpp ] + [ run unordered/noexcept_tests.cpp ] + [ run unordered/link_test_1.cpp unordered/link_test_2.cpp ] + [ run unordered/incomplete_test.cpp ] + [ run unordered/simple_tests.cpp ] + [ run unordered/equivalent_keys_tests.cpp ] + [ run unordered/constructor_tests.cpp ] + [ run unordered/copy_tests.cpp ] + [ run unordered/move_tests.cpp ] + [ run unordered/assign_tests.cpp ] + [ run unordered/insert_tests.cpp ] + [ run unordered/insert_stable_tests.cpp ] + [ run unordered/unnecessary_copy_tests.cpp ] + [ run unordered/erase_tests.cpp ] + [ run unordered/erase_equiv_tests.cpp ] + [ run unordered/find_tests.cpp ] + [ run unordered/at_tests.cpp ] + [ run unordered/bucket_tests.cpp ] + [ run unordered/load_factor_tests.cpp ] + [ run unordered/rehash_tests.cpp ] + [ run unordered/equality_tests.cpp ] + [ run unordered/swap_tests.cpp ] + + [ run unordered/compile_set.cpp : : + : BOOST_UNORDERED_USE_MOVE + : bmove_compile_set ] + [ run unordered/compile_map.cpp : : + : BOOST_UNORDERED_USE_MOVE + : bmove_compile_map ] + [ run unordered/copy_tests.cpp : : + : BOOST_UNORDERED_USE_MOVE + : bmove_copy ] + [ run unordered/move_tests.cpp : : + : BOOST_UNORDERED_USE_MOVE + : bmove_move ] + [ run unordered/assign_tests.cpp : : + : BOOST_UNORDERED_USE_MOVE + : bmove_assign ] + ; + +test-suite unordered-exception + : + [ run exception/constructor_exception_tests.cpp framework ] + [ run exception/copy_exception_tests.cpp framework ] + [ run exception/assign_exception_tests.cpp framework ] + [ run exception/insert_exception_tests.cpp framework ] + [ run exception/erase_exception_tests.cpp framework ] + [ run exception/rehash_exception_tests.cpp framework ] + [ run exception/swap_exception_tests.cpp framework : : : + BOOST_UNORDERED_SWAP_METHOD=2 ] + ; diff --git a/test/exception/Jamfile.v2 b/test/exception/Jamfile.v2 deleted file mode 100644 index c5d6f403..00000000 --- a/test/exception/Jamfile.v2 +++ /dev/null @@ -1,29 +0,0 @@ - -# Copyright 2006-2008 Daniel James. -# 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) - -import testing ; - -#alias framework : /boost/test//boost_unit_test_framework ; -alias framework : ; - -project unordered-test/exception-tests - : requirements - all - intel:on - gcc:"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow -Wno-long-long" - darwin:"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow" - ; - -test-suite unordered-exception - : - [ run constructor_exception_tests.cpp framework ] - [ run copy_exception_tests.cpp framework ] - [ run assign_exception_tests.cpp framework ] - [ run insert_exception_tests.cpp framework ] - [ run erase_exception_tests.cpp framework ] - [ run rehash_exception_tests.cpp framework ] - [ run swap_exception_tests.cpp framework : : : - BOOST_UNORDERED_SWAP_METHOD=2 ] - ; diff --git a/test/unordered/Jamfile.v2 b/test/unordered/Jamfile.v2 deleted file mode 100644 index 460ef135..00000000 --- a/test/unordered/Jamfile.v2 +++ /dev/null @@ -1,63 +0,0 @@ - -# Copyright 2006-2008 Daniel James. -# 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) - -import testing ; - -project unordered-test/unordered - : requirements - all - intel:on - # Would be nice to define -Wundef, but I'm getting warnings from - # Boost.Preprocessor on trunk. - gcc:"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow -Wno-long-long" - darwin:"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow" - ; - -test-suite unordered - : - [ run fwd_set_test.cpp ] - [ run fwd_map_test.cpp ] - [ run allocator_traits.cpp ] - [ run minimal_allocator.cpp ] - [ run compile_set.cpp ] - [ run compile_map.cpp ] - [ run noexcept_tests.cpp ] - [ run link_test_1.cpp link_test_2.cpp ] - [ run incomplete_test.cpp ] - [ run simple_tests.cpp ] - [ run equivalent_keys_tests.cpp ] - [ run constructor_tests.cpp ] - [ run copy_tests.cpp ] - [ run move_tests.cpp ] - [ run assign_tests.cpp ] - [ run insert_tests.cpp ] - [ run insert_stable_tests.cpp ] - [ run unnecessary_copy_tests.cpp ] - [ run erase_tests.cpp ] - [ run erase_equiv_tests.cpp ] - [ run find_tests.cpp ] - [ run at_tests.cpp ] - [ run bucket_tests.cpp ] - [ run load_factor_tests.cpp ] - [ run rehash_tests.cpp ] - [ run equality_tests.cpp ] - [ run swap_tests.cpp ] - - [ run compile_set.cpp : : - : BOOST_UNORDERED_USE_MOVE - : bmove_compile_set ] - [ run compile_map.cpp : : - : BOOST_UNORDERED_USE_MOVE - : bmove_compile_map ] - [ run copy_tests.cpp : : - : BOOST_UNORDERED_USE_MOVE - : bmove_copy ] - [ run move_tests.cpp : : - : BOOST_UNORDERED_USE_MOVE - : bmove_move ] - [ run assign_tests.cpp : : - : BOOST_UNORDERED_USE_MOVE - : bmove_assign ] - ; From 8f51dc6082982467e38362454e001d64f60c728d Mon Sep 17 00:00:00 2001 From: Daniel James Date: Wed, 17 Aug 2016 12:08:16 +0100 Subject: [PATCH 2/3] Fix some test warnings. And turn on warnings as errors in Travis. --- .travis.yml | 8 ++++---- test/Jamfile.v2 | 1 + test/exception/rehash_exception_tests.cpp | 4 ++-- test/exception/swap_exception_tests.cpp | 4 ++-- test/objects/cxx11_allocator.hpp | 2 +- test/objects/exception.hpp | 4 ++-- test/objects/minimal.hpp | 4 ++-- test/objects/test.hpp | 4 ++-- test/unordered/allocator_traits.cpp | 8 ++++---- test/unordered/at_tests.cpp | 1 - test/unordered/minimal_allocator.cpp | 2 +- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6f98b329..e6c0c766 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,10 +27,10 @@ matrix: before_script: - | - echo "using gcc : : g++-4.8 --std=c++03 -fsanitize=address ;" > ~/user-config.jam - echo "using gcc : std11 : g++-4.8 --std=c++11 -fsanitize=address ;" >> ~/user-config.jam - echo "using clang : : clang++ --std=c++03 -fsanitize=address ;" >> ~/user-config.jam - echo "using clang : std11 : clang++ --std=c++11 -fsanitize=address ;" >> ~/user-config.jam + echo "using gcc : : g++-4.8 -Werror --std=c++03 -fsanitize=address ;" > ~/user-config.jam + echo "using gcc : std11 : g++-4.8 -Werror --std=c++11 -fsanitize=address ;" >> ~/user-config.jam + echo "using clang : : clang++ -Werror --std=c++03 -fsanitize=address ;" >> ~/user-config.jam + echo "using clang : std11 : clang++ -Werror --std=c++11 -fsanitize=address ;" >> ~/user-config.jam - cat ~/user-config.jam - touch Jamroot.jam diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 6f844095..2803eabc 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -13,6 +13,7 @@ project unordered-test/unordered # Boost.Preprocessor on trunk. gcc:"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow -Wno-long-long" darwin:"-pedantic -Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter -Wconversion -Wfloat-equal -Wshadow" + clang:"-pedantic -Wextra -Wno-long-long" ; #alias framework : /boost/test//boost_unit_test_framework ; diff --git a/test/exception/rehash_exception_tests.cpp b/test/exception/rehash_exception_tests.cpp index ad5c6193..0163bfec 100644 --- a/test/exception/rehash_exception_tests.cpp +++ b/test/exception/rehash_exception_tests.cpp @@ -18,8 +18,8 @@ struct rehash_test_base : public test::exception_base { test::random_values values; unsigned int n; - rehash_test_base(unsigned int count = 100, unsigned int n = 0) - : values(count), n(n) + rehash_test_base(unsigned int count = 100, unsigned int n_ = 0) + : values(count), n(n_) {} typedef T data_type; diff --git a/test/exception/swap_exception_tests.cpp b/test/exception/swap_exception_tests.cpp index 623a0fce..5e1cd084 100644 --- a/test/exception/swap_exception_tests.cpp +++ b/test/exception/swap_exception_tests.cpp @@ -66,8 +66,8 @@ struct swap_base : public test::exception_base {} struct data_type { - data_type(T const& x, T const& y) - : x(x), y(y) {} + data_type(T const& x_, T const& y_) + : x(x_), y(y_) {} T x, y; }; diff --git a/test/objects/cxx11_allocator.hpp b/test/objects/cxx11_allocator.hpp index 8b4e8db9..11f67808 100644 --- a/test/objects/cxx11_allocator.hpp +++ b/test/objects/cxx11_allocator.hpp @@ -148,7 +148,7 @@ namespace test return ptr; } - pointer allocate(size_type n, void const* u) + pointer allocate(size_type n, void const*) { pointer ptr(static_cast(::operator new(n * sizeof(T)))); detail::tracker.track_allocate((void*) ptr, n, sizeof(T), tag_); diff --git a/test/objects/exception.hpp b/test/objects/exception.hpp index 28d4d5b4..034f31b2 100644 --- a/test/objects/exception.hpp +++ b/test/objects/exception.hpp @@ -314,7 +314,7 @@ namespace exception //return pointer(static_cast(::operator new(n * sizeof(T)))); } - pointer allocate(size_type n, void const* u) + pointer allocate(size_type n, void const*) { T* ptr = 0; UNORDERED_SCOPE(allocator::allocate(size_type, const_pointer)) { @@ -494,7 +494,7 @@ namespace exception //return pointer(static_cast(::operator new(n * sizeof(T)))); } - pointer allocate(size_type n, void const* u) + pointer allocate(size_type n, void const*) { T* ptr = 0; UNORDERED_SCOPE(allocator2::allocate(size_type, const_pointer)) { diff --git a/test/objects/minimal.hpp b/test/objects/minimal.hpp index 85132aa3..b876aa20 100644 --- a/test/objects/minimal.hpp +++ b/test/objects/minimal.hpp @@ -386,7 +386,7 @@ namespace minimal } template - pointer allocate(size_type n, const_ptr u) + pointer allocate(size_type n, const_ptr) { return pointer(static_cast(::operator new(n * sizeof(T)))); } @@ -462,7 +462,7 @@ namespace minimal } template - T* allocate(std::size_t n, const_ptr u) { + T* allocate(std::size_t n, const_ptr) { return static_cast(::operator new(n * sizeof(T))); } diff --git a/test/objects/test.hpp b/test/objects/test.hpp index 1c2a24ab..f6b03db7 100644 --- a/test/objects/test.hpp +++ b/test/objects/test.hpp @@ -347,7 +347,7 @@ namespace test return ptr; } - T* allocate(std::size_t n, void const* u) + T* allocate(std::size_t n, void const*) { T* ptr(static_cast(::operator new(n * sizeof(T)))); detail::tracker.track_allocate((void*) ptr, n, sizeof(T), tag_); @@ -573,7 +573,7 @@ namespace test return p; } - pointer allocate(size_type n, void const* u) + pointer allocate(size_type n, void const*) { pointer ptr(static_cast(::operator new(n * sizeof(T)))); detail::tracker.track_allocate((void*) ptr, n, sizeof(T), tag_); diff --git a/test/unordered/allocator_traits.cpp b/test/unordered/allocator_traits.cpp index 264c70d0..4f4fe797 100644 --- a/test/unordered/allocator_traits.cpp +++ b/test/unordered/allocator_traits.cpp @@ -22,9 +22,9 @@ T const* address(T const& r) { return &r; } \ T* allocate(std::size_t n) \ { return static_cast(::operator new(n * sizeof(T))); } \ - T* allocate(std::size_t n, void const* u) \ + T* allocate(std::size_t n, void const*) \ { return static_cast(::operator new(n * sizeof(T))); } \ - void deallocate(T* p, std::size_t n) { ::operator delete((void*) p); } \ + void deallocate(T* p, std::size_t) { ::operator delete((void*) p); } \ void construct(T* p, T const& t) { new(p) T(t); } \ void destroy(T* p) { p->~T(); } \ std::size_t max_size() const \ @@ -44,9 +44,9 @@ const_pointer address(T const& r) { return &r; } \ pointer allocate(std::size_t n) \ { return pointer(::operator new(n * sizeof(T))); } \ - pointer allocate(std::size_t n, void const* u) \ + pointer allocate(std::size_t n, void const*) \ { return pointer(::operator new(n * sizeof(T))); } \ - void deallocate(pointer p, std::size_t n) \ + void deallocate(pointer p, std::size_t) \ { ::operator delete((void*) p); } \ void construct(T* p, T const& t) { new(p) T(t); } \ void destroy(T* p) { p->~T(); } \ diff --git a/test/unordered/at_tests.cpp b/test/unordered/at_tests.cpp index cd272679..8899efcb 100644 --- a/test/unordered/at_tests.cpp +++ b/test/unordered/at_tests.cpp @@ -16,7 +16,6 @@ UNORDERED_AUTO_TEST(at_tests) { BOOST_LIGHTWEIGHT_TEST_OSTREAM << "Create Map" << std::endl; boost::unordered_map x; - typedef boost::unordered_map::iterator iterator; BOOST_LIGHTWEIGHT_TEST_OSTREAM << "Add elements" << std::endl; diff --git a/test/unordered/minimal_allocator.cpp b/test/unordered/minimal_allocator.cpp index 26d1323a..85e99e61 100644 --- a/test/unordered/minimal_allocator.cpp +++ b/test/unordered/minimal_allocator.cpp @@ -18,7 +18,7 @@ struct SimpleAllocator { } - template SimpleAllocator(const SimpleAllocator& other) + template SimpleAllocator(const SimpleAllocator&) { } From 70ce6b4ae7f1b2b8973263f00dcd4477a8b604b9 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 7 Oct 2016 23:07:37 -0500 Subject: [PATCH 3/3] Add, and update, documentation build targets. --- doc/Jamfile.v2 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index 156d8d7c..6a5b7012 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -57,3 +57,12 @@ boostbook standalone : unordered : pdf:boost.url.prefix=http://www.boost.org/doc/libs/release/libs/unordered/doc/html ; +############################################################################### +alias boostdoc + : unordered + : + : + : ; +explicit boostdoc ; +alias boostrelease ; +explicit boostrelease ;