Commit 943e7063 by Marek Polacek Committed by Marek Polacek

re PR c++/65707 (internal compiler error: in unify, at cp/pt.c:18577)

	PR c++/65707
	PR c++/89480
	PR c++/58836
	* g++.dg/cpp0x/nondeduced5.C: New test.
	* g++.dg/cpp0x/nondeduced6.C: New test.
	* g++.dg/cpp0x/nondeduced7.C: New test.

From-SVN: r272589
parent ec121f15
2019-06-22 Marek Polacek <polacek@redhat.com>
PR c++/65707
PR c++/89480
PR c++/58836
* g++.dg/cpp0x/nondeduced5.C: New test.
* g++.dg/cpp0x/nondeduced6.C: New test.
* g++.dg/cpp0x/nondeduced7.C: New test.
PR c++/66256
* g++.dg/cpp0x/noexcept54.C: New test.
......
// PR c++/65707
// { dg-do compile { target c++11 } }
template <int a> struct b {
typedef int c;
constexpr operator c() { return a; }
};
template <bool> struct d;
template <typename> struct e : b<true> {};
template <typename, typename = d<true>> struct f;
template <typename g> struct f<g, d<e<g>{}>> {};
template struct f<int>;
// PR c++/89480
// { dg-do compile { target c++11 } }
template <typename Foo, Foo Part>
struct TSelect {};
enum What {
The
};
template <typename Foo>
struct AnotherOneSelector {
static constexpr Foo Id = Foo::The;
};
template <typename Foo, typename SelectPartType>
struct THelper;
template <typename Foo>
struct THelper<Foo, TSelect<Foo, Foo{AnotherOneSelector<Foo>::Id}>> {};
int main() {
THelper<What, TSelect<What, What::The>> t;
}
// PR c++/58836
// { dg-do compile { target c++11 } }
template<typename, int> struct A;
template<typename T> struct A<T, T{}> {}; // { dg-error "partial specialization" }
A<int, 0> 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