This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/81259] New: Class template deduction cannot work on Constructor without parameters in some cases


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 ()
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]