File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
1
#pragma once
2
2
3
+ #include " fly/concepts/concepts.hpp"
3
4
#include " fly/config/config.hpp"
4
5
#include " fly/logger/logger.hpp"
5
6
#include " fly/types/json/json.hpp"
@@ -76,7 +77,7 @@ class ConfigManager : public std::enable_shared_from_this<ConfigManager>
76
77
*
77
78
* @return A reference to the created/found configuration.
78
79
*/
79
- template <typename T>
80
+ template <fly::DerivedFrom<Config> T>
80
81
std::shared_ptr<T> create_config ();
81
82
82
83
/* *
@@ -124,11 +125,9 @@ class ConfigManager : public std::enable_shared_from_this<ConfigManager>
124
125
};
125
126
126
127
// ==================================================================================================
127
- template <typename T>
128
+ template <fly::DerivedFrom<Config> T>
128
129
std::shared_ptr<T> ConfigManager::create_config ()
129
130
{
130
- static_assert (std::is_base_of_v<Config, T>);
131
-
132
131
std::shared_ptr<T> config;
133
132
134
133
std::lock_guard<std::mutex> lock (m_configs_mutex);
You can’t perform that action at this time.
0 commit comments