Skip to content

Commit feb415f

Browse files
committed
Fix: Variable in C++14 constexpr
1 parent 90540d3 commit feb415f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/stringzilla/stringzilla.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,8 @@ class basic_byteset {
341341
return *this;
342342
}
343343

344-
constexpr basic_byteset operator|(basic_byteset other) const noexcept {
345-
basic_byteset result = *this;
344+
sz_constexpr_if_cpp14 basic_byteset operator|(basic_byteset other) const noexcept {
345+
basic_byteset result = *this; //? Variable declaration in a `constexpr` function is a C++14 extension
346346
result.bitset_._u64s[0] |= other.bitset_._u64s[0], result.bitset_._u64s[1] |= other.bitset_._u64s[1],
347347
result.bitset_._u64s[2] |= other.bitset_._u64s[2], result.bitset_._u64s[3] |= other.bitset_._u64s[3];
348348
return result;

0 commit comments

Comments
 (0)