Commit b6b240ed by Paolo Carlini

re PR c++/82308 ([C++17] deduction of template arguments results in internal compiler error)

2017-10-19  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/82308
	* g++.dg/cpp1z/class-deduction45.C: New.

From-SVN: r253920
parent 6d2bd9ff
2017-10-18 Uros Bizjak <ubizjak@gmail.com>
2017-10-19 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/82308
* g++.dg/cpp1z/class-deduction45.C: New.
2017-10-19 Uros Bizjak <ubizjak@gmail.com>
Jakub Jelinek <jakub@redhat.com>
PR target/82618
......
// PR c++/82308
// { dg-options -std=c++17 }
template<typename, unsigned>
struct array {};
template <unsigned R>
class X {
public:
using T = array<int, R>;
enum class C : char { A, B };
X(T bounds, C c = C::B) : t(bounds) {}
private:
T t;
};
int main()
{
array<int, 2> a;
X d{a};
X<2> e{a};
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment