Util: Move staticConst<T> to separate header

This commit is contained in:
Riyyi
2022-07-10 00:30:31 +02:00
parent 0c972f420c
commit 5c95288874
2 changed files with 24 additions and 4 deletions
+2 -4
View File
@@ -13,9 +13,11 @@
#include <map>
#include <string>
#include <unordered_map>
#include <utility> // forward
#include <vector>
#include "util/json/array.h"
#include "util/json/conversion.h"
#include "util/json/object.h"
namespace Json {
@@ -86,10 +88,6 @@ struct fromJsonFunction {
}
};
// Avoid ODR (One Definition Rule) violations
template<typename T>
constexpr T staticConst {};
} // namespace Detail
// Anonymous namespace prevents multiple definition of the reference