I have C++ code that boils down to something like the following:
class Foo{ bool bar; bool baz; Foo(const void*); }; Foo::Foo(const void* ptr){
You may use delegate constructor in C++11:
class Foo{ public: Foo(const void* ptr) : Foo(complex_method(ptr)) {} private: Foo(const my_struct* s) : bar(calculate_bar(s)), baz(calculate_baz(s)) {} private: const bool bar; const bool baz; };