| // Copyright (c) 2021 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| // This is a "No Compile Test" suite. |
| // https://dev.chromium.org/developers/testing/no-compile-tests |
| #include "base/containers/enum_set.h" |
| #if defined(NCTEST_ALL_METHOD_DISALLOWED_ON_LARGE_SPARSE_ENUM) // [r"fatal error: static_assert failed due to requirement 'kValueCount <= 64' \"Max number of enum values is 64 for constexpr constructor\""] |
| enum class TestEnumSparse { |
| using TestEnumSparseSet = EnumSet<TestEnumSparse, TestEnumSparse::TEST_MIN, |
| TestEnumSparse::TEST_MAX>; |
| // TestEnumSparseSet::All() does not compile because there are more than 64 |
| TestEnumSparseSet::All(); |