summaryrefslogtreecommitdiff
path: root/libdbpp/testCore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libdbpp/testCore.cpp')
-rw-r--r--libdbpp/testCore.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/libdbpp/testCore.cpp b/libdbpp/testCore.cpp
index 890cb18..b55d16d 100644
--- a/libdbpp/testCore.cpp
+++ b/libdbpp/testCore.cpp
@@ -2,7 +2,6 @@
#include <selectcommand.h>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/test/test_tools.hpp>
-#include <boost/utility/enable_if.hpp>
#include <compileTimeFormatter.h>
namespace DB {
@@ -31,16 +30,14 @@ class Assert : public DB::HandleField {
void blob(const Blob & v) override { (*this)(v); }
void null() override { }
- template <typename D, typename dummy = int>
- void operator()(const D &,
- typename boost::disable_if<std::is_convertible<D, T>, dummy>::type = 0) {
- BOOST_ERROR("Unexpected column type " << typeid(D).name());
- }
-
- template <typename D, typename dummy = int>
- void operator()(const D & v,
- typename boost::enable_if<std::is_convertible<D, T>, dummy>::type = 0) {
- BOOST_REQUIRE_EQUAL(expected, v);
+ template <typename D>
+ void operator()(const D & v) {
+ if constexpr (std::is_convertible<D, T>::value) {
+ BOOST_REQUIRE_EQUAL(expected, v);
+ }
+ else {
+ BOOST_ERROR("Unexpected column type " << typeid(D).name());
+ }
}
const T & expected;