// Bug_in_istarts_with.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include int _tmain(int argc, _TCHAR* argv[]) { if(boost::algorithm::istarts_with(L"Prefix.FollowedByText", L"Prefix")) { std::cout << "Test succeeded" << std::endl; } else { // Fails if compiling with /Zc:wchar_t- // (do not treat wchar_t as a built-in type) // Reason for failure: boost::end() points past the terminating NULL character. std::cout << "Test failed" << std::endl; } std::cout << "Press Enter to continue "; getchar(); return 0; }