16 template <
typename T,
typename TACTIC = weakTactic>
class tweak:
public binder {
62 template <
typename T,
typename F> tmedium<T> operator|(
const tweak<T>& t, F&& f) {
69 template <
typename T,
typename F> tweak<T> operator|(tweak<T>&& t, F&& f) {
84 static nbool isNul(
const tweak<T>& it) {
return !it.isBind(); }
86 static constexpr nbool is_ptr =
false;
87 static constexpr nbool is_ref =
false;
88 static constexpr nbool is_like_ptr =
true;
96 static tweak<T>* ret() {
return nullptr; }
98 static nbool isNul(
const tweak<T>* it) {
return !it || !it->isBind(); }
100 static constexpr nbool is_ptr =
true;
101 static constexpr nbool is_ref =
false;
102 static constexpr nbool is_like_ptr = is_ptr;
110 static nbool isNul(
const tweak<T>& it) {
return !it.isBind(); }
117 static constexpr nbool is_ptr =
false;
118 static constexpr nbool is_ref =
true;
119 static constexpr nbool is_like_ptr =
true;
123 template <
typename T,
typename F>
128 template <
typename T,
typename F>
129 auto operator->*(
const tweak<T>& t, F&& f) ->
decltype(typeTrait<
decltype(f(*t))>::ret()) {
130 return t ? f(*t) : typeTrait<decltype(f(*t))>::ret();
133 template <
typename T,
typename F>
134 auto operator->*(tweak<T>&& t, F&& f) ->
decltype(typeTrait<
decltype(f(*t))>::ret()) {
135 return t ? f(*t) : typeTrait<decltype(f(*t))>::ret();
Generalized binding class for managing instance lifecycles.
Definition binder.hpp:108
Weak reference smart pointer with type-safe access.
Definition tweak.hpp:16
const T *get() const BY_CONST_FUNC(get()) using super nbool bind(const T &new1)
Binds a weak reference to the specified instance.
Core class for runtime type information in byeol language.
Definition type.hpp:100
Rich logging support with polymorphic type conversion.
Definition richLog.hpp:34