mirror of
https://github.com/mawww/kakoune.git
synced 2024-09-11 13:00:41 +03:00
Remove void_t and use requires instead
This commit is contained in:
parent
a250b96c18
commit
2d9886afe7
@ -1,17 +1,12 @@
|
||||
#ifndef meta_hh_INCLUDED
|
||||
#define meta_hh_INCLUDED
|
||||
|
||||
namespace Kakoune
|
||||
{
|
||||
inline namespace Meta
|
||||
namespace Kakoune::inline Meta
|
||||
{
|
||||
|
||||
struct AnyType{};
|
||||
template<typename T> struct Type : AnyType {};
|
||||
|
||||
template<typename T> using void_t = void;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // meta_hh_INCLUDED
|
||||
|
@ -210,11 +210,12 @@ constexpr bool is_direction(RegexMode mode)
|
||||
(mode & ~(RegexMode::Forward | RegexMode::Backward)) == RegexMode{0};
|
||||
}
|
||||
|
||||
template<typename It, typename=void>
|
||||
template<typename It>
|
||||
struct SentinelType { using Type = It; };
|
||||
|
||||
template<typename It>
|
||||
struct SentinelType<It, void_t<typename It::Sentinel>> { using Type = typename It::Sentinel; };
|
||||
requires requires { typename It::Sentinel; }
|
||||
struct SentinelType<It> { using Type = typename It::Sentinel; };
|
||||
|
||||
template<typename Iterator, RegexMode mode>
|
||||
requires (has_direction(mode))
|
||||
|
Loading…
Reference in New Issue
Block a user