How do I force the compiler to give errors if the user instantiates an object of some class incorrectly?
For example:
Polynomial a("x^2 + 2x + 1"); //this is a valid Polynomial object
Polynomial b("3xy + 2 - 5/z"); //this is not valid, force compiler error
static_assert seems to not work with function arguments and templates seem to not work with strings. If it's not possible to do this at compile-time, what are good ways to do this at run-time?