@@ -89,7 +89,7 @@ namespace xt
89
89
*/
90
90
template <layout_type L = XTENSOR_DEFAULT_LAYOUT, class C , class SC ,
91
91
XTL_REQUIRES (detail::not_an_array<std::decay_t <SC>>,
92
- std::is_pointer<C >)>
92
+ std::is_pointer<std:: remove_reference_t <C> >)>
93
93
inline auto adapt(C&& pointer, const SC& shape, layout_type l = L)
94
94
{
95
95
static_assert (!xtl::is_integral<SC>::value, " shape cannot be a integer" );
@@ -247,7 +247,7 @@ namespace xt
247
247
*/
248
248
template <layout_type L = XTENSOR_DEFAULT_LAYOUT, class C , class SC ,
249
249
XTL_REQUIRES (detail::is_array<std::decay_t <SC>>,
250
- std::is_pointer<C >)>
250
+ std::is_pointer<std:: remove_reference_t <C> >)>
251
251
inline auto adapt(C&& pointer, const SC& shape, layout_type l = L)
252
252
{
253
253
static_assert (!xtl::is_integral<SC>::value, " shape cannot be a integer" );
@@ -390,7 +390,7 @@ namespace xt
390
390
* @param shape the shape of the xtensor_fixed_adaptor
391
391
*/
392
392
template <layout_type L = XTENSOR_DEFAULT_LAYOUT, class C , std::size_t ... X,
393
- XTL_REQUIRES (std::is_pointer<C >)>
393
+ XTL_REQUIRES (std::is_pointer<std:: remove_reference_t <C> >)>
394
394
inline auto adapt(C&& pointer, const fixed_shape<X...>& /* shape*/ )
395
395
{
396
396
using buffer_type = xbuffer_adaptor<C, xt::no_ownership, detail::default_allocator_for_ptr_t <C>>;
0 commit comments