void foo(bar thing){ cout << thing.to_xml(); }