BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bsls_nativestd.h
Go to the documentation of this file.
1
/// @file bsls_nativestd.h
2
///
3
/// The content of this file has been pre-processed for Doxygen.
4
///
5
6
7
// bsls_nativestd.h -*-C++-*-
8
#ifndef INCLUDED_BSLS_NATIVESTD
9
#define INCLUDED_BSLS_NATIVESTD
10
11
#include <
bsls_ident.h
>
12
BSLS_IDENT
(
"$Id: $"
)
13
14
/// @defgroup bsls_nativestd bsls_nativestd
15
/// @brief <span style="color: var(--deprecated-color-dark)">DEPRECATED:</span> Define the namespace `native_std` as an alias for `::std`.
16
/// @addtogroup bsl
17
/// @{
18
/// @addtogroup bsls
19
/// @{
20
/// @addtogroup bsls_nativestd
21
/// @{
22
///
23
/// <h1> Outline </h1>
24
/// * <a href="#bsls_nativestd-purpose"> Purpose</a>
25
/// * <a href="#bsls_nativestd-classes"> Classes </a>
26
/// * <a href="#bsls_nativestd-description"> Description </a>
27
/// * <a href="#bsls_nativestd-usage"> Usage </a>
28
///
29
/// # Purpose {#bsls_nativestd-purpose}
30
/// Define the namespace `native_std` as an alias for `::std`.
31
///
32
/// @deprecated Use @ref std explicitly.
33
///
34
/// # Classes {#bsls_nativestd-classes}
35
///
36
///
37
/// # Description {#bsls_nativestd-description}
38
/// This component defines a namespace alias, `native_std`, that
39
/// serves as an alias for the `std` namespace. The `bsl` package group
40
/// contains a Bloomberg implementation of the C++ standard library. In the
41
/// past, this implementation supported using the preprocessor to replace `std`
42
/// with `bsl` and intercepting all standard library headers with BDE-provided
43
/// implementations. When building in this bde-stl mode by defining
44
/// `BSL_OVERRIDES_STD`, there was still occasionally a need to refer to the
45
/// "real" `std` namespace, and that could be accomplished with the `native_std`
46
/// namespace. This is no longer needed or used within BDE itself.
47
///
48
/// Note: It is safe to `#include` this header only if `std` is not yet defined
49
/// as a macro or if `BSL_DEFINED_NATIVE_STD` is already defined. Any other
50
/// header that defines the `native_std` namespace should also define the
51
/// `BSL_DEFINED_NATIVE_STD` macro. For more info on bde-stl mode, please see
52
/// `bos/bos+stdhdrs/doc/bos+stdhdrs.txt`.
53
///
54
/// ## Usage {#bsls_nativestd-usage}
55
///
56
///
57
/// In the following example we use the `native_std` prefix to access the native
58
/// implementation of `std::string`, even when the compilation is configured to
59
/// override the use of native STL types with Bloomberg provided STL types
60
/// (i.e., bde-stl mode, used by Bloomberg managed code):
61
/// @code
62
/// #include <bsls_nativestd.h>
63
/// #include <string>
64
///
65
/// std::string s1; // now always 'std::string'
66
/// native_std::string s2; // always was 'std::string'
67
/// @endcode
68
/// @}
69
/** @} */
70
/** @} */
71
72
/** @addtogroup bsl
73
* @{
74
*/
75
/** @addtogroup bsls
76
* @{
77
*/
78
/** @addtogroup bsls_nativestd
79
* @{
80
*/
81
82
#ifndef BSL_DEFINED_NATIVE_STD
83
84
# ifdef std
85
# error "Cannot include bsls_nativestd.h when 'std' is a macro."
86
# endif
87
88
namespace
std
{
89
}
90
namespace
native_std
= ::std;
91
92
#endif
// ! defined(BSL_DEFINED_NATIVE_STD)
93
94
#endif
95
96
// ----------------------------------------------------------------------------
97
// Copyright 2019 Bloomberg Finance L.P.
98
//
99
// Licensed under the Apache License, Version 2.0 (the "License");
100
// you may not use this file except in compliance with the License.
101
// You may obtain a copy of the License at
102
//
103
// http://www.apache.org/licenses/LICENSE-2.0
104
//
105
// Unless required by applicable law or agreed to in writing, software
106
// distributed under the License is distributed on an "AS IS" BASIS,
107
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
108
// See the License for the specific language governing permissions and
109
// limitations under the License.
110
// ----------------------------- END-OF-FILE ----------------------------------
111
112
/** @} */
113
/** @} */
114
/** @} */
bsls_ident.h
BSLS_IDENT
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition
bsls_ident.h:238
std
Definition
bdldfp_decimal.h:5549
doxygen_input
bde
groups
bsl
bsls
bsls_nativestd.h
Generated by
1.9.8