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

Reply via email to