Skip to content

Commit

Permalink
kokkos#253: remove MDSPAN_IMPL_NAMESPACE_STD and import dynamic_exten…
Browse files Browse the repository at this point in the history
…t instead. This avoids clashes when using the std headers
  • Loading branch information
nmm0 committed May 1, 2023
1 parent 83105bb commit c91e0cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
12 changes: 6 additions & 6 deletions include/experimental/__p0009_bits/dynamic_extent.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@

#include "macros.hpp"

#if defined(__cpp_lib_span) && defined(MDSPAN_IMPL_NAMESPACE_STD)
#if defined(__cpp_lib_span)
#include <span>
#else
#endif

#include <cstddef> // size_t
#include <limits> // numeric_limits

namespace MDSPAN_IMPL_STANDARD_NAMESPACE {

#if defined(__cpp_lib_span)
using std::dynamic_extent;
#else
_MDSPAN_INLINE_VARIABLE constexpr auto dynamic_extent = std::numeric_limits<size_t>::max();

} // namespace MDSPAN_IMPL_STANDARD_NAMESPACE

#endif
} // namespace MDSPAN_IMPL_STANDARD_NAMESPACE

//==============================================================================================================
2 changes: 0 additions & 2 deletions include/experimental/mdarray
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,4 @@
#define MDSPAN_IMPL_PROPOSED_NAMESPACE experimental
#endif

#define MDSPAN_IMPL_NAMESPACE_STD

#include "../mdspan/experimental/mdarray.hpp"
2 changes: 0 additions & 2 deletions include/experimental/mdspan
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,4 @@
#define MDSPAN_IMPL_PROPOSED_NAMESPACE experimental
#endif

#define MDSPAN_IMPL_NAMESPACE_STD

#include "../mdspan/mdspan.hpp"

0 comments on commit c91e0cc

Please sign in to comment.