BDE 4.14.0 Production release
Loading...
Searching...
No Matches
s_baltst_testnilvalue.h
Go to the documentation of this file.
1/// @file s_baltst_testnilvalue.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// s_baltst_testnilvalue.h -*-C++-*-
8#ifndef INCLUDED_S_BALTST_TESTNILVALUE
9#define INCLUDED_S_BALTST_TESTNILVALUE
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup s_baltst_testnilvalue s_baltst_testnilvalue
15/// @brief Provide a singular, valueless, value-semantic type for testing.
16/// @addtogroup Standalones
17/// @{
18/// @addtogroup s_baltst
19/// @{
20/// @addtogroup s_baltst_testnilvalue
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#s_baltst_testnilvalue-purpose"> Purpose</a>
25/// * <a href="#s_baltst_testnilvalue-classes"> Classes </a>
26///
27/// # Purpose {#s_baltst_testnilvalue-purpose}
28/// Provide a singular, valueless, value-semantic type for testing.
29///
30/// # Classes {#s_baltst_testnilvalue-classes}
31///
32/// - s_baltst::TestNilValue: singular value type for testing
33/// @}
34/** @} */
35/** @} */
36
37/** @addtogroup Standalones
38 * @{
39 */
40/** @addtogroup s_baltst
41 * @{
42 */
43/** @addtogroup s_baltst_testnilvalue
44 * @{
45 */
46/
47#include <bsl_ostream.h>
48
49
50namespace s_baltst {
51
52 // ==================
53 // class TestNilValue
54 // ==================
55
56/// This in-memory value-semantic class provides a representation of the
57/// type having only one value.
58///
59/// See @ref s_baltst_testnilvalue
61};
62
63// FREE FUNCTIONS
64bsl::ostream& operator<<(bsl::ostream& stream, const TestNilValue&);
65
66bool operator==(const TestNilValue&, const TestNilValue&);
67
68bool operator!=(const TestNilValue&, const TestNilValue&);
69
70// ============================================================================
71// INLINE DEFINITIONS
72// ============================================================================
73
74 // ------------------
75 // class TestNilValue
76 // ------------------
77
78// FREE FUNCTIONS
79inline
80bsl::ostream& operator<<(bsl::ostream& stream, const TestNilValue&)
81{
82 return stream << "nil";
83}
84
85inline
86bool operator==(const TestNilValue&, const TestNilValue&)
87{
88 return true;
89}
90
91inline
92bool operator!=(const TestNilValue&, const TestNilValue&)
93{
94 return false;
95}
96
97} // close package namespace
98
99
100#endif // INCLUDED_S_BALTST_TESTNILVALUE
101
102// ----------------------------------------------------------------------------
103// Copyright 2021 Bloomberg Finance L.P.
104//
105// Licensed under the Apache License, Version 2.0 (the "License");
106// you may not use this file except in compliance with the License.
107// You may obtain a copy of the License at
108//
109// http://www.apache.org/licenses/LICENSE-2.0
110//
111// Unless required by applicable law or agreed to in writing, software
112// distributed under the License is distributed on an "AS IS" BASIS,
113// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
114// See the License for the specific language governing permissions and
115// limitations under the License.
116// ----------------------------- END-OF-FILE ----------------------------------
117
118/** @} */
119/** @} */
120/** @} */
Definition s_baltst_testnilvalue.h:60
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition s_baltst_address.h:66
bsl::ostream & operator<<(bsl::ostream &stream, const Address &rhs)