[Bug c++/84283] std::map::insert(const_iterator, P&&) now ambiguous with std::map::insert(InputIterator, InputIterator)
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Feb 8 14:24:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84283
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-02-08
Ever confirmed|0 |1
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Thanks. And again with no library dependency:
template<bool, typename = void> struct enable_if { };
template<typename T> struct enable_if<true, T> { using type = T; };
template<typename> struct trait { static constexpr bool value = false; };
template<typename Key>
struct map {
template<typename Pair, typename = typename
enable_if<trait<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