diff --git a/examples/test_util/EclFilesComparator.cpp b/examples/test_util/EclFilesComparator.cpp index f7765b5bb..90f3dc8eb 100644 --- a/examples/test_util/EclFilesComparator.cpp +++ b/examples/test_util/EclFilesComparator.cpp @@ -27,7 +27,8 @@ #include #include #include - +#include +#include // helper macro to handle error throws or not #define HANDLE_ERROR(type, message) \ @@ -89,7 +90,11 @@ template void ECLFilesComparator::printValuesForCell (const std::str template void ECLFilesComparator::printValuesForCell (const std::string& keyword, const std::string reference, size_t kw_size, size_t cell, EGrid *grid, const int& value1, const int& value2) const; template void ECLFilesComparator::printValuesForCell (const std::string& keyword, const std::string reference, size_t kw_size, size_t cell, EGrid *grid, const double& value1, const double& value2) const; template void ECLFilesComparator::printValuesForCell(const std::string& keyword, const std::string reference, size_t kw_size, size_t cell, EGrid *grid, const std::string& value1, const std::string& value2) const; - +// Hack to work around case where std::vector::const_reference is not a bool. If it is we will initialize printValuesForCell otherwise printValuesForCell::const_reference> +using boolConstReference = typename std::vector::const_reference; +using boolTypeHelper = typename std::remove_const::type>::type; +using boolType = typename std::conditional::value, char, boolTypeHelper>::type; +template void ECLFilesComparator::printValuesForCell (const std::string& keyword, const std::string reference, size_t kw_size, size_t cell, EGrid *grid, const boolType& value1, const boolType& value2) const; ECLFilesComparator::ECLFilesComparator(const std::string& basename1, const std::string& basename2,