xref: /aosp_15_r20/external/cronet/base/template_util_unittest.cc (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2012 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.
4 
5 #include "base/template_util.h"
6 
7 #include <stdint.h>
8 
9 namespace base {
10 namespace {
11 
12 enum SimpleEnum { SIMPLE_ENUM };
13 enum EnumWithExplicitType : uint64_t { ENUM_WITH_EXPLICIT_TYPE };
14 enum class ScopedEnum { SCOPED_ENUM };
15 struct SimpleStruct {};
16 
17 static_assert(!is_scoped_enum<int>::value);
18 static_assert(!is_scoped_enum<SimpleEnum>::value);
19 static_assert(!is_scoped_enum<EnumWithExplicitType>::value);
20 static_assert(is_scoped_enum<ScopedEnum>::value);
21 
22 }  // namespace
23 }  // namespace base
24