Skip to content
Snippets Groups Projects
Commit 1c798ab7 authored by Marek Polacek's avatar Marek Polacek
Browse files

c++: Add fixed test [PR83596]

This was fixed by r269078.

	PR c++/83596

gcc/testsuite/ChangeLog:

	* g++.dg/cpp1z/nontype5.C: New test.
parent bb7cf39b
No related branches found
No related tags found
No related merge requests found
// PR c++/83596
// { dg-do compile { target c++17 } }
struct X { int x; int y; };
template <int X::* mp> int get(X& x) { return x.*mp; }
constexpr int X::* getMP() { return &X::y; }
constexpr int X::* mptr = getMP();
int test() {
X x{1, 2};
return get<mptr>(x);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment