
30 Oct
2015
30 Oct
'15
9:40 p.m.
John Maddock wrote:
A simpler alternative might be:
template
class polynomial; Which implements a polynomial of maximum order N. Multiplication would have to be mod x^N as I can't think of an error handling mechanism that works for both runtime and constexpr contexts?
I think that throwing an exception works in both contexts. In a constexpr context, if the path that throws is chosen, the result is a compile-time error.