Description of problem: This small program fails to compile ------small.cpp------ #include <future> int main() { return 0;clang-4.0.0-3.fc26.x86_64 } --------------------- with clang++ -std=c++1z small.cpp or clang++ -std=c++1z small.cpp Version-Release number of selected component (if applicable): libstdc++-devel-7.1.1-2.fc26.x86_64 clang-4.0.0-3.fc26.x86_64 How reproducible: Every time. Steps to Reproduce: 1.Create small.cpp 2.Do clang++ -std=c++17 small.cpp 3.Observe the resulting errors Actual results: In file included from small.cpp:1: In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/future:38: /usr/bin/../lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/mutex:672:4: error: no matching function for call to '__invoke' std::__invoke(std::forward<_Callable>(__f), ^~~~~~~~~~~~~ /usr/bin/../lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/future:401:2: note: in instantiation of function template specialization 'std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()> *, bool *), std::__future_base::_State_baseV2 *, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()> *, bool *>' requested here call_once(_M_once, &_State_baseV2::_M_do_set, this, ^ /usr/bin/../lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/invoke.h:89:5: note: candidate template ignored: substitution failure [with _Callable = void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()> *, bool *), _Args = <std::__future_base::_State_baseV2 *, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()> *, bool *>]: no type named 'type' in 'std::__invoke_result<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()> *, bool *), std::__future_base::_State_baseV2 *, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()> *, bool *>' __invoke(_Callable&& __fn, _Args&&... __args) ^ In file included from small.cpp:1: In file included from /usr/bin/../lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/future:38: /usr/bin/../lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/mutex:672:4: error: no matching function for call to '__invoke' std::__invoke(std::forward<_Callable>(__f), ^~~~~~~~~~~~~ /usr/bin/../lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/future:1646:27: note: in instantiation of function template specialization 'std::call_once<void (std::thread::*)(), std::thread *>' requested here void _M_join() { std::call_once(_M_once, &thread::join, &_M_thread); } ^ /usr/bin/../lib/gcc/x86_64-redhat-linux/7/../../../../include/c++/7/bits/invoke.h:89:5: note: candidate template ignored: substitution failure [with _Callable = void (std::thread::*)(), _Args = <std::thread *>]: no type named 'type' in 'std::__invoke_result<void (std::thread::*)(), std::thread *>' __invoke(_Callable&& __fn, _Args&&... __args) ^ 2 errors generated. Expected results: A nice a.out file that does nothing
We should consider removing the libstdc++so7 component in bugzilla, it just confuses users. This has nothing to do with libstdc++so7.
Clang doesn't support the GNU extension that libstdc++ relies on for deducing noexcept on a function type, which is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80690 and reported to Clang as https://bugs.llvm.org/show_bug.cgi?id=32974
What is the right component to report this against then?
Oh, sorry, nevermind. I missed the component switching to gcc.
This was fixed upstream in clang by r304946, which first appeared in the 5.0 release. This patch is too big to backport to 4.0, so you will need to upgrade to f27 if you want a fix for this bug.