summaryrefslogtreecommitdiffstats
path: root/test/CXX/dcl.dcl/p4-0x.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/dcl.dcl/p4-0x.cpp')
-rw-r--r--test/CXX/dcl.dcl/p4-0x.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/CXX/dcl.dcl/p4-0x.cpp b/test/CXX/dcl.dcl/p4-0x.cpp
index 31d4912..1f4cdda 100644
--- a/test/CXX/dcl.dcl/p4-0x.cpp
+++ b/test/CXX/dcl.dcl/p4-0x.cpp
@@ -2,15 +2,15 @@
struct S {
constexpr S(bool b) : b(b) {}
- constexpr explicit operator bool() { return b; }
+ constexpr explicit operator bool() const { return b; }
bool b;
};
struct T {
- constexpr operator int() { return 1; }
+ constexpr operator int() const { return 1; }
};
struct U {
- constexpr operator int() { return 1; } // expected-note {{candidate}}
- constexpr operator long() { return 0; } // expected-note {{candidate}}
+ constexpr operator int() const { return 1; } // expected-note {{candidate}}
+ constexpr operator long() const { return 0; } // expected-note {{candidate}}
};
static_assert(S(true), "");
OpenPOWER on IntegriCloud