Search code examples
c++templatesclangc++17libc++

Why does libc++ not support class template argument deduction on multiset?


#include <set>

int main()
{
    auto coll = std::multiset{ 1, 2, 2, 3, 4, 4, 7 };
}

The code above can be compiled by vc++ 2019 and g++ 9.0, but cannot be compiled by clang++ 8.0 as clang++ -std=c++2a -stdlib=libc++ main.cpp

Why does libc++ not support class template argument deduction on multiset?


Solution

  • Because it took until recently for someone to implement it.

    These features don't write themselves, and different projects prioritise different things.

    You are of course free to join the project and contribute any features you feel are missing!