13 template <
typename T,
typename TACTIC = strTactic>
class tstr:
public tweak<T, TACTIC> {
31 me& operator=(
const me& rhs) =
default;
42 template <
typename T,
typename F> tmedium<T> operator|(
const tstr<T>& t, F&& f) {
49 template <
typename T,
typename F> tstr<T> operator|(tstr<T>&& t, F&& f) {
56 template <
typename F> tstr<instance> operator|(binder&& t, F&& f) {
71 static nbool isNul(
const tstr<T>& it) {
return !it.isBind(); }
73 static constexpr nbool is_ptr =
false;
74 static constexpr nbool is_ref =
false;
75 static constexpr nbool is_like_ptr =
true;
83 static tstr<T>* ret() {
return nullptr; }
85 static nbool isNul(
const tstr<T>* it) {
return !it || !it->isBind(); }
87 static constexpr nbool is_ptr =
true;
88 static constexpr nbool is_ref =
false;
89 static constexpr nbool is_like_ptr = is_ptr;
97 static nbool isNul(
const tstr<T>& it) {
return !it.isBind(); }
104 static constexpr nbool is_ptr =
false;
105 static constexpr nbool is_ref =
true;
106 static constexpr nbool is_like_ptr =
true;
110 template <
typename T,
typename F>
111 auto operator->*(
tstr<T>& t, F&& f) ->
decltype(
typeTrait<
decltype(f(*t))>::ret()) {
112 return t ? f(*t) :
typeTrait<decltype(f(*t))>::ret();
115 template <
typename T,
typename F>
116 auto operator->*(
const tstr<T>& t, F&& f) ->
decltype(typeTrait<
decltype(f(*t))>::ret()) {
117 return t ? f(*t) : typeTrait<decltype(f(*t))>::ret();
120 template <
typename T,
typename F>
121 auto operator->*(tstr<T>&& t, F&& f) ->
decltype(typeTrait<
decltype(f(*t))>::ret()) {
122 return t ? f(*t) : typeTrait<decltype(f(*t))>::ret();
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
Strong reference smart pointer with strict type checking.
Definition: tstr.hpp:13
tstr(const type &subtype)
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