From bae5554f54a807b590796060d6e564d07e35fa69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Mon, 23 Dec 2024 21:53:13 +0100 Subject: [PATCH] Use SFINAE to avoid errors in C++03 mode and std::pair --- test/emplace_test.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/emplace_test.hpp b/test/emplace_test.hpp index 8daf6a4..4633eba 100644 --- a/test/emplace_test.hpp +++ b/test/emplace_test.hpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include //adl_move_swap @@ -101,7 +102,8 @@ enum EmplaceOptions{ }; template -bool test_expected_container(const Container &ec, const EmplaceInt *Expected, unsigned int only_first_n, unsigned int cont_offset = 0) +typename boost::container::dtl::enable_if_c< !boost::container::dtl::is_pair::value, bool>::type + test_expected_container(const Container &ec, const EmplaceInt *Expected, unsigned int only_first_n, unsigned int cont_offset = 0) { typedef typename Container::const_iterator const_iterator; const_iterator itb(ec.begin()), ite(ec.end()); @@ -125,7 +127,8 @@ bool test_expected_container(const Container &ec, const EmplaceInt *Expected, un } template -bool test_expected_container(const Container &ec, const std::pair *Expected, unsigned int only_first_n) +typename boost::container::dtl::enable_if_c::value, bool>::type + test_expected_container(const Container &ec, const std::pair *Expected, unsigned int only_first_n) { typedef typename Container::const_iterator const_iterator; const_iterator itb(ec.begin()), ite(ec.end());