Skip to content

Wrong overload resolution protection in implementation of P2363R5 #334

@joaquintides

Description

@joaquintides

boost::container::insert(const_iterator, K&&) is not properly SFINAE-protected. The following is against the develop branch:

#include <boost/container/set.hpp>
#include <functional>

int main()
{
  using set = boost::container::set<int, std::less<>>;

  set s;
  const set cs;
  s.insert(cs.begin(), cs.end());
}
error C2668: 'boost::container::set<int,std::less<void>,void,void>::insert': ambiguous call to overloaded function

I haven't checked boost::container::unordered_set, but chances are it has the same problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions