Skip to content

Commit

Permalink
back to disabling overloads where value_type doesn't match var type
Browse files Browse the repository at this point in the history
Hopefully that'll fix some CI complaints..
  • Loading branch information
germasch committed Jul 3, 2022
1 parent 09046d7 commit d4896a0
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions bindings/CXX11/adios2/cxx11/Engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,14 @@ class Engine
* @param launch mode policy
*/
template <class T, class C,
typename =
typename std::enable_if<ndarray_traits<const C>::value>::type>
typename = typename std::enable_if<
ndarray_traits<const C>::value &&
std::is_same<typename std::remove_cv<typename ndarray_traits<
const C>::value_type>::type,
T>::value>::type>
void Put(Variable<T> variable, const C &ndarray,
const Mode launch = Mode::Deferred)
{
static_assert(
std::is_same<typename std::remove_cv<typename ndarray_traits<
const C>::value_type>::type,
T>::value,
"In Put(): Passed data structure value_type does not match "
"variable data type.");
auto mem_space = ndarray_traits<const C>::memory_space;
if (mem_space != adios2::MemorySpace::Detect)
{
Expand Down Expand Up @@ -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<ndarray_traits<C>::value>::type>
template <class T, class C,
typename = typename std::enable_if<
ndarray_traits<const C>::value &&
std::is_same<typename std::remove_cv<typename ndarray_traits<
const C>::value_type>::type,
T>::value>::type>
void Get(Variable<T> variable, C &ndarray,
const Mode launch = Mode::Deferred)
{
static_assert(
std::is_same<typename std::remove_cv<
typename ndarray_traits<C>::value_type>::type,
T>::value,
"In Get(): Passed data structure value_type does not match "
"variable data type.");
auto mem_space = ndarray_traits<const C>::memory_space;
if (mem_space != adios2::MemorySpace::Detect)
{
Expand Down

0 comments on commit d4896a0

Please sign in to comment.