Allow to use non-copyable and non-movable types in TEMPLATE_LIST_TEST_CASE

The parameter given to `convert` may not be copyable therefore it has to be
captured by const reference. For example an `std::tuple` that contains a
non-copyable type is itself non-copyable.

The NonDefaultConstructible test-case was reduced by one example type
because it did not add any value.
This commit is contained in:
Benjamin Worpitz
2019-08-17 11:48:42 +02:00
committed by Martin Hořeňovský
parent 6629c11ef8
commit 18d597cf10
7 changed files with 73 additions and 33 deletions

View File

@@ -118,7 +118,7 @@
template<template <typename...> class Final, template< typename...> class...Containers, typename...Types>\
constexpr auto create(TypeList<Types...>) noexcept -> decltype(append(Final<>{}, rewrap<Containers>(Types{}...)...)) { return {}; }\
template<template <typename...> class Final, template <typename...> class List, typename...Ts>\
constexpr auto convert(List<Ts...>) noexcept -> decltype(append(Final<>{},TypeList<Ts>{}...)) { return {}; }
constexpr auto convert(const List<Ts...>& ) noexcept -> decltype(append(Final<>{},TypeList<Ts>{}...)) { return {}; }
#define INTERNAL_CATCH_NTTP_1(signature, ...)\
template<INTERNAL_CATCH_REMOVE_PARENS(signature)> struct Nttp{};\