Skip to content

Commit

Permalink
Fix C2275 error with latest Visual Studio 2022
Browse files Browse the repository at this point in the history
This fixes the following build error:

  src\flexasio\FlexASIO\config.cpp(66): error C2275: 'flexasio::`anonymous-namespace'::RemoveOptional<std::optional<int>>::Value': expected an expression instead of a type
  • Loading branch information
dechamps committed May 22, 2022
1 parent 28933aa commit 57e14e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flexasio/FlexASIO/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace flexasio {
template <typename T> struct RemoveOptional<std::optional<T>> { using Value = T; };

template <typename T, typename Validator> void SetOption(const toml::Table& table, const std::string& key, T& option, Validator validator) {
ProcessTypedOption<RemoveOptional<T>::Value>(table, key, [&](const RemoveOptional<T>::Value& value) {
ProcessTypedOption<typename RemoveOptional<T>::Value>(table, key, [&](const RemoveOptional<T>::Value& value) {
validator(value);
option = value;
});
Expand Down

0 comments on commit 57e14e8

Please sign in to comment.