summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures/cxx_unrestricted_unions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CompileFeatures/cxx_unrestricted_unions.cpp')
-rw-r--r--Tests/CompileFeatures/cxx_unrestricted_unions.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/Tests/CompileFeatures/cxx_unrestricted_unions.cpp b/Tests/CompileFeatures/cxx_unrestricted_unions.cpp
index 698fd61..f6d64f6 100644
--- a/Tests/CompileFeatures/cxx_unrestricted_unions.cpp
+++ b/Tests/CompileFeatures/cxx_unrestricted_unions.cpp
@@ -1,10 +1,16 @@
-struct point {
+struct point
+{
point() {}
- point(int x, int y) : x_(x), y_(y) {}
+ point(int x, int y)
+ : x_(x)
+ , y_(y)
+ {
+ }
int x_, y_;
};
-union u {
+union u
+{
point p_;
int i_;
const char* s_;