14 template <
typename T,
typename TACTIC = strTactic>
class tstr:
public tweak<T, TACTIC> {
33 me& operator=(
const me& rhs) =
default;
44 template <
typename T,
typename F> tmedium<T> operator|(
const tstr<T>& t, F&& f) {
51 template <
typename T,
typename F> tstr<T> operator|(tstr<T>&& t, F&& f) {
58 template <
typename F> tstr<instance> operator|(binder&& t, F&& f) {
73 static nbool isNul(
const tstr<T>& it) {
return !it.isBind(); }
75 static constexpr nbool is_ptr =
false;
76 static constexpr nbool is_ref =
false;
77 static constexpr nbool is_like_ptr =
true;
85 static tstr<T>* ret() {
return nullptr; }
87 static nbool isNul(
const tstr<T>* it) {
return !it || !it->isBind(); }
89 static constexpr nbool is_ptr =
true;
90 static constexpr nbool is_ref =
false;
91 static constexpr nbool is_like_ptr = is_ptr;
99 static nbool isNul(
const tstr<T>& it) {
return !it.isBind(); }
106 static constexpr nbool is_ptr =
false;
107 static constexpr nbool is_ref =
true;
108 static constexpr nbool is_like_ptr =
true;
112 template <
typename T,
typename F>
117 template <
typename T,
typename F>
118 auto operator->*(
const tstr<T>& t, F&& f) ->
decltype(typeTrait<
decltype(f(*t))>::ret()) {
119 return t ? f(*t) : typeTrait<decltype(f(*t))>::ret();
122 template <
typename T,
typename F>
123 auto operator->*(tstr<T>&& t, F&& f) ->
decltype(typeTrait<
decltype(f(*t))>::ret()) {
124 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
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
Type trait utilities for template metaprogramming
Definition typeTrait.hpp:15