Consider this example code:
template char register_(){ return D::get_dummy(); // static function } template struct Foo{
Is there any way to force dummy to be initialized (effectively calling register_) without any instance of Bar or Foo (no instances, so no constructor trickery)?
Wouldn't this be sufficient?
std::cout << Foo::dummy;