diff options
Diffstat (limited to 'Tests/CompileFeatures/cxx_inheriting_constructors.cpp')
-rw-r--r-- | Tests/CompileFeatures/cxx_inheriting_constructors.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/CompileFeatures/cxx_inheriting_constructors.cpp b/Tests/CompileFeatures/cxx_inheriting_constructors.cpp new file mode 100644 index 0000000..a83b624 --- /dev/null +++ b/Tests/CompileFeatures/cxx_inheriting_constructors.cpp @@ -0,0 +1,18 @@ + +struct A +{ + int m_i; + + A(int i) : m_i(i) {} +}; + +struct B : public A +{ + using A::A; +}; + +void someFunc() +{ + int i; + B b(i); +} |