mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-01 15:26:59 +00:00
Fix concepts related error (for compat with gcc9)
Signed-off-by: Lucca Jiménez Könings <development@jimkoen.com>
This commit is contained in:
parent
4c9fbc250a
commit
67db9358e1
@ -193,8 +193,9 @@ struct Settings {
|
||||
}
|
||||
map->at(key) = value;
|
||||
}
|
||||
template<std::same_as<int> T>
|
||||
void set(Key key, T value) {
|
||||
|
||||
template<typename Integer, std::enable_if_t<std::is_same_v<Integer, int>, bool> = true>
|
||||
void set(Key key, Integer value) {
|
||||
auto map = SettingsMap.synchronize();
|
||||
if (!map->contains(key)) {
|
||||
throw std::logic_error { "Undefined setting key accessed in Settings::set(int)" };
|
||||
@ -204,8 +205,8 @@ struct Settings {
|
||||
}
|
||||
map->at(key) = value;
|
||||
}
|
||||
template<std::same_as<bool> T>
|
||||
void set(Key key, T value) {
|
||||
template<typename Boolean, std::enable_if_t<std::is_same_v<bool, Boolean>, bool> = true>
|
||||
void set(Key key, Boolean value) {
|
||||
auto map = SettingsMap.synchronize();
|
||||
if (!map->contains(key)) {
|
||||
throw std::logic_error { "Undefined setting key accessed in Settings::set(bool)" };
|
||||
|
Loading…
x
Reference in New Issue
Block a user