[LLVMbugs] [Bug 14012] New: Cannot uniformly initialize empty sets.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 3 15:42:39 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=14012

             Bug #: 14012
           Summary: Cannot uniformly initialize empty sets.
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nsabovic at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


This code:

#include <set>
std::set<std::set<int>> y{{}};

Compiles on gcc 4.7.2, but clang gives out this error:

bug.cc:2:27: error: chosen constructor is explicit in copy-initialization
std::set<std::set<int>> y{{}};
                          ^~
/usr/include/c++/v1/set:378:14: note: constructor declared here
    explicit set(const value_compare& __comp = value_compare())

The fact that constructor is explicit should not matter when it's called with
no parameters, no?

This also fails:

std::set<int> x = {};

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list