Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
ea070f26
Commit
ea070f26
authored
Jan 23, 2018
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* g++.dg/cpp1y/lambda-generic.C: Remove libstdc++ dependency.
From-SVN: r257001
parent
d78201d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
gcc/testsuite/g++.dg/cpp1y/lambda-generic.C
+5
-4
No files found.
gcc/testsuite/g++.dg/cpp1y/lambda-generic.C
View file @
ea070f26
// Generic lambda test from N3690 5.1.2.5
// { dg-do compile { target c++14 } }
#include <iostream>
struct
A
{
}
cout
;
template
<
class
T
>
A
&
operator
<<
(
A
&
a
,
T
);
int
main
()
{
auto
glambda
=
[](
auto
a
,
auto
&&
b
)
{
return
a
<
b
;
};
bool
b
=
glambda
(
3
,
3
.
14
);
// OK
auto
vglambda
=
[](
auto
printer
)
{
return
[
=
](
auto
&&
...
ts
)
{
// OK: ts is a function parameter pack
printer
(
std
::
forward
<
decltype
(
ts
)
>
(
ts
)
...);
return
[
=
](
auto
...
ts
)
{
// OK: ts is a function parameter pack
printer
(
ts
...);
return
[
=
]()
{
printer
(
ts
...);
};
};
};
auto
p
=
vglambda
(
[](
auto
v1
,
auto
v2
,
auto
v3
)
{
std
::
cout
<<
v1
<<
v2
<<
v3
;
}
);
{
cout
<<
v1
<<
v2
<<
v3
;
}
);
auto
q
=
p
(
1
,
'a'
,
3
.
14
);
// OK: outputs 1a3.14
q
();
// OK: outputs 1a3.14
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment