mirror of
https://github.com/boostorg/config.git
synced 2025-07-31 04:47:16 +02:00
Add some const qualifiers in the hopes it will fix clang C++14 mode failures.
This commit is contained in:
@ -24,15 +24,15 @@ constexpr const int* xp = addr(x);
|
|||||||
struct A
|
struct A
|
||||||
{
|
{
|
||||||
constexpr A(int i) : val(i) { }
|
constexpr A(int i) : val(i) { }
|
||||||
constexpr operator int() { return val; }
|
constexpr operator int()const { return val; }
|
||||||
constexpr operator long() { return 43; }
|
constexpr operator long()const { return 43; }
|
||||||
private:
|
private:
|
||||||
int val;
|
int val;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<int> struct X { };
|
template<int> struct X { };
|
||||||
|
|
||||||
constexpr A a = 42;
|
constexpr const A a = 42;
|
||||||
|
|
||||||
X<a> xx; // OK: unique conversion to int
|
X<a> xx; // OK: unique conversion to int
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user