c++ cross-platform utils