14 template <
typename T,
typename TACTIC = strTactic>
class tstr:
public tweak<T, TACTIC> {
34 me& operator=(
const me& rhs) =
default;
45 template <
typename T,
typename F> tmedium<T> operator|(
const tstr<T>& t, F&& f) {
52 template <
typename T,
typename F> tstr<T> operator|(tstr<T>&& t, F&& f) {
59 template <
typename F> tstr<instance> operator|(binder&& t, F&& f) {
74 static nbool isNul(
const tstr<T>& it) {
return !it.isBind(); }
76 static constexpr nbool is_ptr =
false;
77 static constexpr nbool is_ref =
false;
78 static constexpr nbool is_like_ptr =
true;
86 static tstr<T>* ret() {
return nullptr; }
88 static nbool isNul(
const tstr<T>* it) {
return !it || !it->isBind(); }
90 static constexpr nbool is_ptr =
true;
91 static constexpr nbool is_ref =
false;
92 static constexpr nbool is_like_ptr = is_ptr;
100 static nbool isNul(
const tstr<T>& it) {
return !it.isBind(); }
107 static constexpr nbool is_ptr =
false;
108 static constexpr nbool is_ref =
true;
109 static constexpr nbool is_like_ptr =
true;
113 template <
typename T,
typename F>
118 template <
typename T,
typename F>
119 auto operator->*(
const tstr<T>& t, F&& f) ->
decltype(typeTrait<
decltype(f(*t))>::ret()) {
120 return t ? f(*t) : typeTrait<decltype(f(*t))>::ret();
123 template <
typename T,
typename F>
124 auto operator->*(tstr<T>&& t, F&& f) ->
decltype(typeTrait<
decltype(f(*t))>::ret()) {
125 return t ? f(*t) : typeTrait<decltype(f(*t))>::ret();
Generalized binding class for managing instance lifecycles
Definition binder.hpp:108
Strong reference smart pointer with strict type checking
Definition tstr.hpp:14
tstr(const type &subtype)
Weak reference smart pointer with type-safe access
Definition tweak.hpp:16
Core class for runtime type information in byeol language
Definition type.hpp:100
Rich logging support with polymorphic type conversion
Definition richLog.hpp:34
Type trait utilities for template metaprogramming
Definition typeTrait.hpp:14