Fix C++17 version detection in helper_macros.hpp (#1479)
* It seems that __cplusplus can be inconsistent with _MSVC_LANG when discerning C++17 version. See https://github.com/NVIDIA/cutlass/issues/1474. Added switch to check _MSVC_LANG in addition to __cplusplus * Fixed typo. * Oops, another typo. * Changed incorrect logic, ifndef to ifdef * Define CUTLAS_CPLUSPLUS for language version testing Co-authored-by: Mark Hoemmen <mhoemmen@users.noreply.github.com> --------- Co-authored-by: Mark Hoemmen <mhoemmen@users.noreply.github.com>
This commit is contained in:
parent
033d9efd2d
commit
637b159063
@ -146,7 +146,13 @@ namespace cutlass {
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if (201700L <= __cplusplus)
|
||||
#if defined(_MSVC_LANG)
|
||||
# define CUTLASS_CPLUSPLUS _MSVC_LANG
|
||||
#else
|
||||
# define CUTLASS_CPLUSPLUS __cplusplus
|
||||
#endif
|
||||
|
||||
#if (201700L <= CUTLASS_CPLUSPLUS)
|
||||
#define CUTLASS_CONSTEXPR_IF_CXX17 constexpr
|
||||
#define CUTLASS_CXX17_OR_LATER 1
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user