Closed toge closed 1 month ago
I have not tested the compatibility with C++11 but I have not consciously used any features that would require C++14, either. If you don't get any compiler warnings, it should be fine.
This code snippet: constexpr dtype_t has_typestring<float>::dtype;
and the equivalent code for all other types, double
, long double
, int
, etc. is problematic with C++11, because in C++11constexpr
does not imply inline
for non-static variables! That violates the One Definition Rule (ODR), so, multiple definitions fail to link.
I've done some more research on that, as I understand, there is a difference on the effect of constexpr
on variables or functions between C++17 and C++11.
For functions, in C++17 & C++11, constexpr
implies inline
so there is no violation of the ODR. However, for non-static variables in C++11 constexpr
does not imply inline
!
This code snippet:
constexpr dtype_t has_typestring<float>::dtype;
and the equivalent code for all other types,double
,long double
,int
, etc. is problematic with C++11, because in C++11constexpr
does not implyinline
for non-static variables! That violates the One Definition Rule (ODR), so, multiple definitions fail to link.
This construct is not being used anymore recent versions of libnpy.
Hi. I am writing a recipe for libnpy for a package manager called conan.
Let me ask a question that has arisen while writing the recipe.
Version 1.0.1 appears to be buildable in C++11. Does libnpy officially support C++14 and not C++11?