Closed shoushouzhuo closed 1 year ago
F:/wyProj2023/common/cpp_yyjson.hpp:3188:78: error: call to non-'constexpr' function 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::begin() [with _Tp = char; _Alloc = std::allocator; std::vector<_Tp, Alloc>::iterator = std::vector::iterator]' 3188 | [[nodiscard]] constexpr auto begin() noexcept { return buf.begin(); } | ~~^~
@shoushouzhuo Please make sure that your compiler fully supports C++20.
NG: GCC 11 https://godbolt.org/z/hKv9jznMo OK: GCC 12 https://godbolt.org/z/TYrnc4szj
F:/wyProj2023/common/cpp_yyjson.hpp:3188:78: error: call to non-'constexpr' function 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::begin() [with _Tp = char; _Alloc = std::allocator; std::vector<_Tp, Alloc>::iterator = std::vector::iterator]'
3188 | [[nodiscard]] constexpr auto begin() noexcept { return buf .begin(); }
|
~~^~