Add some const qualifiers in the hopes it will fix clang C++14 mode failures.

This commit is contained in:
jzmaddock
2013-12-13 19:13:48 +00:00
parent 1c3cec7a15
commit 958c9f8a51

View File

@ -24,15 +24,15 @@ constexpr const int* xp = addr(x);
struct A
{
constexpr A(int i) : val(i) { }
constexpr operator int() { return val; }
constexpr operator long() { return 43; }
constexpr operator int()const { return val; }
constexpr operator long()const { return 43; }
private:
int val;
};
template<int> struct X { };
constexpr A a = 42;
constexpr const A a = 42;
X<a> xx; // OK: unique conversion to int