diff options
Diffstat (limited to 'clang/test/SemaCXX/overloaded-builtin-operators-0x.cpp')
-rw-r--r-- | clang/test/SemaCXX/overloaded-builtin-operators-0x.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/overloaded-builtin-operators-0x.cpp b/clang/test/SemaCXX/overloaded-builtin-operators-0x.cpp new file mode 100644 index 0000000..6a5a162 --- /dev/null +++ b/clang/test/SemaCXX/overloaded-builtin-operators-0x.cpp @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -fsyntax-only -fshow-overloads=best -std=c++11 -verify %s + +template <class T> +struct X +{ + operator T() const {return T();} +}; + +void test_char16t(X<char16_t> x) { + bool b = x == char16_t(); +} |