More use of std::enable_if_t alias

This commit is contained in:
Maxime Coste 2017-07-19 08:55:24 +02:00
parent d37c3d175d
commit 5ccf18d772
2 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ public:
constexpr ArrayView(T(&array)[N]) : m_pointer(array), m_size(N) {}
template<typename Alloc, typename U,
typename = typename std::enable_if<sizeof(U) == sizeof(T)>::type>
typename = std::enable_if_t<sizeof(U) == sizeof(T)>>
constexpr ArrayView(const std::vector<U, Alloc>& v)
: m_pointer(v.data()), m_size(v.size()) {}

View File

@ -68,8 +68,8 @@ template<typename Completer, typename... Rest>
struct PerArgumentCommandCompleter<Completer, Rest...> : PerArgumentCommandCompleter<Rest...>
{
template<typename C, typename... R,
typename = typename std::enable_if<not std::is_base_of<PerArgumentCommandCompleter<>,
std::remove_reference_t<C>>::value>::type>
typename = std::enable_if_t<not std::is_base_of<PerArgumentCommandCompleter<>,
std::remove_reference_t<C>>::value>>
PerArgumentCommandCompleter(C&& completer, R&&... rest)
: PerArgumentCommandCompleter<Rest...>(std::forward<R>(rest)...),
m_completer(std::forward<C>(completer)) {}