https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84283
Liu Hao <lh_mouse at 126 dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lh_mouse at 126 dot com --- Comment #1 from Liu Hao <lh_mouse at 126 dot com> --- This is a reduced testcase, which compiles fine using clang++ HEAD: <https://wandbox.org/permlink/yFf8eAbMWxE5HKUC> ---------- #include <type_traits> template<typename F, typename S> struct pair { F first; S second; pair(F, S); }; template<typename K, typename V> struct map { using value_type = pair<const K, V>; using const_iterator = const value_type *; using iterator = value_type *; const_iterator begin() const; const_iterator end() const; template<typename Pair, typename = typename std::enable_if<std::is_constructible<value_type, Pair&&>::value>::type> iterator insert(const_iterator pos, Pair&& x); template<typename Iterator> void insert(Iterator first, Iterator last); }; template<typename IdType> struct map_type_to_map : map<IdType, int> { void add() { map<int, int> current_values, values; current_values.insert(values.begin(), values.end()); } };