On 07/05/2011 00:08, Cory Nelson wrote:
On Thu, May 5, 2011 at 8:03 PM, Eric Niebler
wrote: On 5/5/2011 8:59 PM, Louis Lavery wrote:
I'm trying to get started with boost xpressive, but have problems with this simple attempt...
#pragma warning(disable:4180) // MSVC: qualifier applied to function type has no meaning; ignored #pragma warning(disable:4224) // MSVC: nonstandard extension used : formal parameter 'value' was previously defined as a type #pragma warning(disable:4996) // MSVC: 'std::transform' was declared deprecated
Do you really need these pragmas? 'std::transform' was declared deprecated? If you're really seeing this warning, something might be wrong with your setup.
The deprecated std::transform is likely due to VC++ pushing you to use their non-standard "safe" functions that perform bounds checking. You can disable that with a #define _SCL_SECURE_NO_WARNINGS before you include any headers. That doesn't account for the other errors, though.
Yes, I have now got VC++ to compile it with _SCL_SECURE_NO_WARNINGS on the command line to suppress the warnings, I don't want it in the code itself as I'm also compiling using gcc (4.4.1) (that doesn't seem to have any trouble with xpressive). The only thing that really bothers me is that I'm compiling under VC++ with language extensions enabled, I would prefer to have them turned off. BTW, I'm compiling with warnings at level 4. thanks, Louis.