re2/util/flags.h
Go to the documentation of this file.
1 // Copyright 2009 The RE2 Authors. All Rights Reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4 
5 #ifndef UTIL_FLAGS_H_
6 #define UTIL_FLAGS_H_
7 
8 // Simplified version of Google's command line flags.
9 // Does not support parsing the command line.
10 // If you want to do that, see
11 // https://gflags.github.io/gflags/
12 
13 #define DEFINE_FLAG(type, name, deflt, desc) \
14  namespace re2 { type FLAGS_##name = deflt; }
15 
16 #define DECLARE_FLAG(type, name) \
17  namespace re2 { extern type FLAGS_##name; }
18 
19 namespace re2 {
20 template <typename T>
21 T GetFlag(const T& flag) {
22  return flag;
23 }
24 } // namespace re2
25 
26 #endif // UTIL_FLAGS_H_
flag
uint32_t flag
Definition: ssl_versions.cc:162
re2
Definition: bloaty/third_party/re2/re2/bitmap256.h:17
T
#define T(upbtypeconst, upbtype, ctype, default_value)
re2::GetFlag
T GetFlag(const T &flag)
Definition: re2/util/flags.h:21


grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:24