Skip to content

Commit c71318a

Browse files
committed
[orc-rt] Rename helper class. NFC.
This commit is cleanup in preparation for adding const support to orc_rt::move_only_function.
1 parent cd8f47b commit c71318a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

orc-rt/include/orc-rt/move_only_function.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ namespace orc_rt {
3232

3333
namespace move_only_function_detail {
3434

35-
template <typename RetT, typename... ArgTs> class Callable {
35+
template <typename RetT, typename... ArgTs> class GenericCallable {
3636
public:
37-
virtual ~Callable() = default;
37+
virtual ~GenericCallable() = default;
3838
virtual RetT call(ArgTs &&...Args) = 0;
3939
};
4040

4141
template <typename CallableT, typename RetT, typename... ArgTs>
42-
class CallableImpl : public Callable<RetT, ArgTs...> {
42+
class GenericCallableImpl : public GenericCallable<RetT, ArgTs...> {
4343
public:
44-
CallableImpl(CallableT &&Callable) : Callable(std::move(Callable)) {}
44+
GenericCallableImpl(CallableT &&Callable) : Callable(std::move(Callable)) {}
4545
RetT call(ArgTs &&...Args) override {
4646
return Callable(std::forward<ArgTs>(Args)...);
4747
}
@@ -66,7 +66,7 @@ class move_only_function<RetT(ArgTs...)> {
6666

6767
template <typename CallableT>
6868
move_only_function(CallableT &&Callable)
69-
: C(std::make_unique<move_only_function_detail::CallableImpl<
69+
: C(std::make_unique<move_only_function_detail::GenericCallableImpl<
7070
std::decay_t<CallableT>, RetT, ArgTs...>>(std::move(Callable))) {}
7171

7272
RetT operator()(ArgTs... Params) {
@@ -76,7 +76,7 @@ class move_only_function<RetT(ArgTs...)> {
7676
explicit operator bool() const { return !!C; }
7777

7878
private:
79-
std::unique_ptr<move_only_function_detail::Callable<RetT, ArgTs...>> C;
79+
std::unique_ptr<move_only_function_detail::GenericCallable<RetT, ArgTs...>> C;
8080
};
8181

8282
} // namespace orc_rt

0 commit comments

Comments
 (0)