-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
98a81d6
commit c8390d5
Showing
4 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef PYTHONIC_DISPATCH_REVERSE_HPP | ||
#define PYTHONIC_DISPATCH_REVERSE_HPP | ||
|
||
#include "pythonic/include/__dispatch__/reverse.hpp" | ||
|
||
#include "pythonic/utils/functor.hpp" | ||
|
||
#include <algorithm> | ||
|
||
PYTHONIC_NS_BEGIN | ||
|
||
namespace __dispatch__ | ||
{ | ||
|
||
template <class Any> | ||
types::none_type reverse(Any &&any) | ||
{ | ||
std::reverse(any.begin(), any.end()); | ||
return {}; | ||
} | ||
} // namespace __dispatch__ | ||
PYTHONIC_NS_END | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef PYTHONIC_INCLUDE_DISPATCH_REVERSE_HPP | ||
#define PYTHONIC_INCLUDE_DISPATCH_REVERSE_HPP | ||
|
||
#include "pythonic/include/utils/functor.hpp" | ||
|
||
PYTHONIC_NS_BEGIN | ||
|
||
namespace __dispatch__ | ||
{ | ||
|
||
template <class Any> | ||
types::none_type reverse(Any &&any); | ||
|
||
DEFINE_FUNCTOR(pythonic::__dispatch__, reverse); | ||
} // namespace __dispatch__ | ||
PYTHONIC_NS_END | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters