Fix a MSVC test failure

This commit is contained in:
Denis Blank 2018-03-12 06:13:39 +01:00
parent 4c39532d7c
commit c72d1afa8b
2 changed files with 8 additions and 2 deletions

View File

@ -284,11 +284,17 @@ struct strategy_remap_tag {};
template <typename Mapper, typename T>
using is_effective_t = traits::is_invocable<typename Mapper::traversor_type, T>;
// TODO find out whether the linear compile-time instantiation is faster:
// template <typename Mapper, typename... T>
// struct is_effective_any_of_t
// : traits::disjunction<is_effective_t<Mapper, T>...> {};
// template <typename Mapper>
// struct is_effective_any_of_t<Mapper> : std::false_type {};
/// Deduces to a true type if any type leads to at least one effective
/// call to the mapper.
template <typename Mapper, typename... T>
struct is_effective_any_of_t;
template <typename Mapper, typename First, typename... Rest>
struct is_effective_any_of_t<Mapper, First, Rest...>
: std::conditional<is_effective_t<Mapper, First>::value, std::true_type,

View File

@ -548,7 +548,7 @@ TEST(test_strategic_container_traverse, traverse_move_only_wrapped) {
std::size_t counter = 0;
traverse_pack(
[&counter](auto&& ptr) {
[&counter](auto&& ptr) -> void {
auto moved(std::forward<decltype(ptr)>(ptr));
EXPECT_EQ((*moved), 5);
++counter;