Opened 9 years ago

#9204 new Bugs

const_multi_array_ref with const

Reported by: Maxim.Yanchenko@… Owned by: Ronald Garcia
Milestone: To Be Determined Component: multi_array
Version: Boost 1.53.0 Severity: Problem
Keywords: const add_const const_multi_array_ref Cc:

Description

It's now declared as

template <typename T, std::size_t NumDims,
  typename TPtr = const T*
>

This makes it SFINAE-fail if you use const type for T, like const_multi_array_ref<const double, 2>.

This simple change fixes the problem (tested):

#include "boost/type_traits/add_const.hpp"
...
template <typename T, std::size_t NumDims,
  typename TPtr = typename boost::add_const<T>::type *
>

Change History (0)

Note: See TracTickets for help on using tickets.