repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Implement P0315R4, Lambdas in unevaluated contexts.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp2a
/
lambda-uneval8.C
blob
3692154f9becda7b5f966b8365bb26303ea6150a
1
// { dg-do compile { target c++2a } }
2
3
template <auto N>
4
struct A {
5
static constexpr auto n = N;
6
};
7
8
template <auto N>
9
constexpr auto g(A<[]{return N;}> a) {
10
return a.n();
11
}
12
13
static_assert(g<42>({}) == 42);