More use of std::enable_if_t alias
This commit is contained in:
parent
d37c3d175d
commit
5ccf18d772
|
@ -32,7 +32,7 @@ public:
|
||||||
constexpr ArrayView(T(&array)[N]) : m_pointer(array), m_size(N) {}
|
constexpr ArrayView(T(&array)[N]) : m_pointer(array), m_size(N) {}
|
||||||
|
|
||||||
template<typename Alloc, typename U,
|
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)
|
constexpr ArrayView(const std::vector<U, Alloc>& v)
|
||||||
: m_pointer(v.data()), m_size(v.size()) {}
|
: m_pointer(v.data()), m_size(v.size()) {}
|
||||||
|
|
||||||
|
|
|
@ -68,8 +68,8 @@ template<typename Completer, typename... Rest>
|
||||||
struct PerArgumentCommandCompleter<Completer, Rest...> : PerArgumentCommandCompleter<Rest...>
|
struct PerArgumentCommandCompleter<Completer, Rest...> : PerArgumentCommandCompleter<Rest...>
|
||||||
{
|
{
|
||||||
template<typename C, typename... R,
|
template<typename C, typename... R,
|
||||||
typename = typename std::enable_if<not std::is_base_of<PerArgumentCommandCompleter<>,
|
typename = std::enable_if_t<not std::is_base_of<PerArgumentCommandCompleter<>,
|
||||||
std::remove_reference_t<C>>::value>::type>
|
std::remove_reference_t<C>>::value>>
|
||||||
PerArgumentCommandCompleter(C&& completer, R&&... rest)
|
PerArgumentCommandCompleter(C&& completer, R&&... rest)
|
||||||
: PerArgumentCommandCompleter<Rest...>(std::forward<R>(rest)...),
|
: PerArgumentCommandCompleter<Rest...>(std::forward<R>(rest)...),
|
||||||
m_completer(std::forward<C>(completer)) {}
|
m_completer(std::forward<C>(completer)) {}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user