Fix building with MSVC
This commit is contained in:
@@ -248,7 +248,7 @@ void apply_if_not_null(const T *pointer, F &&func, FElse &&func_else)
|
|||||||
if (pointer != nullptr) {
|
if (pointer != nullptr) {
|
||||||
std::forward<F>(func)(pointer);
|
std::forward<F>(func)(pointer);
|
||||||
}
|
}
|
||||||
else if (func_else) {
|
else {
|
||||||
std::forward<FElse>(func_else)();
|
std::forward<FElse>(func_else)();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -265,7 +265,7 @@ void apply_if(const bool condition, F &&func, FElse &&func_else)
|
|||||||
if (condition) {
|
if (condition) {
|
||||||
std::forward<F>(func)();
|
std::forward<F>(func)();
|
||||||
}
|
}
|
||||||
else if (func_else) {
|
else {
|
||||||
std::forward<FElse>(func_else)();
|
std::forward<FElse>(func_else)();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,8 +53,14 @@ TEST_CASE("t00056", "[test-case][class]")
|
|||||||
REQUIRE_THAT(
|
REQUIRE_THAT(
|
||||||
puml, IsConceptRequirement(_A("iterable<T>"), "container.end()"));
|
puml, IsConceptRequirement(_A("iterable<T>"), "container.end()"));
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
REQUIRE_THAT(puml,
|
||||||
|
IsConceptRequirement(
|
||||||
|
_A("convertible_to_string<T>"), "std::string({s})"));
|
||||||
|
#else
|
||||||
REQUIRE_THAT(puml,
|
REQUIRE_THAT(puml,
|
||||||
IsConceptRequirement(_A("convertible_to_string<T>"), "std::string{s}"));
|
IsConceptRequirement(_A("convertible_to_string<T>"), "std::string{s}"));
|
||||||
|
#endif
|
||||||
REQUIRE_THAT(puml,
|
REQUIRE_THAT(puml,
|
||||||
IsConceptRequirement(
|
IsConceptRequirement(
|
||||||
_A("convertible_to_string<T>"), "{std::to_string(s)} noexcept"));
|
_A("convertible_to_string<T>"), "{std::to_string(s)} noexcept"));
|
||||||
|
|||||||
Reference in New Issue
Block a user