diff --git a/premake5.lua b/premake5.lua index 662f9f5..ae54d32 100644 --- a/premake5.lua +++ b/premake5.lua @@ -58,11 +58,11 @@ filter {} filter {"language:C++", "toolset:not msc*"} buildoptions { - "-std=c++17" + "-std=c++20" } filter "toolset:msc*" buildoptions { - "/std:c++17" + "/std:c++20" } filter {} diff --git a/src/std_include.hpp b/src/std_include.hpp index e610487..5245c23 100644 --- a/src/std_include.hpp +++ b/src/std_include.hpp @@ -31,10 +31,12 @@ #endif #include +#include #include #include #include #include +#include #include #include diff --git a/src/utils/info_string.cpp b/src/utils/info_string.cpp index 7f373f2..4d37ba1 100644 --- a/src/utils/info_string.cpp +++ b/src/utils/info_string.cpp @@ -43,23 +43,24 @@ namespace utils { const auto& key = key_values[i]; const auto& value = key_values[i + 1]; - this->key_value_pairs_[key] = value; + + if (!this->key_value_pairs_.contains(key)) + { + this->key_value_pairs_[key] = value; + } } } std::string info_string::build() const { - //auto first = true; std::string info_string; - for (auto i = this->key_value_pairs_.begin(); i != this->key_value_pairs_.end(); ++i) + for (const auto& [key, val] : this->key_value_pairs_) { - //if (first) first = false; - /*else*/ info_string.append("\\"); - info_string.append(i->first); // Key + info_string.append(key); info_string.append("\\"); - info_string.append(i->second); // Value + info_string.append(val); } return info_string;