| 1 |
// PR c++/61556 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
|
| 4 |
class ValueType { |
| 5 |
public: |
| 6 |
constexpr operator int() const {return m_ID;}; |
| 7 |
constexpr ValueType(const int v) |
| 8 |
: m_ID(v) {} |
| 9 |
private: |
| 10 |
int m_ID; |
| 11 |
}; |
| 12 |
|
| 13 |
class ValueTypeEnum { |
| 14 |
public: |
| 15 |
static constexpr ValueType doubleval = ValueType(1); |
| 16 |
}; |
| 17 |
|
| 18 |
template <int format> |
| 19 |
class ValueTypeInfo { |
| 20 |
}; |
| 21 |
|
| 22 |
template <typename Format> |
| 23 |
class FillFunctor { |
| 24 |
public: |
| 25 |
FillFunctor() { |
| 26 |
ValueTypeInfo<ValueTypeEnum::doubleval> v; |
| 27 |
} |
| 28 |
}; |
| 29 |
|
| 30 |
int main() { |
| 31 |
ValueTypeInfo<ValueTypeEnum::doubleval> v; |
| 32 |
} |