NVIDIA DeepStream SDK API Reference
9.2 Release
includes/opentelemetry/nostd/internal/absl/base/options.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
* SPDX-License-Identifier: Apache-2.0
4
*
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
* you may not use this file except in compliance with the License.
7
* You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*/
17
18
#ifndef OTABSL_BASE_OPTIONS_H_
19
#define OTABSL_BASE_OPTIONS_H_
20
21
// Copyright 2019 The Abseil Authors.
22
//
23
// Licensed under the Apache License, Version 2.0 (the "License");
24
// you may not use this file except in compliance with the License.
25
// You may obtain a copy of the License at
26
//
27
// https://www.apache.org/licenses/LICENSE-2.0
28
//
29
// Unless required by applicable law or agreed to in writing, software
30
// distributed under the License is distributed on an "AS IS" BASIS,
31
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
// See the License for the specific language governing permissions and
33
// limitations under the License.
34
//
35
// -----------------------------------------------------------------------------
36
// File: options.h
37
// -----------------------------------------------------------------------------
38
//
39
// This file contains Abseil configuration options for setting specific
40
// implementations instead of letting Abseil determine which implementation to
41
// use at compile-time. Setting these options may be useful for package or build
42
// managers who wish to guarantee ABI stability within binary builds (which are
43
// otherwise difficult to enforce).
44
//
45
// *** IMPORTANT NOTICE FOR PACKAGE MANAGERS: It is important that
46
// maintainers of package managers who wish to package Abseil read and
47
// understand this file! ***
48
//
49
// Abseil contains a number of possible configuration endpoints, based on
50
// parameters such as the detected platform, language version, or command-line
51
// flags used to invoke the underlying binary. As is the case with all
52
// libraries, binaries which contain Abseil code must ensure that separate
53
// packages use the same compiled copy of Abseil to avoid a diamond dependency
54
// problem, which can occur if two packages built with different Abseil
55
// configuration settings are linked together. Diamond dependency problems in
56
// C++ may manifest as violations to the One Definition Rule (ODR) (resulting in
57
// linker errors), or undefined behavior (resulting in crashes).
58
//
59
// Diamond dependency problems can be avoided if all packages utilize the same
60
// exact version of Abseil. Building from source code with the same compilation
61
// parameters is the easiest way to avoid such dependency problems. However, for
62
// package managers who cannot control such compilation parameters, we are
63
// providing the file to allow you to inject ABI (Application Binary Interface)
64
// stability across builds. Settings options in this file will neither change
65
// API nor ABI, providing a stable copy of Abseil between packages.
66
//
67
// Care must be taken to keep options within these configurations isolated
68
// from any other dynamic settings, such as command-line flags which could alter
69
// these options. This file is provided specifically to help build and package
70
// managers provide a stable copy of Abseil within their libraries and binaries;
71
// other developers should not have need to alter the contents of this file.
72
//
73
// -----------------------------------------------------------------------------
74
// Usage
75
// -----------------------------------------------------------------------------
76
//
77
// For any particular package release, set the appropriate definitions within
78
// this file to whatever value makes the most sense for your package(s). Note
79
// that, by default, most of these options, at the moment, affect the
80
// implementation of types; future options may affect other implementation
81
// details.
82
//
83
// NOTE: the defaults within this file all assume that Abseil can select the
84
// proper Abseil implementation at compile-time, which will not be sufficient
85
// to guarantee ABI stability to package managers.
86
87
// Include a standard library header to allow configuration based on the
88
// standard library in use.
89
// Using C++20 feature-test macros when possible, otherwise fall back to
90
// ciso646/iso646.h.There are warnings when including ciso646 in C++17 mode
91
#ifdef __has_include
92
# if __has_include(<version>)
93
# include <version>
94
# endif
95
#elif defined(_MSC_VER) && \
96
((defined(__cplusplus) && __cplusplus >= 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L))
97
# if _MSC_VER >= 1922
98
# include <version>
99
# endif
100
#else
101
# if defined(__GNUC__) && !defined(__clang__) && !defined(__apple_build_version__)
102
# pragma GCC diagnostic push
103
# pragma GCC diagnostic ignored "-Wcpp"
104
# elif defined(__clang__) || defined(__apple_build_version__)
105
# pragma clang diagnostic push
106
# pragma clang diagnostic ignored "-Wcpp"
107
# endif
108
# include <ciso646>
109
# if defined(__GNUC__) && !defined(__clang__) && !defined(__apple_build_version__)
110
# pragma GCC diagnostic pop
111
# elif defined(__clang__) || defined(__apple_build_version__)
112
# pragma clang diagnostic pop
113
# endif
114
#endif
115
116
// -----------------------------------------------------------------------------
117
// Type Compatibility Options
118
// -----------------------------------------------------------------------------
119
//
120
// OTABSL_OPTION_USE_STD_ANY
121
//
122
// This option controls whether absl::OTABSL_OPTION_NAMESPACE_NAME::any is implemented as an alias to
123
// std::any, or as an independent implementation.
124
//
125
// A value of 0 means to use Abseil's implementation. This requires only C++11
126
// support, and is expected to work on every toolchain we support.
127
//
128
// A value of 1 means to use an alias to std::any. This requires that all code
129
// using Abseil is built in C++17 mode or later.
130
//
131
// A value of 2 means to detect the C++ version being used to compile Abseil,
132
// and use an alias only if a working std::any is available. This option is
133
// useful when you are building your entire program, including all of its
134
// dependencies, from source. It should not be used otherwise -- for example,
135
// if you are distributing Abseil in a binary package manager -- since in
136
// mode 2, absl::OTABSL_OPTION_NAMESPACE_NAME::any will name a different type, with a different mangled name
137
// and binary layout, depending on the compiler flags passed by the end user.
138
// For more info, see https://abseil.io/about/design/dropin-types.
139
//
140
// User code should not inspect this macro. To check in the preprocessor if
141
// absl::OTABSL_OPTION_NAMESPACE_NAME::any is a typedef of std::any, use the feature macro OTABSL_USES_STD_ANY.
142
143
#define OTABSL_OPTION_USE_STD_ANY 0
144
145
146
// OTABSL_OPTION_USE_STD_OPTIONAL
147
//
148
// This option controls whether absl::OTABSL_OPTION_NAMESPACE_NAME::optional is implemented as an alias to
149
// std::optional, or as an independent implementation.
150
//
151
// A value of 0 means to use Abseil's implementation. This requires only C++11
152
// support, and is expected to work on every toolchain we support.
153
//
154
// A value of 1 means to use an alias to std::optional. This requires that all
155
// code using Abseil is built in C++17 mode or later.
156
//
157
// A value of 2 means to detect the C++ version being used to compile Abseil,
158
// and use an alias only if a working std::optional is available. This option
159
// is useful when you are building your program from source. It should not be
160
// used otherwise -- for example, if you are distributing Abseil in a binary
161
// package manager -- since in mode 2, absl::OTABSL_OPTION_NAMESPACE_NAME::optional will name a different
162
// type, with a different mangled name and binary layout, depending on the
163
// compiler flags passed by the end user. For more info, see
164
// https://abseil.io/about/design/dropin-types.
165
166
// User code should not inspect this macro. To check in the preprocessor if
167
// absl::OTABSL_OPTION_NAMESPACE_NAME::optional is a typedef of std::optional, use the feature macro
168
// OTABSL_USES_STD_OPTIONAL.
169
170
#define OTABSL_OPTION_USE_STD_OPTIONAL 0
171
172
173
// OTABSL_OPTION_USE_STD_STRING_VIEW
174
//
175
// This option controls whether absl::OTABSL_OPTION_NAMESPACE_NAME::string_view is implemented as an alias to
176
// std::string_view, or as an independent implementation.
177
//
178
// A value of 0 means to use Abseil's implementation. This requires only C++11
179
// support, and is expected to work on every toolchain we support.
180
//
181
// A value of 1 means to use an alias to std::string_view. This requires that
182
// all code using Abseil is built in C++17 mode or later.
183
//
184
// A value of 2 means to detect the C++ version being used to compile Abseil,
185
// and use an alias only if a working std::string_view is available. This
186
// option is useful when you are building your program from source. It should
187
// not be used otherwise -- for example, if you are distributing Abseil in a
188
// binary package manager -- since in mode 2, absl::OTABSL_OPTION_NAMESPACE_NAME::string_view will name a
189
// different type, with a different mangled name and binary layout, depending on
190
// the compiler flags passed by the end user. For more info, see
191
// https://abseil.io/about/design/dropin-types.
192
//
193
// User code should not inspect this macro. To check in the preprocessor if
194
// absl::OTABSL_OPTION_NAMESPACE_NAME::string_view is a typedef of std::string_view, use the feature macro
195
// OTABSL_USES_STD_STRING_VIEW.
196
197
#define OTABSL_OPTION_USE_STD_STRING_VIEW 0
198
199
// OTABSL_OPTION_USE_STD_VARIANT
200
//
201
// This option controls whether absl::OTABSL_OPTION_NAMESPACE_NAME::variant is implemented as an alias to
202
// std::variant, or as an independent implementation.
203
//
204
// A value of 0 means to use Abseil's implementation. This requires only C++11
205
// support, and is expected to work on every toolchain we support.
206
//
207
// A value of 1 means to use an alias to std::variant. This requires that all
208
// code using Abseil is built in C++17 mode or later.
209
//
210
// A value of 2 means to detect the C++ version being used to compile Abseil,
211
// and use an alias only if a working std::variant is available. This option
212
// is useful when you are building your program from source. It should not be
213
// used otherwise -- for example, if you are distributing Abseil in a binary
214
// package manager -- since in mode 2, absl::OTABSL_OPTION_NAMESPACE_NAME::variant will name a different
215
// type, with a different mangled name and binary layout, depending on the
216
// compiler flags passed by the end user. For more info, see
217
// https://abseil.io/about/design/dropin-types.
218
//
219
// User code should not inspect this macro. To check in the preprocessor if
220
// absl::OTABSL_OPTION_NAMESPACE_NAME::variant is a typedef of std::variant, use the feature macro
221
// OTABSL_USES_STD_VARIANT.
222
223
#define OTABSL_OPTION_USE_STD_VARIANT 0
224
225
226
// OTABSL_OPTION_NAMESPACE_NAME
227
//
228
// All codes in otabsl are under OTABSL_OPTION_NAMESPACE_NAME, we do not use inline namespace to avoid
229
// conlict with external Abseil.
230
231
#define OTABSL_OPTION_NAMESPACE_NAME otel_v1
232
233
#endif // OTABSL_BASE_OPTIONS_H_
Privacy Policy
|
Your Privacy Choices
|
Terms of Service
|
Accessibility
|
Corporate Policies
|
Product Security
|
Contact
© 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
NVIDIA Confidential | Subject to Change | For test and development only.
Wed Oct 28 2026 12:02:33 | PR-09318-R32