C++ platform abstraction