[Bug c++/84283] std::map::insert(const_iterator, P&&) now ambiguous with std::map::insert(InputIterator, InputIterator)
lh_mouse at 126 dot com
gcc-bugzilla@gcc.gnu.org
Thu Feb 8 14:10:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84283
--- Comment #2 from Liu Hao <lh_mouse at 126 dot com> ---
Ditto, but even more reduced:
----------
#include <type_traits>
template<typename Key>
struct map {
template<typename Pair, typename = typename
std::enable_if<std::is_constructible<int, Pair&&>::value>::type>
void * insert(void * pos, Pair&& x);
template<typename Iterator>
void insert(Iterator first, Iterator last);
};
template<typename IdType>
struct map_type_to_map : map<IdType> {
void add() {
void * ptr = 0;
map<int> current_values;
current_values.insert(ptr, ptr);
}
};
More information about the Gcc-bugs
mailing list