summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures/cxx_delegating_constructors.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CompileFeatures/cxx_delegating_constructors.cpp')
-rw-r--r--Tests/CompileFeatures/cxx_delegating_constructors.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/CompileFeatures/cxx_delegating_constructors.cpp b/Tests/CompileFeatures/cxx_delegating_constructors.cpp
new file mode 100644
index 0000000..4b41615
--- /dev/null
+++ b/Tests/CompileFeatures/cxx_delegating_constructors.cpp
@@ -0,0 +1,15 @@
+
+class Foo
+{
+public:
+ Foo(int i);
+
+ Foo(double d)
+ : Foo(static_cast<int>(d))
+ {
+
+ }
+
+private:
+ int m_i;
+};