Skip to content

Commit

Permalink
fixing pointer type traits in xadapt.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mykola Vankovych committed Jul 18, 2022
1 parent d1499d9 commit 4ad7215
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/xtensor/xadapt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ namespace xt
*/
template <layout_type L = XTENSOR_DEFAULT_LAYOUT, class C, class SC,
XTL_REQUIRES(detail::not_an_array<std::decay_t<SC>>,
std::is_pointer<C>)>
std::is_pointer<std::remove_reference_t<C>>)>
inline auto adapt(C&& pointer, const SC& shape, layout_type l = L)
{
static_assert(!xtl::is_integral<SC>::value, "shape cannot be a integer");
Expand Down Expand Up @@ -247,7 +247,7 @@ namespace xt
*/
template <layout_type L = XTENSOR_DEFAULT_LAYOUT, class C, class SC,
XTL_REQUIRES(detail::is_array<std::decay_t<SC>>,
std::is_pointer<C>)>
std::is_pointer<std::remove_reference_t<C>>)>
inline auto adapt(C&& pointer, const SC& shape, layout_type l = L)
{
static_assert(!xtl::is_integral<SC>::value, "shape cannot be a integer");
Expand Down Expand Up @@ -390,7 +390,7 @@ namespace xt
* @param shape the shape of the xtensor_fixed_adaptor
*/
template <layout_type L = XTENSOR_DEFAULT_LAYOUT, class C, std::size_t... X,
XTL_REQUIRES(std::is_pointer<C>)>
XTL_REQUIRES(std::is_pointer<std::remove_reference_t<C>>)>
inline auto adapt(C&& pointer, const fixed_shape<X...>& /*shape*/)
{
using buffer_type = xbuffer_adaptor<C, xt::no_ownership, detail::default_allocator_for_ptr_t<C>>;
Expand Down

0 comments on commit 4ad7215

Please sign in to comment.