fn log<T: Figure>(figure: &T) {
figure.print();
}
template <typename T>
void log(const T &figure) {
static_assert(std::is_base_of<Figure, T>::value,
"It has to be a Figure");
figure.print();
}
fn log(figure: &Figure) {
figure.print();
}
void log(const Figure &figure) {
figure.print();
}