Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
proxy
DefaultProxy.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_PROXY_DEFAULTPROXY_H_
36
#define _BLAZE_MATH_PROXY_DEFAULTPROXY_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#include <
blaze/system/Inline.h
>
44
45
46
namespace
blaze {
47
48
//=================================================================================================
49
//
50
// CLASS DEFINITION
51
//
52
//=================================================================================================
53
54
//*************************************************************************************************
62
template
<
typename
PT
// Type of the proxy
63
,
typename
RT >
// Type of the represented element
64
class
DefaultProxy
65
{
66
public
:
67
//**Conversion operators************************************************************************
70
[[deprecated]]
BLAZE_ALWAYS_INLINE
PT&
operator~
()
noexcept
;
71
[[deprecated]]
BLAZE_ALWAYS_INLINE
const
PT&
operator~
()
const
noexcept
;
72
73
BLAZE_ALWAYS_INLINE
PT&
operator*
()
noexcept
;
74
BLAZE_ALWAYS_INLINE
const
PT&
operator*
()
const
noexcept
;
76
//**********************************************************************************************
77
78
protected
:
79
//**Special member functions********************************************************************
82
DefaultProxy() =
default
;
83
DefaultProxy(
const
DefaultProxy& ) =
default
;
84
DefaultProxy( DefaultProxy&& ) =
default
;
85
~DefaultProxy() =
default
;
86
DefaultProxy& operator=(
const
DefaultProxy& ) =
default
;
87
DefaultProxy& operator=( DefaultProxy&& ) =
default
;
89
//**********************************************************************************************
90
};
91
//*************************************************************************************************
92
93
94
95
96
//=================================================================================================
97
//
98
// CONVERSION OPERATORS
99
//
100
//=================================================================================================
101
102
//*************************************************************************************************
110
template
<
typename
PT
// Type of the proxy
111
,
typename
RT >
// Type of the represented element
112
[[deprecated]]
BLAZE_ALWAYS_INLINE
PT&
DefaultProxy<PT,RT>::operator~
() noexcept
113
{
114
return
static_cast<
PT&
>
( *this );
115
}
116
//*************************************************************************************************
117
118
119
//*************************************************************************************************
127
template
<
typename
PT
// Type of the proxy
128
,
typename
RT >
// Type of the represented element
129
[[deprecated]]
BLAZE_ALWAYS_INLINE
const
PT&
DefaultProxy<PT,RT>::operator~
() const noexcept
130
{
131
return
static_cast<
const
PT&
>
( *this );
132
}
133
//*************************************************************************************************
134
135
136
//*************************************************************************************************
144
template
<
typename
PT
// Type of the proxy
145
,
typename
RT >
// Type of the represented element
146
BLAZE_ALWAYS_INLINE
PT&
DefaultProxy<PT,RT>::operator*
() noexcept
147
{
148
return
static_cast<
PT&
>
( *this );
149
}
150
//*************************************************************************************************
151
152
153
//*************************************************************************************************
161
template
<
typename
PT
// Type of the proxy
162
,
typename
RT >
// Type of the represented element
163
BLAZE_ALWAYS_INLINE
const
PT&
DefaultProxy<PT,RT>::operator*
() const noexcept
164
{
165
return
static_cast<
const
PT&
>
( *this );
166
}
167
//*************************************************************************************************
168
169
170
171
172
//=================================================================================================
173
//
174
// GLOBAL FUNCTIONS
175
//
176
//=================================================================================================
177
178
//*************************************************************************************************
181
template
<
typename
PT,
typename
RT >
182
PT&
crtp_cast
(
DefaultProxy<PT,RT>
& proxy );
183
184
template
<
typename
PT,
typename
RT >
185
const
PT&
crtp_cast
(
const
DefaultProxy<PT,RT>
& proxy );
187
//*************************************************************************************************
188
189
190
//*************************************************************************************************
199
template
<
typename
PT
// Type of the proxy
200
,
typename
RT >
// Type of the represented element
201
BLAZE_ALWAYS_INLINE
PT&
crtp_cast
(
DefaultProxy<PT,RT>
& proxy )
202
{
203
return
*proxy;
204
}
205
//*************************************************************************************************
206
207
208
//*************************************************************************************************
217
template
<
typename
PT
// Type of the proxy
218
,
typename
RT >
// Type of the represented element
219
BLAZE_ALWAYS_INLINE
const
PT&
crtp_cast
(
const
DefaultProxy<PT,RT>
& proxy )
220
{
221
return
*proxy;
222
}
223
//*************************************************************************************************
224
225
}
// namespace blaze
226
227
#endif
blaze::DefaultProxy
Default proxy backend for built-in and alternate user-specific class types.
Definition
DefaultProxy.h:65
blaze::DefaultProxy::operator~
BLAZE_ALWAYS_INLINE PT & operator~() noexcept
Conversion operator for non-constant proxies.
Definition
DefaultProxy.h:112
blaze::DefaultProxy::operator*
BLAZE_ALWAYS_INLINE PT & operator*() noexcept
Conversion operator for non-constant proxies.
Definition
DefaultProxy.h:146
blaze::crtp_cast
MT & crtp_cast(Matrix< MT, SO > &matrix)
CRTP-based conversion operation for non-constant matrices.
Definition
Matrix.h:479
BLAZE_ALWAYS_INLINE
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition
Inline.h:85
Inline.h
System settings for the inline keywords.
Generated by
1.18.0