comparison gcc/testsuite/g++.dg/cpp1y/pr87410.C @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 // PR c++/87410
2 // { dg-do compile { target c++14 } }
3
4 template <long a> using b = const char[a];
5 template <typename, int c, int e, typename f>
6 constexpr auto g(b<c> &, b<e> &, f) {}
7 template <typename d, int a> auto h(b<a> &) {
8 auto i = j(static_cast<d **>(nullptr));
9 return **i;
10 }
11 class k {
12 using l = k;
13 const int &m() const;
14 friend constexpr auto j(l **n) -> decltype(n) {
15 g<int>("", "", static_cast<const int &(k::*)() const>(&k::m));
16 return n;
17 }
18 };
19 k o = h<k, 1>("");