/* Check cf5-opt.vim defs.
VIM: let g:lcppflags="-std=c++11 -O2 -pthread"
VIM: let g:wcppflags="/O2 /EHsc /DWIN32"
VIM: let g:cppflags=g:Iboost.g:Itbb
VIM: let g:ldflags=g:Lboost.g:Ltbb.g:tbbmalloc.g:tbbmproxy
VIM: let g:ldlibpath=g:Bboost.g:Btbb
VIM: let g:argv=""
VIM-: let g:cf5output=0
*/

#include <locale>
#include <iostream>

int main(int argc, const char* argv[])
try
{
	std::cout << "name of current global locale: " << std::locale().name() << "\n";
	std::cout << "name of classic C locale: " << std::locale::classic().name() << "\n";
	std::cout << "name of \"user's preferred locale\": " << std::locale("").name () << "\n";

	std::cout.imbue( std::locale( "fr" ) );
	std::cerr.imbue( std::locale( "en_US" ) );

	std::cout << "fr: " << 1.1 << std::endl;
	std::cerr << "us: " << 1.1 << std::endl;
	return 0;
}
catch (...)
{
	std::cerr << "crash!!!" << std::endl;
	return 1;
}
