I'm getting a handful of the following errors and warnings while trying to build with boost regex in MS Visual C++ .NET with the /clr option (managed extensions).

boost_1_32_0\boost\regex\v4\match_results.hpp(189): warning C4561: '__fastcall' incompatible with the '/clr' option: converting to '__stdcall'

error LNK2001: unresolved external symbol "public: class boost::reg_expression<char,class boost::regex_traits<char>,class std::allocator<char> > & __stdcall boost::reg_expression<char,class boost::regex_traits<char>,class std::allocator<char> >::operator=(class boost::reg_expression<char,class boost::regex_traits<char>,class std::allocator<char> > const &)" (??4?$reg_expression@DV?$regex_traits@D@boost@@V?$allocator@D@std@@@boost@@$$FQAGAAV01@ABV01@@Z)

The debug build works fine because config.hpp defines BOOST_REGEX_CALL to _cdecl. It's the release configuration that has the trouble with __fastcall being changed to __stdcall.

How do I get around this (without getting rid of /clr or using a debug build)?

thanks