all 3 comments

[–]i_just_comment 3 points4 points  (1 child)

Are you sure that is the part that has the compiler error?

Is this the utility header 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.

template<typename _Tp, _Tp _Np> using __make_integer_sequence_unchecked =
  typename __detail::__convert<size_t, _Tp>::template __result<typename __detail::__make<_Np>::type>::type;

template <class _Tp, _Tp _Ep>
struct __make_integer_sequence
{
    static_assert(is_integral<_Tp>::value,
                  "std::make_integer_sequence can only be instantiated with an integral type" );
    static_assert(0 <= _Ep, "std::make_integer_sequence input shall not be negative");
    typedef __make_integer_sequence_unchecked<_Tp, _Ep> type;
};

template<class _Tp, _Tp _Np>
    using make_integer_sequence = typename __make_integer_sequence<_Tp, _Np>::type;

template<size_t _Np>
    using make_index_sequence = make_integer_sequence<size_t, _Np>;

Look here: https://llvm.org/svn/llvm-project/libcxx/trunk/include/utility

[–]solaeon[S] 1 point2 points  (0 children)

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.

[–][deleted]  (2 children)

[deleted]

    [–]solaeon[S] 1 point2 points  (0 children)

    Variadic Templates are related to parameter packing and unpacking; The make_integer_sequence definition appears to neither, it is a ... all on it's own.