This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81259] New: Class template deduction cannot work on Constructor without parameters in some cases
- From: "webrown.cpp at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 30 Jun 2017 16:14:37 +0000
- Subject: [Bug c++/81259] New: Class template deduction cannot work on Constructor without parameters in some cases
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81259
Bug ID: 81259
Summary: Class template deduction cannot work on Constructor
without parameters in some cases
Product: gcc
Version: 7.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: kmp53 at sina dot com
CC: webrown.cpp at gmail dot com
Target Milestone: ---
CC: webrown.cpp at gmail dot com
template<int N=128>
class C {
public:
void fn(){}
};
int main(int argc,char*argv[]){
C c;//OK
C{}.fn();//OK
C().fn();//cannot deduce template arguments for 'C' from ()
}