Closed crtrott closed 5 months ago
Alternatively, you could do
diff --git a/include/experimental/__p0009_bits/macros.hpp b/include/experimental/__p0009_bits/macros.hpp
index 30209a6..34e2528 100644
--- a/include/experimental/__p0009_bits/macros.hpp
+++ b/include/experimental/__p0009_bits/macros.hpp
@@ -25,6 +25,10 @@
#include "assert.h"
#endif
+#ifdef _MSC_VER
+#include <iso646.h>
+#endif
+
#ifndef _MDSPAN_HOST_DEVICE
# if defined(_MDSPAN_HAS_CUDA) || defined(_MDSPAN_HAS_HIP)
# define _MDSPAN_HOST_DEVICE __host__ __device__
Let's avoid forcing default behavior change on downstream users.
I was going to say that including <iso646.h>
is the suggested option.
https://learn.microsoft.com/en-us/cpp/c-runtime-library/iso646-operators?view=msvc-170
The alternative spellings are required by the C++ Standard. Windows is nonconforming because it requires use of a header. That being said, I don't object to the proposed solution.
Including that thing is transitive though, do we really want to change the default behavior of MSVC for everyone downstream?
Including that thing is transitive though, do we really want to change the default behavior of MSVC for everyone downstream?
Just FYI, including that header doesn't "change the default behavior of MSVC," it makes MSVC conform to the C++ Standard a bit better. That being said, I don't object to the proposed solution.
Errors such as: