[llvm-bugs] [Bug 41994] New: [windows-only] #include <vector> breaks structured binding for aggregated types
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu May 23 07:47:45 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41994
Bug ID: 41994
Summary: [windows-only] #include <vector> breaks structured
binding for aggregated types
Product: clang
Version: 8.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++17
Assignee: unassignedclangbugs at nondot.org
Reporter: development at jordi.vilar.cat
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
The following code, compiled with -std=c++17, fails in windows build of
clang-8, compiles correctly in linux build of the same clang version. The
diagnostics message says:
error: cannot decompose this type; 'std::tuple_size<const
aggregated_type>::value' is not a valid integral constant expression
#include <vector>
struct aggregated_type
{
double a, b, c, d;
};
int main(int, char**)
{
const aggregated_type aggregate{};
const auto&[a, b, c, d] = aggregate;
}
commenting out the #include <vector> line, compiles as expected
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190523/1c9d554f/attachment.html>
More information about the llvm-bugs
mailing list