You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The use of preprocessor directives within the macro argument list in lines 206-211 of layout_stride.hpp is undefined behavior. Please consider applying the following patch, which wraps the entirety of the MDSPAN_FUNCTION_REQUIRES macro invocation inside the #if/#else clauses:
--- layout_stride.hpp-orig 2020-04-23 14:59:54.000000000 -0400
+++ layout_stride.hpp 2020-04-23 15:02:54.000000000 -0400
@@ -198,19 +198,27 @@
// TODO @proposal-bug @proposal-extension layout stride needs this constructor
// clang-format off
+#if defined(__INTEL_COMPILER)
MDSPAN_FUNCTION_REQUIRES(
(MDSPAN_INLINE_FUNCTION constexpr explicit),
layout_stride_impl, (std::experimental::extents<Exts...> const& e), noexcept,
/* requires */ (
// remember that this also covers the zero strides case because an && fold on an empty pack is true
-#if defined(__INTEL_COMPILER)
// Work-around for an ICE. layout_stride won't properly SFINAE with ICC, but oh well
true
+ )
+ )
#else
+ MDSPAN_FUNCTION_REQUIRES(
+ (MDSPAN_INLINE_FUNCTION constexpr explicit),
+ layout_stride_impl, (std::experimental::extents<Exts...> const& e), noexcept,
+ /* requires */ (
+ // remember that this also covers the zero strides case because an && fold on an empty pack is true
_MDSPAN_FOLD_AND(Strides != dynamic_extent /* && ... */)
-#endif
)
- ) : __base_t(__base_t{__member_pair_t(e, __strides_storage_t())})
+ )
+#endif
+ : __base_t(__base_t{__member_pair_t(e, __strides_storage_t())})
{ }
// clang-format on
@@ -323,4 +331,4 @@
};
} // end namespace experimental
-} // end namespace std
\ No newline at end of file
+} // end namespace std
The text was updated successfully, but these errors were encountered:
The use of preprocessor directives within the macro argument list in lines 206-211 of
layout_stride.hpp
is undefined behavior. Please consider applying the following patch, which wraps the entirety of theMDSPAN_FUNCTION_REQUIRES
macro invocation inside the#if/#else
clauses:The text was updated successfully, but these errors were encountered: