1 // RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
2 // expected-no-diagnostics
3 
4 struct Variant {
5   template <typename T> operator T();
6 };
7 
8 Variant getValue();
9 
10 void testVariant() {
11   bool ret1 = getValue() || getValue();
12   bool ret2 = getValue() && getValue();
13   bool ret3 = !getValue();
14 }
15 
16 struct ExplicitVariant {
17   template <typename T> explicit operator T();
18 };
19 
20 ExplicitVariant getExplicitValue();
21 
22 void testExplicitVariant() {
23   bool ret1 = getExplicitValue() || getExplicitValue();
24   bool ret2 = getExplicitValue() && getExplicitValue();
25   bool ret3 = !getExplicitValue();
26 }
27