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
8b7033e0
Commit
8b7033e0
authored
Oct 05, 2016
by
Jason Merrill
Committed by
Jason Merrill
Oct 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* semantics.c (finish_compound_literal): Handle class placeholder.
From-SVN: r240802
parent
2e21fd4d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
gcc/cp/ChangeLog
+4
-0
gcc/cp/semantics.c
+5
-0
gcc/testsuite/g++.dg/cpp1z/class-deduction18.C
+7
-0
No files found.
gcc/cp/ChangeLog
View file @
8b7033e0
2016-10-05 Jason Merrill <jason@redhat.com>
* semantics.c (finish_compound_literal): Handle class placeholder.
2016-10-05 Marek Polacek <polacek@redhat.com>
Implement P0305R1, Selection statements with initializer.
...
...
gcc/cp/semantics.c
View file @
8b7033e0
...
...
@@ -2671,6 +2671,11 @@ finish_compound_literal (tree type, tree compound_literal,
return
error_mark_node
;
}
if
(
tree
anode
=
type_uses_auto
(
type
))
if
(
CLASS_PLACEHOLDER_TEMPLATE
(
anode
))
type
=
do_auto_deduction
(
type
,
compound_literal
,
anode
,
complain
,
adc_variable_type
);
if
(
processing_template_decl
)
{
TREE_TYPE
(
compound_literal
)
=
type
;
...
...
gcc/testsuite/g++.dg/cpp1z/class-deduction18.C
0 → 100644
View file @
8b7033e0
// { dg-options -std=c++1z }
template
<
class
T
>
struct
S
{
S
(
T
){}};
int
main
()
{
S
{
1
};
}
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