[C++]: fix for Windows. Additional bounds check unit tests.