From bac31d091197231d7af9409a7f0c5833bf9fc590 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 11 Jan 2019 16:53:16 +0100 Subject: [PATCH] Revert "qa test: fix a compil issue by modifying the way BOOST_PRINT namespace is used in geometry.h" This reverts commit bd4222cc846d25c16128d3ffcd898ebf55d386fb. the commit bd4222cc did not fix compil issues with some compilers --- qa/unit_test_utils/include/unit_test_utils/geometry.h | 7 ++----- .../include/unit_test_utils/unit_test_utils.h | 11 ++++------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/qa/unit_test_utils/include/unit_test_utils/geometry.h b/qa/unit_test_utils/include/unit_test_utils/geometry.h index 42d10ae459..cc10cd3814 100644 --- a/qa/unit_test_utils/include/unit_test_utils/geometry.h +++ b/qa/unit_test_utils/include/unit_test_utils/geometry.h @@ -8,20 +8,17 @@ #include #include - /** * Printer for BOX2I type */ -namespace BOOST_PRINT_NAMESPACE -{ -template <> struct print_log_value +template <> struct BOOST_PRINT::print_log_value { void operator()( std::ostream& os, const BOX2I& aBox ) { os << "BOX[ " << aBox.GetOrigin() << " + " << aBox.GetSize() << " ]"; } }; -} // namespace BOOST_PRINT_NAMESPACE + namespace KI_TEST { diff --git a/qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h b/qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h index a355f947c5..9e54e0fbb4 100644 --- a/qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h +++ b/qa/unit_test_utils/include/unit_test_utils/unit_test_utils.h @@ -81,15 +81,12 @@ * Define a helper to make it easier to use the right namespace for * defining the print helpers like this: * - * namespace BOOST_PRINT_NAMESPACE - * { - * template<> - * struct print_log_value< MY_TYPE > - * } + * template<> + * struct BOOST_PRINT::print_log_value< MY_TYPE > */ #if BOOST_VERSION < 105900 - #define BOOST_PRINT_NAMESPACE boost::test_tools +namespace BOOST_PRINT = boost::test_tools; #else - #define BOOST_PRINT_NAMESPACE boost::test_tools::tt_detail +namespace BOOST_PRINT = boost::test_tools::tt_detail; #endif #endif // UNIT_TEST_UTILS__H \ No newline at end of file