[Bug c++/58399] New: explicit constructor called implicitly with empty init-list

f.heckenbach@fh-soft.de gcc-bugzilla@gcc.gnu.org
Thu Sep 12 03:04:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58399

            Bug ID: 58399
           Summary: explicit constructor called implicitly with empty
                    init-list
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: f.heckenbach@fh-soft.de

I think the following test should not compile, where an a object is implicitly
constructed when calling foo() using its explicit constructor.

struct a
{
  explicit a () { }
};

void foo (a)
{
}

int main ()
{
  foo ({ });
}



More information about the Gcc-bugs mailing list