Opened 6 years ago

Last modified 4 years ago

#12467 new Bugs

[regression] clang 3.9 and trunk fail to compile small_vector (ICE)

Reported by: anonymous Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: container
Version: Boost 1.61.0 Severity: Regression
Keywords: Cc:

Description

https://llvm.org/bugs/show_bug.cgi?id=29091

Minimal example:

#include <boost/container/small_vector.hpp> #include <type_traits>

using boost::container::small_vector;

struct A : small_vector<int, 3> {

using vector_t = small_vector<int, 3>; using vector_t::vector_t; using vector_t::operator=;

};

template <typename P> inline void foo(P) {

small_vector<P, 3> pls; pls.push_back(P{});

}

int main() {

foo(A{}); return 0;

}

Results in an internal compiler error.

Change History (1)

comment:1 by James E. King, III, 4 years ago

Comment from the llvm issue:

But I would question why boost is using __has_nothrow_copy. That trait is essentially useless; __is_nothrow_constructible should be used instead.

Note: See TracTickets for help on using tickets.