Jul 28, 2011

C++ trick

const T& get() { const static T empty_value; return condition ? real_value : empty_value;}

it's helpful when T is std::container or so on.