Clang's libcxx std::integer_sequence implementation
There is not much to it
template<class T, T... I>
struct integer_sequence
{
typedef T value_type;
static constexpr size_t size() noexcept;
};
template<class T, T N>
using make_integer_sequence = integer_sequence<T, 0, 1, ..., N-1>;
however in make_integer_sequence I have never seen the ellipsis used is such a way, assuming it is not some preprocessor voodoo. Could someone please explain it? It seems rather new, as clang 3.5 - trunk version I compiled on windows in Feb this year - will not compile it. Also I cannot seem to find anything related to C++14.
3 comments · 100% upvoted · other discussions
Are you sure that is the part that has the compiler error?
Is this the
utilityheader file? If so, I think the snippet in question you are looking is in comments section. The actual implementation is further down the file. e.g.Look here: https://llvm.org/svn/llvm-project/libcxx/trunk/include/utility
solaeon [OP] 2 points · Sep 2014
Legend! The compile error was because I was trying to compile the snippet of code in the OP.
The problem was because I did look at that link rather than using my editor on the local file I have, if I had I would had noticed that it was indeed a comment.
Also the comments look like real C++ code.
Thanks for taking time out of your day to help me out.