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
349c6351
Commit
349c6351
authored
Feb 22, 2017
by
Jason Merrill
Committed by
Jason Merrill
Feb 22, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* pt.c (do_class_deduction): Handle 0 argument case.
From-SVN: r245665
parent
e40b6fc7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
gcc/cp/ChangeLog
+4
-0
gcc/cp/pt.c
+8
-0
gcc/testsuite/g++.dg/cpp1z/class-deduction30.C
+6
-0
No files found.
gcc/cp/ChangeLog
View file @
349c6351
2017-02-22 Jason Merrill <jason@redhat.com>
* pt.c (do_class_deduction): Handle 0 argument case.
2017-02-22 Jakub Jelinek <jakub@redhat.com>
PR c++/79664
...
...
gcc/cp/pt.c
View file @
349c6351
...
...
@@ -25126,6 +25126,14 @@ do_class_deduction (tree ptype, tree tmpl, tree init, int flags,
if
(
cands
==
NULL_TREE
)
{
if
(
args
->
length
()
==
0
)
{
/* Try tmpl<>. */
tree
t
=
lookup_template_class
(
tmpl
,
NULL_TREE
,
NULL_TREE
,
NULL_TREE
,
false
,
tf_none
);
if
(
t
!=
error_mark_node
)
return
t
;
}
error
(
"cannot deduce template arguments for %qT, as it has "
"no deduction guides or user-declared constructors"
,
type
);
return
error_mark_node
;
...
...
gcc/testsuite/g++.dg/cpp1z/class-deduction30.C
0 → 100644
View file @
349c6351
// { dg-options -std=c++1z }
template
<
class
T
=
void
>
struct
A
{
};
A
a
{};
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