Beta

Compile-time maximum value in sequence finder!

Description
Loading description...
Metaprogramming
Fundamentals
  • Please sign in or sign up to leave a comment.
  • o2001 Avatar

    Consider storing the user's answers in constexpr variables then using the regular Assert::That syntax instead of static_asserts. This way, the program still checks compile time behavior, but can still compile and provide meaningful feedback (via ExtraMessage) instead of just refusing to compile and giving a vague assertion failure message.

  • gfandrade10 Avatar

    This comment has been hidden.

    • o2001 Avatar

      An answer two years too late, but your code returns the incorrect result when T is unsigned. The vs function is where the problem lies.

  • blindvigil Avatar

    Loving the introduction to templates - it is inspiring a great deal of research to figure out. Any brief overview of what the given code means would go a long way int the project description.

    Thanks for providing a rarely-showcased aspect of programming.

  • FArekkusu Avatar

    Why is seq_max_v not a function? Is it designed this way specifically for the challenge?