Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Only forward decl tuple_element/size in tuple.h.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhemstad committed Jun 23, 2021
1 parent 0f93dc8 commit c345435
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions thrust/tuple.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,7 @@ struct null_type;
* \see pair
* \see tuple
*/
template<size_t N, class T>
struct tuple_element
{
private:
typedef typename T::tail_type Next;

public:
/*! The result of this metafunction is returned in \c type.
*/
typedef typename tuple_element<N-1, Next>::type type;
}; // end tuple_element
template <size_t N, class T> struct tuple_element;

/*! This metafunction returns the number of elements
* of a \p tuple type of interest.
Expand All @@ -82,13 +72,8 @@ template<size_t N, class T>
* \see pair
* \see tuple
*/
template<class T>
struct tuple_size
{
/*! The result of this metafunction is returned in \c value.
*/
static const int value = 1 + tuple_size<typename T::tail_type>::value;
}; // end tuple_size
template <class T> struct tuple_size;


// get function for non-const cons-lists, returns a reference to the element

Expand Down

0 comments on commit c345435

Please sign in to comment.