From c51d8a9495adc0d5bb5029f2c143d3dc96ca6841 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 3 Jan 2018 18:41:14 +0200 Subject: [PATCH 1/9] Switch tests to lightweight_test --- test/Jamfile | 6 +++--- test/another_tuple_test_bench.cpp | 9 ++++----- test/io_test.cpp | 14 ++++++-------- test/tuple_test_bench.cpp | 21 +++++++-------------- 4 files changed, 20 insertions(+), 30 deletions(-) diff --git a/test/Jamfile b/test/Jamfile index 66574f6..af6c22c 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -1,8 +1,8 @@ - -project : requirements /boost/test//boost_test_exec_monitor ; +# Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) +# Distributed under the Boost Software License, Version 1.0. test-suite tuple : [ run tuple_test_bench.cpp ] [ run io_test.cpp ] [ run another_tuple_test_bench.cpp ] - ; \ No newline at end of file + ; diff --git a/test/another_tuple_test_bench.cpp b/test/another_tuple_test_bench.cpp index 15074da..153548e 100644 --- a/test/another_tuple_test_bench.cpp +++ b/test/another_tuple_test_bench.cpp @@ -15,11 +15,10 @@ // Defining any of E1 to E5 or E7 to E11 opens some illegal code that // should cause the compliation to fail. -#define BOOST_INCLUDE_MAIN // for testing, include rather than link -#include // see "Header Implementation Option" - #include "boost/tuple/tuple.hpp" +#include "boost/core/lightweight_test.hpp" + #include #include @@ -149,7 +148,7 @@ void foo7() { // -------------------------------- // ---------------------------- -int test_main(int, char *[]) { +int main() { foo1(); foo2(); @@ -159,5 +158,5 @@ int test_main(int, char *[]) { foo7(); - return 0; + return boost::report_errors(); } diff --git a/test/io_test.cpp b/test/io_test.cpp index 382f8cc..550e8f2 100644 --- a/test/io_test.cpp +++ b/test/io_test.cpp @@ -10,12 +10,11 @@ // // Testing the I/O facilities of tuples -#define BOOST_INCLUDE_MAIN // for testing, include rather than link -#include "boost/test/test_tools.hpp" // see "Header Implementation Option" - #include "boost/tuple/tuple_io.hpp" #include "boost/tuple/tuple_comparison.hpp" +#include "boost/core/lightweight_test.hpp" + #include #include #include @@ -28,6 +27,8 @@ #include #endif +#define BOOST_CHECK BOOST_TEST + using namespace boost; #if defined BOOST_NO_STRINGSTREAM @@ -38,9 +39,7 @@ typedef std::ostringstream useThisOStringStream; typedef std::istringstream useThisIStringStream; #endif -int test_main(int argc, char * argv[] ) { - (void)argc; - (void)argv; +int main() { using boost::tuples::set_close; using boost::tuples::set_open; using boost::tuples::set_delimiter; @@ -138,6 +137,5 @@ int test_main(int argc, char * argv[] ) { // general. If this is wanted, some kind of a parseable string class // should be used. - return 0; + return boost::report_errors(); } - diff --git a/test/tuple_test_bench.cpp b/test/tuple_test_bench.cpp index 8bf756f..c08d6df 100644 --- a/test/tuple_test_bench.cpp +++ b/test/tuple_test_bench.cpp @@ -8,19 +8,18 @@ // tuple_test_bench.cpp -------------------------------- -#define BOOST_INCLUDE_MAIN // for testing, include rather than link -#include // see "Header Implementation Option" - #include "boost/tuple/tuple.hpp" - #include "boost/tuple/tuple_comparison.hpp" #include "boost/type_traits/is_const.hpp" - #include "boost/ref.hpp" +#include "boost/core/lightweight_test.hpp" + #include #include +#define BOOST_CHECK BOOST_TEST + using namespace boost; // ---------------------------------------------------------------------------- @@ -472,7 +471,7 @@ void tuple_swap_test() // - main --------------------------------------------------------------------- // ---------------------------------------------------------------------------- -int test_main(int, char *[]) { +int main() { construction_test(); element_access_test(); @@ -486,12 +485,6 @@ int test_main(int, char *[]) { const_tuple_test(); tuple_length_test(); tuple_swap_test(); - return 0; + + return boost::report_errors(); } - - - - - - - From 16731d26899e9f551f9f7691d14944e5a34ec2ec Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 3 Jan 2018 19:26:11 +0200 Subject: [PATCH 2/9] Make boost::tuple tuple-like to support structured bindings --- include/boost/tuple/detail/tuple_basic.hpp | 21 +++--- include/boost/tuple/tuple.hpp | 39 +++++++++++ test/Jamfile | 3 + test/std_tuple_element.cpp | 56 ++++++++++++++++ test/std_tuple_size.cpp | 61 +++++++++++++++++ test/structured_bindings.cpp | 77 ++++++++++++++++++++++ 6 files changed, 247 insertions(+), 10 deletions(-) create mode 100644 test/std_tuple_element.cpp create mode 100644 test/std_tuple_size.cpp create mode 100644 test/structured_bindings.cpp diff --git a/include/boost/tuple/detail/tuple_basic.hpp b/include/boost/tuple/detail/tuple_basic.hpp index 879f0e9..4ea13ef 100644 --- a/include/boost/tuple/detail/tuple_basic.hpp +++ b/include/boost/tuple/detail/tuple_basic.hpp @@ -37,6 +37,7 @@ #include #include +#include #include #include // needed for BOOST_WORKAROUND @@ -420,28 +421,28 @@ struct cons { // templates for finding out the length of the tuple ------------------- template -struct length { - BOOST_STATIC_CONSTANT(int, value = 1 + length::value); +struct length: boost::integral_constant::value> +{ }; template<> -struct length > { - BOOST_STATIC_CONSTANT(int, value = 0); +struct length >: boost::integral_constant +{ }; template<> -struct length const> { - BOOST_STATIC_CONSTANT(int, value = 0); +struct length const>: boost::integral_constant +{ }; template<> -struct length { - BOOST_STATIC_CONSTANT(int, value = 0); +struct length: boost::integral_constant +{ }; template<> -struct length { - BOOST_STATIC_CONSTANT(int, value = 0); +struct length: boost::integral_constant +{ }; namespace detail { diff --git a/include/boost/tuple/tuple.hpp b/include/boost/tuple/tuple.hpp index d71e7df..4f2f8ac 100644 --- a/include/boost/tuple/tuple.hpp +++ b/include/boost/tuple/tuple.hpp @@ -63,5 +63,44 @@ get(const tuples::cons& c) { } // end namespace boost +#if !defined(BOOST_NO_CXX11_HDR_TUPLE) + +#include +#include + +namespace std +{ + +// std::tuple_size + +template + struct tuple_size< boost::tuples::tuple >: + boost::tuples::length< boost::tuples::tuple > +{ +}; + +template struct tuple_size< boost::tuples::cons >: boost::tuples::length< boost::tuples::cons > +{ +}; + +template<> struct tuple_size< boost::tuples::null_type >: boost::tuples::length< boost::tuples::null_type > +{ +}; + +// std::tuple_element + +template + struct tuple_element< I, boost::tuples::tuple >: + boost::tuples::element< I, boost::tuples::tuple > +{ +}; + +template struct tuple_element< I, boost::tuples::cons >: boost::tuples::element< I, boost::tuples::cons > +{ +}; + +} // namespace std + +#endif // !defined(BOOST_NO_CXX11_HDR_TUPLE) #endif // BOOST_TUPLE_HPP diff --git a/test/Jamfile b/test/Jamfile index af6c22c..7159dce 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -5,4 +5,7 @@ test-suite tuple : [ run tuple_test_bench.cpp ] [ run io_test.cpp ] [ run another_tuple_test_bench.cpp ] + [ run std_tuple_size.cpp ] + [ run std_tuple_element.cpp ] + [ run structured_bindings.cpp ] ; diff --git a/test/std_tuple_element.cpp b/test/std_tuple_element.cpp new file mode 100644 index 0000000..762d1fa --- /dev/null +++ b/test/std_tuple_element.cpp @@ -0,0 +1,56 @@ +// Copyright 2017 Peter Dimov. +// Distributed under the Boost Software License, Version 1.0. + +#include +#include +#include +#include +#include + +#if defined(BOOST_NO_CXX11_HDR_TUPLE) + +BOOST_PRAGMA_MESSAGE("Skipping std::tuple_element tests for lack of ") +int main() {} + +#else + +#include + +template void test() +{ + BOOST_TEST_TRAIT_TRUE((boost::is_same::type, E>)); + + typedef typename Tp::inherited Tp2; + BOOST_TEST_TRAIT_TRUE((boost::is_same::type, E>)); +} + +template struct X +{ +}; + +int main() +{ + test const>, 0, X<0> const>(); + + test const, X<1> const>, 0, X<0> const>(); + test const, X<1> const>, 1, X<1> const>(); + + test const, X<1> const, X<2> const>, 0, X<0> const>(); + test const, X<1> const, X<2> const>, 1, X<1> const>(); + test const, X<1> const, X<2> const>, 2, X<2> const>(); + + test const, X<1> const, X<2> const, X<3> const>, 0, X<0> const>(); + test const, X<1> const, X<2> const, X<3> const>, 1, X<1> const>(); + test const, X<1> const, X<2> const, X<3> const>, 2, X<2> const>(); + test const, X<1> const, X<2> const, X<3> const>, 3, X<3> const>(); + + test const, X<1> const, X<2> const, X<3> const, X<4> const>, 0, X<0> const>(); + test const, X<1> const, X<2> const, X<3> const, X<4> const>, 1, X<1> const>(); + test const, X<1> const, X<2> const, X<3> const, X<4> const>, 2, X<2> const>(); + test const, X<1> const, X<2> const, X<3> const, X<4> const>, 3, X<3> const>(); + test const, X<1> const, X<2> const, X<3> const, X<4> const>, 4, X<4> const>(); + + return boost::report_errors(); +} + +#endif diff --git a/test/std_tuple_size.cpp b/test/std_tuple_size.cpp new file mode 100644 index 0000000..5525f63 --- /dev/null +++ b/test/std_tuple_size.cpp @@ -0,0 +1,61 @@ +// Copyright 2017 Peter Dimov. +// Distributed under the Boost Software License, Version 1.0. + +#include +#include +#include +#include + +#if defined(BOOST_NO_CXX11_HDR_TUPLE) + +BOOST_PRAGMA_MESSAGE("Skipping std::tuple_size tests for lack of ") +int main() {} + +#else + +#include + +template void test( std::size_t x ) +{ + BOOST_TEST_EQ( std::tuple_size< Tp >::value, x ); + BOOST_TEST_EQ( std::tuple_size< typename Tp::inherited >::value, x ); +} + +struct V +{ +}; + +int main() +{ + test< boost::tuple<> >( 0 ); + test< boost::tuple >( 1 ); + test< boost::tuple >( 2 ); + test< boost::tuple >( 3 ); + test< boost::tuple >( 4 ); + test< boost::tuple >( 5 ); + test< boost::tuple >( 6 ); + test< boost::tuple >( 7 ); + test< boost::tuple >( 8 ); + test< boost::tuple >( 9 ); + test< boost::tuple >( 10 ); + +#if !defined(BOOST_NO_CXX11_DECLTYPE) + + BOOST_TEST_EQ( std::tuple_size::value, 0 ); + BOOST_TEST_EQ( std::tuple_size::value, 1 ); + BOOST_TEST_EQ( std::tuple_size::value, 2 ); + BOOST_TEST_EQ( std::tuple_size::value, 3 ); + BOOST_TEST_EQ( std::tuple_size::value, 4 ); + BOOST_TEST_EQ( std::tuple_size::value, 5 ); + BOOST_TEST_EQ( std::tuple_size::value, 6 ); + BOOST_TEST_EQ( std::tuple_size::value, 7 ); + BOOST_TEST_EQ( std::tuple_size::value, 8 ); + BOOST_TEST_EQ( std::tuple_size::value, 9 ); + BOOST_TEST_EQ( std::tuple_size::value, 10 ); + +#endif + + return boost::report_errors(); +} + +#endif diff --git a/test/structured_bindings.cpp b/test/structured_bindings.cpp new file mode 100644 index 0000000..432ba0a --- /dev/null +++ b/test/structured_bindings.cpp @@ -0,0 +1,77 @@ +// Copyright 2017 Peter Dimov. +// Distributed under the Boost Software License, Version 1.0. + +#include +#include +#include +#include + +#if defined(BOOST_NO_CXX17_STRUCTURED_BINDINGS) + +BOOST_PRAGMA_MESSAGE("Skipping structured bindings test, not supported") +int main() {} + +#else + +int main() +{ + // make_tuple + + { + auto [x1] = boost::make_tuple( 1 ); + BOOST_TEST_EQ( x1, 1 ); + } + + { + auto [x1, x2] = boost::make_tuple( 1, 2 ); + BOOST_TEST_EQ( x1, 1 ); + BOOST_TEST_EQ( x2, 2 ); + } + + { + auto [x1, x2, x3] = boost::make_tuple( 1, 2, 3 ); + BOOST_TEST_EQ( x1, 1 ); + BOOST_TEST_EQ( x2, 2 ); + BOOST_TEST_EQ( x3, 3 ); + } + + { + auto [x1, x2, x3, x4] = boost::make_tuple( 1, 2, 3, 4 ); + BOOST_TEST_EQ( x1, 1 ); + BOOST_TEST_EQ( x2, 2 ); + BOOST_TEST_EQ( x3, 3 ); + BOOST_TEST_EQ( x4, 4 ); + } + + // tuple + + { + auto [x1] = boost::tuple( 1 ); + BOOST_TEST_EQ( x1, 1 ); + } + + { + auto [x1, x2] = boost::tuple( 1, 2 ); + BOOST_TEST_EQ( x1, 1 ); + BOOST_TEST_EQ( x2, 2 ); + } + + { + auto [x1, x2, x3] = boost::tuple( 1, 2, 3 ); + BOOST_TEST_EQ( x1, 1 ); + BOOST_TEST_EQ( x2, 2 ); + BOOST_TEST_EQ( x3, 3 ); + } + + { + auto [x1, x2, x3, x4] = boost::tuple( 1, 2, 3, 4 ); + BOOST_TEST_EQ( x1, 1 ); + BOOST_TEST_EQ( x2, 2 ); + BOOST_TEST_EQ( x3, 3 ); + BOOST_TEST_EQ( x4, 4 ); + } + + return boost::report_errors(); +} + +#endif From 37ef42e2c392f9a1fe065f18efd7c6e5f7c0e09b Mon Sep 17 00:00:00 2001 From: Nikita Kniazev Date: Fri, 5 Jan 2018 14:56:25 +0300 Subject: [PATCH 3/9] Suppress mismatched tags warning --- include/boost/tuple/tuple.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/boost/tuple/tuple.hpp b/include/boost/tuple/tuple.hpp index 4f2f8ac..39b0e13 100644 --- a/include/boost/tuple/tuple.hpp +++ b/include/boost/tuple/tuple.hpp @@ -71,6 +71,11 @@ get(const tuples::cons& c) { namespace std { +#if defined(BOOST_CLANG) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wmismatched-tags" +#endif + // std::tuple_size template @@ -99,6 +104,10 @@ template struct tuple_element< I, boost::tuples { }; +#if defined(BOOST_CLANG) +# pragma clang diagnostic pop +#endif + } // namespace std #endif // !defined(BOOST_NO_CXX11_HDR_TUPLE) From 30794afc61002ece61e6de13616b023f2ef874e5 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Sat, 6 Jan 2018 12:40:55 +0100 Subject: [PATCH 4/9] Use class keyword in std::tuple_size and std::tuple_element specializations To avoid warnings 'X defined as a struct template but previously declared as a class template'. --- include/boost/tuple/tuple.hpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/include/boost/tuple/tuple.hpp b/include/boost/tuple/tuple.hpp index 39b0e13..4e34b6c 100644 --- a/include/boost/tuple/tuple.hpp +++ b/include/boost/tuple/tuple.hpp @@ -79,28 +79,31 @@ namespace std // std::tuple_size template - struct tuple_size< boost::tuples::tuple >: - boost::tuples::length< boost::tuples::tuple > + class tuple_size< boost::tuples::tuple >: + public boost::tuples::length< boost::tuples::tuple > { }; -template struct tuple_size< boost::tuples::cons >: boost::tuples::length< boost::tuples::cons > +template class tuple_size< boost::tuples::cons >: + public boost::tuples::length< boost::tuples::cons > { }; -template<> struct tuple_size< boost::tuples::null_type >: boost::tuples::length< boost::tuples::null_type > +template<> class tuple_size< boost::tuples::null_type >: + public boost::tuples::length< boost::tuples::null_type > { }; // std::tuple_element template - struct tuple_element< I, boost::tuples::tuple >: - boost::tuples::element< I, boost::tuples::tuple > + class tuple_element< I, boost::tuples::tuple >: + public boost::tuples::element< I, boost::tuples::tuple > { }; -template struct tuple_element< I, boost::tuples::cons >: boost::tuples::element< I, boost::tuples::cons > +template class tuple_element< I, boost::tuples::cons >: + public boost::tuples::element< I, boost::tuples::cons > { }; From 292f3f9dc87375b6220925e57eb89b54e7a99dd6 Mon Sep 17 00:00:00 2001 From: Mike Dev Date: Tue, 18 Sep 2018 13:19:19 +0200 Subject: [PATCH 5/9] [CMake] Generate cmake target that other libraries can use ... to express their dependency on boost tuple and get usage requiremments, such as the include directory --- CMakeLists.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..4303415 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright 2018 Mike Dev +# 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 +# +# NOTE: CMake support for Boost.Tuple is currently experimental at best +# and the interface is likely to change in the future + +cmake_minimum_required(VERSION 3.5) +project(BoostTuple) + +add_library(boost_tuple INTERFACE) +add_library(Boost::tuple ALIAS boost_tuple) + +target_include_directories(boost_tuple INTERFACE include) + +target_link_libraries(boost_tuple + INTERFACE + Boost::config + Boost::core + Boost::static_assert + Boost::type_traits +) From 1e0276741beae5a3fb51489d3cbe289ff51f83fb Mon Sep 17 00:00:00 2001 From: Romain Geissler Date: Wed, 17 Apr 2019 21:13:33 +0000 Subject: [PATCH 6/9] Fix -Wdeprecated-copy warning with gcc 9. --- include/boost/tuple/detail/tuple_basic.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/boost/tuple/detail/tuple_basic.hpp b/include/boost/tuple/detail/tuple_basic.hpp index 4ea13ef..7e5dddc 100644 --- a/include/boost/tuple/detail/tuple_basic.hpp +++ b/include/boost/tuple/detail/tuple_basic.hpp @@ -310,6 +310,7 @@ struct cons { tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull()) {} + cons( const cons& u ) : head(u.head), tail(u.tail) {} template cons( const cons& u ) : head(u.head), tail(u.tail) {} @@ -389,6 +390,8 @@ struct cons { const null_type&, const null_type&, const null_type&) : head () {} + cons( const cons& u ) : head(u.head) {} + template cons( const cons& u ) : head(u.head) {} From 72f2e7535e82093b2eefd199bd1623d165533234 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sun, 15 Sep 2019 15:41:29 +0300 Subject: [PATCH 7/9] Fix narrowing conversion in tuple_manipulator ctor This fixes unnecessary, possibly wrapping conversion of the character argument of tuple manipulators on tuple_manipulator construction. This should silence MSVC warning C4244: tuple_io.hpp(142,71): warning C4244: 'argument': conversion from 'const CharType' to 'const char', possible loss of data Related to https://github.com/boostorg/filesystem/issues/118. --- include/boost/tuple/tuple_io.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/tuple/tuple_io.hpp b/include/boost/tuple/tuple_io.hpp index f21c7ed..505bd9d 100644 --- a/include/boost/tuple/tuple_io.hpp +++ b/include/boost/tuple/tuple_io.hpp @@ -102,7 +102,7 @@ class tuple_manipulator { CharType f_c; public: explicit tuple_manipulator(detail::format_info::manipulator_type m, - const char c = 0) + CharType c = CharType()) : mt(m), f_c(c) {} template From 87ff02bf7987fda1972d26a6507ec71e8580b34b Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Mon, 30 Mar 2020 13:31:11 -0400 Subject: [PATCH 8/9] Change __BORLANDC__ to BOOST_BORLANDC, which is defined in Boost config for the Embarcadero non-clang-based compilers. --- include/boost/tuple/detail/tuple_basic.hpp | 2 +- include/boost/tuple/tuple_io.hpp | 2 +- test/tuple_test_bench.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/tuple/detail/tuple_basic.hpp b/include/boost/tuple/detail/tuple_basic.hpp index 7e5dddc..bed3042 100644 --- a/include/boost/tuple/detail/tuple_basic.hpp +++ b/include/boost/tuple/detail/tuple_basic.hpp @@ -141,7 +141,7 @@ private: typedef BOOST_DEDUCED_TYPENAME detail::drop_front::BOOST_NESTED_TEMPLATE apply::type::head_type unqualified_type; public: -#if BOOST_WORKAROUND(__BORLANDC__,<0x600) +#if BOOST_WORKAROUND(BOOST_BORLANDC,<0x600) typedef const unqualified_type type; #else typedef BOOST_DEDUCED_TYPENAME boost::add_const::type type; diff --git a/include/boost/tuple/tuple_io.hpp b/include/boost/tuple/tuple_io.hpp index 505bd9d..ce55170 100644 --- a/include/boost/tuple/tuple_io.hpp +++ b/include/boost/tuple/tuple_io.hpp @@ -259,7 +259,7 @@ extract_and_check_delimiter( #if defined (BOOST_NO_STD_LOCALE) const bool is_delimiter = !isspace(d); -#elif defined ( __BORLANDC__ ) +#elif defined ( BOOST_BORLANDC ) const bool is_delimiter = !std::use_facet< std::ctype< CharType > > (is.getloc() ).is( std::ctype_base::space, d); #else diff --git a/test/tuple_test_bench.cpp b/test/tuple_test_bench.cpp index c08d6df..1d74b93 100644 --- a/test/tuple_test_bench.cpp +++ b/test/tuple_test_bench.cpp @@ -81,7 +81,7 @@ typedef tuple > t4; typedef tuple, bool, void*> t5; typedef tuple t6; -# if !defined(__BORLANDC__) || __BORLAND__ > 0x0551 +# if !defined(BOOST_BORLANDC) || __BORLAND__ > 0x0551 typedef tuple t7; #endif @@ -306,7 +306,7 @@ make_tuple_test() // With function pointers, make_tuple works just fine -#if !defined(__BORLANDC__) || __BORLAND__ > 0x0551 +#if !defined(BOOST_BORLANDC) || __BORLAND__ > 0x0551 make_tuple(&make_tuple_test); #endif From c4addf979559d00c97e2686d24dab03dd6e5374a Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Wed, 8 Apr 2020 17:48:25 -0400 Subject: [PATCH 9/9] Corrected previous fix. --- test/tuple_test_bench.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/tuple_test_bench.cpp b/test/tuple_test_bench.cpp index 1d74b93..3f44027 100644 --- a/test/tuple_test_bench.cpp +++ b/test/tuple_test_bench.cpp @@ -81,7 +81,7 @@ typedef tuple > t4; typedef tuple, bool, void*> t5; typedef tuple t6; -# if !defined(BOOST_BORLANDC) || __BORLAND__ > 0x0551 +# if !defined(BOOST_BORLANDC) || BOOST_BORLANDC > 0x0551 typedef tuple t7; #endif @@ -306,7 +306,7 @@ make_tuple_test() // With function pointers, make_tuple works just fine -#if !defined(BOOST_BORLANDC) || __BORLAND__ > 0x0551 +#if !defined(BOOST_BORLANDC) || BOOST_BORLANDC > 0x0551 make_tuple(&make_tuple_test); #endif