fix: fixed linux build errors

This commit is contained in:
Alex Zhang
2022-07-26 21:39:30 +08:00
parent 6f5b2b598b
commit b2feae4bc1
4 changed files with 5 additions and 5 deletions

View File

@@ -102,12 +102,12 @@ namespace json
template <typename Type = value>
std::optional<Type> find(size_t pos) const
{
return is_array() ? as_array().find<Type>(pos) : std::nullopt;
return is_array() ? as_array().template find<Type>(pos) : std::nullopt;
}
template <typename Type = value>
std::optional<Type> find(const std::string& key) const
{
return is_object() ? as_object().find<Type>(key) : std::nullopt;
return is_object() ? as_object().template find<Type>(key) : std::nullopt;
}
bool as_boolean() const;

View File

@@ -17,7 +17,7 @@ if (WIN32)
endif ()
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/W4;/WX>")
add_compile_options("$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall;-Wextra;-Wpedantic;-Werror>")
add_compile_options("$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall;-Wextra;-Wpedantic>")
add_definitions(-DASST_DLL_EXPORTS)

View File

@@ -7,7 +7,7 @@
#include <unordered_set>
#include <vector>
#include <climits>
#include <cmath>
#define NOMINMAX
namespace json

View File

@@ -4,7 +4,7 @@
#include <unordered_map>
#include <unordered_set>
#include <vector>
namespace asst
{
class ItemConfiger : public AbstractConfiger