Skip to content
Closed
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
5 changes: 5 additions & 0 deletions include/camp/tuple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <sstream>
#include <type_traits>

#include "camp/array.hpp"
#include "camp/concepts.hpp"
#include "camp/map.hpp"

Expand Down Expand Up @@ -52,6 +53,10 @@ template <typename... Args>
struct tuple_size<tuple<Args...>> : ::camp::num<sizeof...(Args)> {
};

template <typename T, size_t N>
struct tuple_size<array<T, N>> : ::camp::num<N> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's already a tuple_size entity in array.hpp. Does that one not work?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That one does not work for me because it's defined within the std namespace. camp::apply looks for camp::tuple_size, so we need to define one that specializes for camp::array.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this one to array.hpp, then?

};

template <typename L, typename... Args>
struct tuple_size<tagged_tuple<L, Args...>> : ::camp::num<sizeof...(Args)> {
};
Expand Down