From 997a1147b5b53e591a60c93c1f73917a5474c945 Mon Sep 17 00:00:00 2001 From: Dariusz Michaluk Date: Tue, 1 Dec 2020 11:38:19 +0100 Subject: [PATCH] Fix colour log formatter compatibility with boost 1.65 Change-Id: I855eed7f331163e0edc3dee9644e7c673b063377 --- tests/colour_log_formatter.cpp | 13 ++++++++----- tests/colour_log_formatter.h | 6 +++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/colour_log_formatter.cpp b/tests/colour_log_formatter.cpp index 5033e2f..bd1e323 100644 --- a/tests/colour_log_formatter.cpp +++ b/tests/colour_log_formatter.cpp @@ -115,12 +115,15 @@ colour_log_formatter::log_finish(std::ostream &ostr) //____________________________________________________________________________// void -colour_log_formatter::log_build_info(std::ostream &output, bool log_build_info) +#if BOOST_VERSION >= 107000 +colour_log_formatter::log_build_info(std::ostream &output, bool) +#else +colour_log_formatter::log_build_info(std::ostream &output) +#endif { - if (log_build_info) - output << "Platform: " << BOOST_PLATFORM << '\n' - << "Compiler: " << BOOST_COMPILER << '\n' - << "STL : " << BOOST_STDLIB << '\n'; + output << "Platform: " << BOOST_PLATFORM << '\n' + << "Compiler: " << BOOST_COMPILER << '\n' + << "STL : " << BOOST_STDLIB << '\n'; output << "Boost : " << BOOST_VERSION / 100000 << '.' << BOOST_VERSION / 100 % 1000 << '.' << BOOST_VERSION % 100 << std::endl; diff --git a/tests/colour_log_formatter.h b/tests/colour_log_formatter.h index c971263..10c4b76 100644 --- a/tests/colour_log_formatter.h +++ b/tests/colour_log_formatter.h @@ -24,7 +24,11 @@ public: std::ostream &, boost::unit_test::counter_t test_cases_amount); void log_finish(std::ostream &); - void log_build_info(std::ostream &output, bool log_build_info = true); +#if BOOST_VERSION >= 107000 + void log_build_info(std::ostream &, bool); +#else + void log_build_info(std::ostream &); +#endif void test_unit_start( std::ostream &, -- 2.7.4