brintos

brintos / llvm-project-archived public Read only

0
0
Text · 518 B · fee0889 Raw
16 lines · cpp
1// Regression test for assertion failure when explicit(bool) is used in pre-C++202// Fixes GitHub issue #1527293// RUN: %clang_cc1 -std=c++98 -verify %s4// RUN: %clang_cc1 -std=c++03 -verify %s5// RUN: %clang_cc1 -std=c++11 -verify %s6// RUN: %clang_cc1 -std=c++14 -verify %s7// RUN: %clang_cc1 -std=c++17 -verify %s8 9struct S {10  explicit(true) S(int);11  // expected-warning@-1 {{explicit(bool) is a C++20 extension}}12  13  explicit(false) S(float);14  // expected-warning@-1 {{explicit(bool) is a C++20 extension}}15};16