83 static std::unique_ptr<this_type>& GetInstance()
85 static auto _instance = std::unique_ptr<this_type>(
new this_type);
90 std::map<key_type, T*, compare_type> m_data;
101 template <
typename... Args>
104 throw std::runtime_error(
"Not specialized!");
119 template <
typename... Args>
122 auto& _data = data_type::GetInstance();
124 auto _ptr = _data->m_data.at(_eval.index);
125 _eval.modifier(_ptr);
126 T::SetInstance(_data->m_data.at(_key));
typename G4Traits::TaskSingletonKey< T > key_type
static void Configure(Args &&... args)
This structure must be specialized and use overloads to the constructor.
G4TaskSingletonEvaluator(key_type &, Args &&...)
typename G4Traits::TaskSingletonKey< T >::type key_type
std::less< type > compare_type