I\'m trying to understand the usefulness of static_assert
, and I want to know if it can help me in enforcing a design, and if so, how.
I have a general temp
http://en.cppreference.com/w/cpp/header/type_traits
std::is_base_of
and std::is_convertible
could help with your first issue and as for the second,
static_assert(!std::is_same
hopefully this helps someone else who stumbles upon this question, assuming OP probably found an answer in the 4 years since it was asked :)