mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-23 23:34:12 +03:00
Avoid using standard concepts
Turns out those are unimplemented in clang < 13, use custom code instead.
This commit is contained in:
parent
e49b99e269
commit
4122b64ecd
@ -4,7 +4,6 @@
|
||||
#include "assert.hh"
|
||||
|
||||
#include <memory>
|
||||
#include <concepts>
|
||||
|
||||
namespace Kakoune
|
||||
{
|
||||
@ -175,10 +174,9 @@ public:
|
||||
{}
|
||||
|
||||
template<typename Target>
|
||||
requires requires (Target t, Args... a) {
|
||||
requires not std::is_same_v<FunctionRef, std::remove_cvref_t<Target>>;
|
||||
{ t(a...) } -> std::convertible_to<Res>;
|
||||
}
|
||||
requires (not std::is_same_v<FunctionRef, std::remove_cvref_t<Target>> and
|
||||
(std::is_void_v<Res> or
|
||||
requires (Target t, Args... a, void(&func)(Res)) { func(t(a...)); }))
|
||||
FunctionRef(Target&& target)
|
||||
: m_target{&target},
|
||||
m_invoker{[](void* target, Args... args) {
|
||||
|
Loading…
Reference in New Issue
Block a user