Closed apivovarov closed 3 years ago
Thank you for reporting this. However, I do not quite understand the problem yet.. According to https://en.cppreference.com/w/cpp/named_req/LiteralType, arrays should be allowed. I will look into it.
@apivovarov: could you try replacing
constexpr std::array<char,3> endian_chars = { little_endian_char, big_endian_char, no_endian_char };
constexpr std::array<char,4> numtype_chars = { 'f', 'i', 'u', 'c' };
with
constexpr std::array<char,3> endian_chars {{ little_endian_char, big_endian_char, no_endian_char }};
constexpr std::array<char,4> numtype_chars {{ 'f', 'i', 'u', 'c' }};
and see if that works for you?
ok, I used old version 641f2a5 The issue was already fixed here https://github.com/llohse/libnpy/commit/3e0e373828d88b0a1df2ba73cc31616a848b1aef Sorry for false alarm
Thanks for the clarification. Maybe I should start to use version numbers...
Any plans to make it compatible with clang?
Problematic line: https://github.com/llohse/libnpy/blob/master/npy.hpp#L67
More on the issue: https://stackoverflow.com/questions/46576847/clang-vs-gcc-crtp-constexpr-variable-cannot-have-non-literal-type
C++ named requirements: LiteralType: https://en.cppreference.com/w/cpp/named_req/LiteralType