-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Full name of submitter: Brian Bi
Reference (section label): [class.conv.fct]
See also cplusplus/draft#8490 for discussion.
Issue description
Following CWG1670, the ban of conversion function templates with deduced return type in [class.conv.fct] paragraph 8 has become redundant, except that removing this paragraph would make such uses of placeholder type specifiers IFNDR, not ill-formed.
Suggested resolution
Delete [class.conv.fct] paragraph 8:
-A conversion function template shall not have a deduced return type ([dcl.spec.auto]).
-[Example:
-struct S {
- operator auto() const { return 10; } // OK
- template<class T>
- operator auto() const { return 1.2; } // error: conversion function template
-};
-— end example]Change [dcl.spec.auto.general] paragraph 4 as follows: SUPERSEDED, SEE BELOW
A placeholder type can appear in
the decl-specifier-seq or type-specifier-seq
in the declared return type of a function declarator
that declares
+either
a function other than a conversion function\iref{class.conv.fct}
+or a conversion function template
;
...Metadata
Metadata
Assignees
Labels
No labels