Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clang -std=c++17 compiles the following if using libstdc++:
#include static_assert(std::is_trivially_constructible_v<std::tuple<>>);
But adding -stdlib=libc++ causes
test.cc:3:1: error: static_assert failed due to requirement 'std::is_trivially_constructible_v<std::__1::tuple<>>
The text was updated successfully, but these errors were encountered:
assigned to @ldionne
Sorry, something went wrong.
A few minutes of looking through the standard did not turn up any requirement that tuple<> be trivially constructible.
trivially destructible, yes.
4 If is_trivially_destructible_v is true for all Ti, then the destructor of tuple is trivial.
constexpr, yes.
The defaulted move and copy constructor of tuple<> shall be constexpr functions.
Can you tell me where you believe this requirement comes from?
I have no idea if the standard requires this, but it would be a nice to have extension if it doesn't. Specially considering that libstdc++ has it.
Generally speaking, I'm philosophically opposed to "things that everyone does, but aren't in the standard".
If this is a good thing, then we should write it into the standard.
I think it's a reasonable thing to do as a matter of QOI. The change is very simple, too, and it's the natural way to write that default constructor IMO.
Review here: https://reviews.llvm.org/D62618
Fixed in r363075.
ldionne
No branches or pull requests
Extended Description
Clang -std=c++17 compiles the following if using libstdc++:
#include
static_assert(std::is_trivially_constructible_v<std::tuple<>>);
But adding -stdlib=libc++ causes
test.cc:3:1: error: static_assert failed due to requirement 'std::is_trivially_constructible_v<std::__1::tuple<>>
The text was updated successfully, but these errors were encountered: