summaryrefslogtreecommitdiff
path: root/discord
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2020-11-01 15:17:19 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2020-11-01 15:17:19 -0500
commit2d5439ba90265e10f1ed2476e6a46eb997bce16b (patch)
tree7fecb533b67c43af3e9cd55582470160b0216c91 /discord
parent534bfccf2330bb85a19d0a3bb6d90df3c4d9d83a (diff)
downloadabaddon-portaudio-2d5439ba90265e10f1ed2476e6a46eb997bce16b.tar.gz
abaddon-portaudio-2d5439ba90265e10f1ed2476e6a46eb997bce16b.zip
fix compile
Diffstat (limited to 'discord')
-rw-r--r--discord/json.hpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/discord/json.hpp b/discord/json.hpp
index beb1592..0b27d6d 100644
--- a/discord/json.hpp
+++ b/discord/json.hpp
@@ -12,7 +12,7 @@ struct is_optional<::std::optional<T>> : ::std::true_type {};
template<typename T>
inline void json_direct(const ::nlohmann::json &j, const char *key, T &val) {
if constexpr (is_optional<T>::value)
- val = j.at(key).get<T::value_type>();
+ val = j.at(key).get<typename T::value_type>();
else
j.at(key).get_to(val);
}
@@ -21,7 +21,7 @@ template<typename T>
inline void json_optional(const ::nlohmann::json &j, const char *key, T &val) {
if constexpr (is_optional<T>::value) {
if (j.contains(key))
- val = j.at(key).get<T::value_type>();
+ val = j.at(key).get<typename T::value_type>();
else
val = ::std::nullopt;
} else {
@@ -35,7 +35,7 @@ inline void json_nullable(const ::nlohmann::json &j, const char *key, T &val) {
if constexpr (is_optional<T>::value) {
const auto &at = j.at(key);
if (!at.is_null())
- val = at.get<T::value_type>();
+ val = at.get<typename T::value_type>();
else
val = ::std::nullopt;
} else {
@@ -51,7 +51,7 @@ inline void json_optional_nullable(const ::nlohmann::json &j, const char *key, T
if (j.contains(key)) {
const auto &at = j.at(key);
if (!at.is_null())
- val = at.get<T::value_type>();
+ val = at.get<typename T::value_type>();
else
val = ::std::nullopt;
} else {
@@ -72,7 +72,7 @@ inline void json_update_optional_nullable(const ::nlohmann::json &j, const char
if (j.contains(key)) {
const auto &at = j.at(key);
if (!at.is_null())
- val = at.get<T::value_type>();
+ val = at.get<typename T::value_type>();
else
val = ::std::nullopt;
}
@@ -95,7 +95,7 @@ inline void json_update_optional_nullable_default(const ::nlohmann::json &j, con
if (at.is_null())
val = fallback;
else
- val = at.get<T::value_type>();
+ val = at.get<typename T::value_type>();
}
} else {
if (j.contains(key)) {