mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-12-16 02:58:05 +00:00
Rearrange some macros. No functional change intended.
This commit is contained in:
@@ -1,11 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#if USE_STDFUNCTION
|
||||
|
||||
#include <functional>
|
||||
namespace hr {
|
||||
using std::function;
|
||||
} // namespace hr
|
||||
|
||||
#else
|
||||
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
namespace hr {
|
||||
|
||||
template<class Sig>
|
||||
class hyper_function;
|
||||
|
||||
template<class Sig>
|
||||
using function = hyper_function<Sig>;
|
||||
|
||||
template<class R, class... Args>
|
||||
struct hyper_function_state_base {
|
||||
virtual R call(Args...) const = 0;
|
||||
@@ -59,3 +73,7 @@ public:
|
||||
return ptr_ != nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace hr
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user