Skip to content
Snippets Groups Projects
Commit 3c7a119a authored by Joscha Schmiedt's avatar Joscha Schmiedt
Browse files

Fix incompatibility with newer boost::json versions

to_string method of boost::json::string_view was removed.
parent 5536e1b6
Branches
Tags
2 merge requests!61Release 0.3.0,!53Add vcpkg support
This commit is part of merge request !53. Comments created here will be created in the context of that merge request.
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
throw ConfigurationError("This CaosDB client has not been configured."); \ throw ConfigurationError("This CaosDB client has not been configured."); \
} \ } \
assert(WRAPPED_JSON_CONFIGURATION(this)->is_object()); \ assert(WRAPPED_JSON_CONFIGURATION(this)->is_object()); \
const auto &configuration = WRAPPED_JSON_CONFIGURATION(this)->as_object(); \ const auto &configuration = WRAPPED_JSON_CONFIGURATION(this) -> as_object(); \
if (!configuration.contains("connections")) { \ if (!configuration.contains("connections")) { \
throw ConfigurationError("This CaosDB client hasn't any configured connections."); \ throw ConfigurationError("This CaosDB client hasn't any configured connections."); \
} \ } \
...@@ -343,7 +343,7 @@ auto CreateLoggingConfiguration(const object &from) -> LoggingConfiguration { ...@@ -343,7 +343,7 @@ auto CreateLoggingConfiguration(const object &from) -> LoggingConfiguration {
const auto *elem = sinks.begin(); const auto *elem = sinks.begin();
while (elem != sinks.end()) { while (elem != sinks.end()) {
result.AddSink(CreateSinkConfiguration(elem->value().as_object(), elem->key().to_string(), result.AddSink(CreateSinkConfiguration(elem->value().as_object(), std::string(elem->key()),
default_level)); default_level));
elem = std::next(elem); elem = std::next(elem);
} }
...@@ -419,7 +419,7 @@ auto ConfigurationManager::mGetDefaultConnectionName() const -> std::string { ...@@ -419,7 +419,7 @@ auto ConfigurationManager::mGetDefaultConnectionName() const -> std::string {
} }
if (connections.size() == 1) { if (connections.size() == 1) {
// return the key of the first and only sub-element of connections. // return the key of the first and only sub-element of connections.
return connections.begin()->key().to_string(); return std::string(connections.begin()->key());
} }
throw ConfigurationError("Could not determine the default connection."); throw ConfigurationError("Could not determine the default connection.");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment