1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-31 14:02:59 +00:00

Rearrange some macros. No functional change intended.

This commit is contained in:
Arthur O'Dwyer
2019-02-08 18:18:56 -05:00
parent 17fbd46352
commit 9471ac4ff5
6 changed files with 40 additions and 32 deletions

View File

@@ -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