15 template <
typename T,
typename TACTIC = weakTactic>
class tweak:
public binder {
33 const T* operator->() const BY_CONST_FUNC(operator->())
34 const T& operator*() const BY_CONST_FUNC(operator*())
35 me& operator=(const
binder& rhs);
36 me& operator=(const me& rhs);
41 const T* get() const BY_CONST_FUNC(get())
44 nbool bind(const T& new1);
48 template <typename T, typename F>
tmedium<T> operator|(
tweak<T>& t, F&& f) {
62 template <
typename T,
typename F> tweak<T> operator|(tweak<T>&& t, F&& f) {
77 static nbool isNul(
const tweak<T>& it) {
return !it.isBind(); }
79 static constexpr nbool is_ptr =
false;
80 static constexpr nbool is_ref =
false;
81 static constexpr nbool is_like_ptr =
true;
89 static tweak<T>* ret() {
return nullptr; }
91 static nbool isNul(
const tweak<T>* it) {
return !it || !it->isBind(); }
93 static constexpr nbool is_ptr =
true;
94 static constexpr nbool is_ref =
false;
95 static constexpr nbool is_like_ptr = is_ptr;
103 static nbool isNul(
const tweak<T>& it) {
return !it.isBind(); }
110 static constexpr nbool is_ptr =
false;
111 static constexpr nbool is_ref =
true;
112 static constexpr nbool is_like_ptr =
true;
116 template <
typename T,
typename F>
117 auto operator->*(
tweak<T>& t, F&& f) ->
decltype(
typeTrait<
decltype(f(*t))>::ret()) {
118 return t ? f(*t) :
typeTrait<decltype(f(*t))>::ret();
121 template <
typename T,
typename F>
122 auto operator->*(
const tweak<T>& t, F&& f) ->
decltype(typeTrait<
decltype(f(*t))>::ret()) {
123 return t ? f(*t) : typeTrait<decltype(f(*t))>::ret();
126 template <
typename T,
typename F>
127 auto operator->*(tweak<T>&& t, F&& f) ->
decltype(typeTrait<
decltype(f(*t))>::ret()) {
128 return t ? f(*t) : typeTrait<decltype(f(*t))>::ret();
Binding tag for instance reference tracking and lifecycle management.
Definition: bindTag.hpp:15
Smart pointer with loose type checking and lifetime management.
Definition: binder.hpp:53
Medium class used exclusively in the OR macro for safe reference handling.
Definition: tmedium.hpp:51
Weak reference smart pointer with type-safe access.
Definition: tweak.hpp:15
Base class for runtime type information in byeol language.
Definition: type.hpp:12
Type trait utilities for template metaprogramming.
Definition: typeTrait.hpp:13