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: unassignedclangb...@nondot.org
Reporter: developm...@jordi.vilar.cat
CC: blitzrak...@gmail.com, erik.pilking...@gmail.com,
llvm-bugs@lists.llvm.org, richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs