C++ compile error when using std::apply with clang 4.0.0.
See original GitHub issueclang 4.0.0 has C++17 std::apply implementation. I confirmed that it works OK on my local LLVM 4.0.0 installation.
Following are test codes to reproduce the compile error. It fails with clang 4.0.0 and clang (trunk). But it succeeded with gcc 7.1 and gcc (snapshot).
Of course, I set -std=c++1z
compiler option.
#include <tuple>
constexpr int add(int a, int b)
{
return a + b;
}
static_assert(std::apply(&add, std::make_tuple(10, 20)) == 30);
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
C++ compile error when using std::apply with clang 4.0.0. #440
clang 4.0.0 has C++17 std::apply implementation. I confirmed that it works OK on my local LLVM 4.0.0 installation. Following are test codes ...
Read more >Clang++ 4.0.0 compilation error in windows - Stack Overflow
On compilation I get the following error: C:\Sample>clang++ -emit-llvm -S assiral.cpp -o assiral.ll In file included from assiral.cpp:3 ...
Read more >Clang Compiler User's Manual - LLVM releases
This document describes important notes about using Clang as a compiler for an end-user, documenting the supported features, command line options, etc.
Read more >Clang linking error MacOS Big Sur | Apple Developer Forums
Hi All, I am trying to build my helloworld.cpp, but I am having problem since I updated to Big Sur. Below a verbose...
Read more >1459393 – clang fails with -std=c++17 or - Red Hat Bugzilla
Description of problem: This small program fails to compile ... include/c++/7/mutex:672:4: error: no matching function for call to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Add the parameter -stdlib=libc++ to use clang’s library instead of the default GCC library. On Fri, May 26, 2017 at 1:24 AM, Gil Ho, Jang notifications@github.com wrote:
Oh wow! I thought I’d already updated them to do so! Will do that at least!!! Thanks 😃