1 // Copyright 2021 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This is a "No Compile Test" suite.
6 // http://dev.chromium.org/developers/testing/no-compile-tests
8 #include "base/no_destructor.h"
13 // NoDestructor should only be used for non-trivially destructible types;
14 // trivial types can simply be directly declared as globals.
15 static NoDestructor<bool> x; // expected-error@*:* {{static assertion failed due to requirement '!std::is_trivially_destructible_v<bool>'}}