summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures/cxx_explicit_conversions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CompileFeatures/cxx_explicit_conversions.cpp')
-rw-r--r--Tests/CompileFeatures/cxx_explicit_conversions.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tests/CompileFeatures/cxx_explicit_conversions.cpp b/Tests/CompileFeatures/cxx_explicit_conversions.cpp
new file mode 100644
index 0000000..0decdcd
--- /dev/null
+++ b/Tests/CompileFeatures/cxx_explicit_conversions.cpp
@@ -0,0 +1,10 @@
+
+class A
+{
+ int m_i;
+public:
+ explicit operator bool()
+ {
+ return m_i != 0;
+ }
+};