Skip to content

Commit

Permalink
Merge pull request #2555 from BioDataAnalysis/fixing_xadapt_pointers_…
Browse files Browse the repository at this point in the history
…check

fixing pointer type traits in xadapt.
  • Loading branch information
JohanMabille authored Jul 20, 2022
2 parents 9525d1c + 4ad7215 commit 3084585
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 3084585

Please sign in to comment.