"ScL Feature"/
ScL Feature 0.0.1
C++20 composable proxy wrapper with pluggable executor strategy
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
8namespace scl
9{
10 template <typename Refer>
11 using wrapper_guard = ::scl::feature::detail::wrapper_guard<Refer>;
12} // namespace scl
13
14#else // DOXYGEN
15
16namespace 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
66
75 [[nodiscard]]
76 decltype(auto) value() const noexcept;
77 };
78 // end of group scl_feature_locking
80} // namespace scl
81
82#endif // DOXYGEN
RAII guard providing access to the value held by a wrapper or a plain reference.
Definition wrapper_guard.h:42
~wrapper_guard()
Releases the guard acquired at construction.
decltype(auto) value() const noexcept
Returns the stored value with the same cv- and ref-qualifiers as Refer.
wrapper_guard(Refer v)
Constructs the guard and acquires access to v.
Root namespace of the ScL project.