Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tuple_element to jitsafe tuple header #108

Merged
merged 1 commit into from
Dec 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
added tuple_element to jitsafe tuple header
  • Loading branch information
MatthiasKohl committed Dec 21, 2022
commit 99128f360a7363a57903eccf3104f53859c6d868
12 changes: 12 additions & 0 deletions jitify.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2406,6 2406,18 @@ static const char* jitsafe_header_tuple = R"(
#if __cplusplus >= 201103L
namespace std {
template<class... Types > class tuple;

template< size_t I, class T >
struct tuple_element;
// recursive case
template< size_t I, class Head, class... Tail >
struct tuple_element<I, tuple<Head, Tail...>>
: tuple_element<I-1, tuple<Tail...>> { };
// base case
template< class Head, class... Tail >
struct tuple_element<0, tuple<Head, Tail...>> {
using type = Head;
};
} // namespace std
#endif
)";
Expand Down