diff --git a/bindings/CXX11/adios2/cxx11/Engine.h b/bindings/CXX11/adios2/cxx11/Engine.h index dbab50fc37..41932ee45b 100644 --- a/bindings/CXX11/adios2/cxx11/Engine.h +++ b/bindings/CXX11/adios2/cxx11/Engine.h @@ -181,17 +181,14 @@ class Engine * @param launch mode policy */ template ::value>::type> + typename = typename std::enable_if< + ndarray_traits::value && + std::is_same::value_type>::type, + T>::value>::type> void Put(Variable variable, const C &ndarray, const Mode launch = Mode::Deferred) { - static_assert( - std::is_same::value_type>::type, - T>::value, - "In Put(): Passed data structure value_type does not match " - "variable data type."); auto mem_space = ndarray_traits::memory_space; if (mem_space != adios2::MemorySpace::Detect) { @@ -295,18 +292,15 @@ class Engine * @param launch mode policy * @exception std::invalid_argument for invalid variable or nullptr data */ - template < - class T, class C, - typename = typename std::enable_if::value>::type> + template ::value && + std::is_same::value_type>::type, + T>::value>::type> void Get(Variable variable, C &ndarray, const Mode launch = Mode::Deferred) { - static_assert( - std::is_same::value_type>::type, - T>::value, - "In Get(): Passed data structure value_type does not match " - "variable data type."); auto mem_space = ndarray_traits::memory_space; if (mem_space != adios2::MemorySpace::Detect) {