BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslmf_haspointersemantics.h
Go to the documentation of this file.
1
/// @file bslmf_haspointersemantics.h
2
///
3
/// The content of this file has been pre-processed for Doxygen.
4
///
5
6
7
// bslmf_haspointersemantics.h -*-C++-*-
8
#ifndef INCLUDED_BSLMF_HASPOINTERSEMANTICS
9
#define INCLUDED_BSLMF_HASPOINTERSEMANTICS
10
11
#include <
bsls_ident.h
>
12
BSLS_IDENT
(
"$Id: $"
)
13
14
/// @defgroup bslmf_haspointersemantics bslmf_haspointersemantics
15
/// @brief Provide a type trait for pointer semantics.
16
/// @addtogroup bsl
17
/// @{
18
/// @addtogroup bslmf
19
/// @{
20
/// @addtogroup bslmf_haspointersemantics
21
/// @{
22
///
23
/// <h1> Outline </h1>
24
/// * <a href="#bslmf_haspointersemantics-purpose"> Purpose</a>
25
/// * <a href="#bslmf_haspointersemantics-classes"> Classes </a>
26
/// * <a href="#bslmf_haspointersemantics-description"> Description </a>
27
///
28
/// # Purpose {#bslmf_haspointersemantics-purpose}
29
/// Provide a type trait for pointer semantics.
30
///
31
/// # Classes {#bslmf_haspointersemantics-classes}
32
///
33
/// - bslmf::HasPointerSemantics: meta-function indicating pointer-like types
34
///
35
/// @see
36
/// bslmf_nestedtraitdeclaration
37
///
38
/// # Description {#bslmf_haspointersemantics-description}
39
/// This component defines a tag type `HasPointerSemantics` derived
40
/// from `bsl::true_type` to indicate that a type has pointer semantics, and
41
/// from `bsl::false_type` otherwise. A type has pointer-like semantics must
42
/// define (at a minimum) `operator*` and `operator->`. All pointer types have
43
/// pointer semantics; other types must explicitly add this trait, either
44
/// with the macro `BSLMF_NESTED_TRAIT_DECLARATION`, or by explicit template
45
/// specialization.
46
/// @}
47
/** @} */
48
/** @} */
49
50
/** @addtogroup bsl
51
* @{
52
*/
53
/** @addtogroup bslmf
54
* @{
55
*/
56
/** @addtogroup bslmf_haspointersemantics
57
* @{
58
*/
59
60
#include <bslscm_version.h>
61
62
#include <
bslmf_detectnestedtrait.h
>
63
#include <
bslmf_integralconstant.h
>
64
#include <
bslmf_ispointer.h
>
65
66
#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
67
#include <
bslmf_ispointer.h
>
68
#endif
// BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
69
70
71
namespace
bslmf
{
72
73
template
<
class
t_TYPE>
74
struct
HasPointerSemantics
75
:
bsl::integral_constant
<
76
bool,
77
bsl::is_pointer<t_TYPE>::value ||
78
DetectNestedTrait<t_TYPE, HasPointerSemantics>::value> {
79
};
80
81
}
// close package namespace
82
83
84
#endif
85
86
// ----------------------------------------------------------------------------
87
// Copyright 2013 Bloomberg Finance L.P.
88
//
89
// Licensed under the Apache License, Version 2.0 (the "License");
90
// you may not use this file except in compliance with the License.
91
// You may obtain a copy of the License at
92
//
93
// http://www.apache.org/licenses/LICENSE-2.0
94
//
95
// Unless required by applicable law or agreed to in writing, software
96
// distributed under the License is distributed on an "AS IS" BASIS,
97
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
98
// See the License for the specific language governing permissions and
99
// limitations under the License.
100
// ----------------------------- END-OF-FILE ----------------------------------
101
102
/** @} */
103
/** @} */
104
/** @} */
bslmf_detectnestedtrait.h
bslmf_integralconstant.h
bslmf_ispointer.h
bsls_ident.h
BSLS_IDENT
#define BSLS_IDENT(str)
Definition
bsls_ident.h:195
bslmf
Definition
bdlbb_blob.h:576
bsl::integral_constant
Definition
bslmf_integralconstant.h:244
bslmf::HasPointerSemantics
Definition
bslmf_haspointersemantics.h:78
doxygen_input
bde
groups
bsl
bslmf
bslmf_haspointersemantics.h
Generated by
1.9.8