Subject: [Boost-bugs] [Boost C++ Libraries] #9204: const_multi_array_ref with const
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-10-07 04:09:03
#9204: const_multi_array_ref with const
-------------------------------------------------+-------------------------
Reporter: Maxim.Yanchenko@⦠| Owner: garcia
Type: Bugs | Status: new
Milestone: To Be Determined | Component: multi_array
Version: Boost 1.53.0 | Severity: Problem
Keywords: const add_const |
const_multi_array_ref |
-------------------------------------------------+-------------------------
It's now declared as
{{{#!cpp
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):
{{{#!cpp
#include "boost/type_traits/add_const.hpp"
...
template <typename T, std::size_t NumDims,
typename TPtr = typename boost::add_const<T>::type *
>
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9204> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC