/mnt/c/Users/ljerabek/Documents/GitHub/Template-Metaprogramming-with-CPP/src/chapter_03/main.cpp:335:56: error: expected primary-expression before ‘;’ token
335 | constexpr auto indexes = std::make_index_sequence<5>;
Clang shows the following error.
/mnt/c/Users/ljerabek/Documents/GitHub/Template-Metaprogramming-with-CPP/src/chapter_03/main.cpp:335:56: error: expected '(' for function-style cast or type construction
constexpr auto indexes = std::make_index_sequence<5>;
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
It appears that it's easy to fix.
namespace n316
{
template <int... R>
constexpr int Sum = (... + R);
template <int... I>
constexpr auto indexes = std::make_index_sequence<5>(); // Just add parenthesis to the following line as shown.
}
GCC shows the following error.
Clang shows the following error.
It appears that it's easy to fix.