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
However, it appears that it can only be evaluated at compile-time when using MSVC, because it depends on TENSORSTORE_DATA_TYPE_CONSTEXPR_OPERATIONS, which is only defined for MSVC:
As a consequence, a client function that calls DataType::id() may only evaluated at compile-time evaluation when using MSVC. This appears inconvenient to me.
Would it be possible to allow compile-time evaluation of DataType::id() on any of the supported platforms?
The text was updated successfully, but these errors were encountered:
N-Dekker
changed the title
Please allow compile-time evaluation of DataType::id() (constexpr), platform-independent
Please allow compile-time evaluation of DataType::id() (constexpr), platform-independently
Aug 20, 2024
DataType::id()
is defined "constexpr", attensorstore/tensorstore/data_type.h
Line 696 in d5edeac
However, it appears that it can only be evaluated at compile-time when using MSVC, because it depends on
TENSORSTORE_DATA_TYPE_CONSTEXPR_OPERATIONS
, which is only defined for MSVC:tensorstore/tensorstore/data_type.h
Lines 86 to 92 in d5edeac
TENSORSTORE_DATA_TYPE_CONSTEXPR_OPERATIONS
specifies whether or notMakeDataTypeOperations::operations
is constexpr:tensorstore/tensorstore/data_type.h
Lines 1145 to 1149 in d5edeac
As a consequence, a client function that calls
DataType::id()
may only evaluated at compile-time evaluation when using MSVC. This appears inconvenient to me.tensorstoreToITKComponentType
at compile-time, using constexpr InsightSoftwareConsortium/ITKIOOMEZarrNGFF#68 It appears to work well on Windows (MSVC), but did not compile on Ubuntu (GCC).Would it be possible to allow compile-time evaluation of
DataType::id()
on any of the supported platforms?The text was updated successfully, but these errors were encountered: