Use dragon in constexpr

This commit is contained in:
Victor Zverovich
2023-05-22 17:06:37 -07:00
parent a54cb108d4
commit 858e528abd
4 changed files with 9 additions and 238 deletions

View File

@ -10,8 +10,9 @@
#if defined(__cpp_lib_bit_cast) && __cpp_lib_bit_cast >= 201806 && \
defined(__cpp_constexpr) && __cpp_constexpr >= 201907 && \
defined(__cpp_constexpr_dynamic_alloc) && \
defined(__cpp_constexpr_dynamic_alloc) && !FMT_MSC_VERSION && \
__cpp_constexpr_dynamic_alloc >= 201907 && FMT_CPLUSPLUS >= 202002L
template <size_t max_string_length, typename Char = char> struct test_string {
template <typename T> constexpr bool operator==(const T& rhs) const noexcept {
return fmt::basic_string_view<Char>(rhs).compare(buffer) == 0;