"ScL Feature"
/
ScL Feature
0.0.1
C++20 composable proxy wrapper with pluggable executor strategy
Toggle main menu visibility
Loading...
Searching...
No Matches
wrapper_guard.h
1
#pragma once
2
3
#ifndef DOXYGEN
4
5
#include <scl/feature/detail/wrapper_guard.h>
6
#include <scl/feature/type_traits/wrapper.h>
7
8
namespace
scl
9
{
10
template
<
typename
Refer>
11
using
wrapper_guard
= ::scl::feature::detail::wrapper_guard<Refer>;
12
}
// namespace scl
13
14
#else
// DOXYGEN
15
16
namespace
scl
17
{
21
40
template
<
typename
Refer>
41
class
wrapper_guard
42
{
43
public
:
44
wrapper_guard(wrapper_guard &&) =
delete
;
45
wrapper_guard(wrapper_guard
const
&) =
delete
;
46
wrapper_guard & operator=(wrapper_guard &&) =
delete
;
47
wrapper_guard & operator=(wrapper_guard
const
&) =
delete
;
48
57
explicit
wrapper_guard
(Refer v);
58
65
~wrapper_guard
();
66
75
[[nodiscard]]
76
decltype
(
auto
)
value
()
const
noexcept
;
77
};
78
// end of group scl_feature_locking
80
}
// namespace scl
81
82
#endif
// DOXYGEN
scl::wrapper_guard
RAII guard providing access to the value held by a wrapper or a plain reference.
Definition
wrapper_guard.h:42
scl::wrapper_guard::~wrapper_guard
~wrapper_guard()
Releases the guard acquired at construction.
scl::wrapper_guard::value
decltype(auto) value() const noexcept
Returns the stored value with the same cv- and ref-qualifiers as Refer.
scl::wrapper_guard::wrapper_guard
wrapper_guard(Refer v)
Constructs the guard and acquires access to v.
scl
Root namespace of the ScL project.
src
scl
feature
wrapper_guard.h
Generated by
1.18.0