48#if defined(TIMEMORY_DISABLE_COMPONENT_STORAGE_INIT)
50 using value_type =
typename type::value_type;
51 base::storage::template base_instance<type, value_type>();
58template <
typename U,
typename V>
62#if defined(TIMEMORY_DISABLE_COMPONENT_STORAGE_INIT)
63 return get_type{
nullptr,
false,
false,
false };
65 static thread_local auto _instance = []() {
67 return get_type{
nullptr,
false,
false,
false };
69 using value_type =
typename type::value_type;
70 auto this_inst = tim::base::storage::template base_instance<Tp, value_type>();
71 this_inst->initialize();
72 bool this_glob =
true;
73 bool this_work =
true;
74 bool this_data = this_inst->data_init();
75 return get_type{ this_inst, this_glob, this_work, this_data };
84template <
typename U,
typename V>
88 !std::is_same<typename U::storage_type, component::empty_storage>::value,
91#if defined(TIMEMORY_DISABLE_COMPONENT_STORAGE_INIT)
92 return get_type{
nullptr,
false,
false,
false };
94 static thread_local auto _instance = []() {
96 return get_type{
nullptr,
false,
false,
false };
98 using value_type =
typename type::value_type;
99 auto this_inst = tim::base::storage::template base_instance<Tp, value_type>();
100 this_inst->initialize();
101 return get_type{ this_inst,
false,
false,
false };
109template <
typename Tp>
110template <
typename U,
typename V>
114 std::is_same<typename U::storage_type, component::empty_storage>::value,
117 return get_type{
nullptr,
false,
false,
false };
122template <
typename Tp>
129#if defined(TIMEMORY_DISABLE_COMPONENT_STORAGE_INIT)
typename std::enable_if< B, T >::type enable_if_t
Alias template for enable_if.
auto get(const auto_bundle< Tag, Types... > &_obj)
void consume_parameters(ArgsT &&...)
The declaration for the types for operations without definitions.
Include the macros for operations.
Declare the operations types.
The declaration for the types for storage without definitions.
static get_type get(enable_if_t< trait::uses_value_storage< U, V >::value, int >=0)
std::tuple< pointer_t, bool, bool, bool > get_type
init_storage(enable_if_t< trait::uses_value_storage< Up >::value, int >=0)
trait that signifies that an implementation is enabled at runtime. The value returned from get() is f...
This trait is used to determine whether the (expensive) instantiation of the storage class happens.