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 libstdc++/55043] New: issue with nesting unordered_map containing unique_ptr into vector


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

             Bug #: 55043
           Summary: issue with nesting unordered_map containing unique_ptr
                    into vector
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: boris.bigott@hotmail.com


The program below does not compile using gcc-4.7.2 or clang-3.1 together with
libstdc++-4.7.2. Using gcc-4.6.3 with corresponding libstdc++ or clang-3.1 with
clangs libc++ works. Nesting uim in other containers like pair, tuple, or
unordered_map works too. Apparently, only vector is affected.

#include <memory>
#include <unordered_map>
#include <vector>

int main() {
    typedef std::unique_ptr<int> uip;
    typedef std::unordered_map<int, uip> uim;
    typedef std::vector<uim> uiv;
    uiv v;
    v.emplace_back(uim());
}


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