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: [email protected]
ReportedBy: [email protected]
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());
}