Skip to content

Commit 52bb9a3

Browse files
committed
Clean up some C++11 constexpr warnings in clang
1 parent 7f0b1df commit 52bb9a3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

optional.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class optional {
4040
else
4141
WISE_ENUM_OPTIONAL_BAD_ACCESS;
4242
}
43-
constexpr const T &value() const & {
43+
WISE_ENUM_CONSTEXPR_14 const T &value() const & {
4444
if (m_active)
4545
return m_t;
4646
else
@@ -53,15 +53,15 @@ class optional {
5353
else
5454
WISE_ENUM_OPTIONAL_BAD_ACCESS;
5555
}
56-
constexpr const T &&value() const && {
56+
WISE_ENUM_CONSTEXPR_14 const T &&value() const && {
5757
if (m_active)
5858
return m_t;
5959
else
6060
WISE_ENUM_OPTIONAL_BAD_ACCESS;
6161
}
6262

6363
template <class U>
64-
constexpr T value_or(U &&u) {
64+
WISE_ENUM_CONSTEXPR_14 T value_or(U &&u) {
6565
if (m_active)
6666
return m_t;
6767
else

0 commit comments

Comments
 (0)