Make StringViewLiteral use ConstEval
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
0d2bec95e8
commit
84052a2d94
|
@ -11,9 +11,9 @@ namespace ArbUt {
|
|||
const char* _str;
|
||||
|
||||
public:
|
||||
constexpr StringViewLiteral(const char* str, size_t size) noexcept
|
||||
consteval StringViewLiteral(const char* str, size_t size) noexcept
|
||||
: BasicStringView(size, Hash(str)), _str(str) {}
|
||||
constexpr StringViewLiteral(const char* str) noexcept : StringViewLiteral(str, CalcLength(str)){};
|
||||
consteval StringViewLiteral(const char* str) noexcept : StringViewLiteral(str, CalcLength(str)){};
|
||||
[[nodiscard]] inline constexpr const char* c_str() const noexcept { return _str; }
|
||||
constexpr std::string_view std_str() const noexcept { return std::string_view(_str, _length); }
|
||||
constexpr std::size_t operator()(StringViewLiteral const& s) const noexcept { return s.GetHash(); }
|
||||
|
@ -36,10 +36,10 @@ namespace std {
|
|||
};
|
||||
}
|
||||
|
||||
inline constexpr ArbUt::StringViewLiteral operator"" _const_nocase(const char* c, size_t l) {
|
||||
inline consteval ArbUt::StringViewLiteral operator"" _const_nocase(const char* c, size_t l) {
|
||||
return ArbUt::StringViewLiteral(c, l);
|
||||
}
|
||||
inline constexpr ArbUt::StringViewLiteral operator"" _cnc(const char* c, size_t l) {
|
||||
inline consteval ArbUt::StringViewLiteral operator"" _cnc(const char* c, size_t l) {
|
||||
return ArbUt::StringViewLiteral(c, l);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue