Skip to content
This repository was archived by the owner on Nov 11, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions discordpp/CONSTRUCTIN/FROMJSON.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
std::vector<snowflake> sfs; \
auto jk = j[key]; \
std::transform(jk.begin(), jk.end(), std::back_inserter(sfs), \
[&key](const json &j) { \
[](const json &j) { \
snowflake sf; \
std::istringstream(j[key].get<std::string>()) >> \
std::istringstream(j.get<std::string>()) >> \
sf; \
return sf; \
}); \
Expand Down
2 changes: 2 additions & 0 deletions discordpp/constructs/todo.hh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#pragma once

#include <nlohmann/json.hpp>

namespace discordpp {
using json = nlohmann::json;

Expand Down
2 changes: 2 additions & 0 deletions discordpp/util/construct.hh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#pragma once

#include <optional>

namespace discordpp {
using json = nlohmann::json;
template <typename T> using opt = std::optional<T>;
Expand Down