greg_facet max() macro warning
I have a fresh install of the 1.32 draft release tarball compiled with the intel-win32 environment (I have Intel's C++ version 8.1 installed). I started getting the following warning when I uprgaded the draft tarballs (I'm using intel's 8.1 compiler in Visual Studio .NET): C:\Projects\base\boost\boost/date_time/gregorian/greg_facet.hpp(293): warning #54: too few arguments in macro invocation greg_month::max(), s); I seem to be getting them with both greg_month::max() and greg_weekday::max() I noticed that there appeared to be some kind of guards in constrained_value.hpp (BOOST_PREVENT_MACRO_SUBSTITUTION) that were added in 1.32 compared to my 1.31 install. Any advice on what I could be doing wrong? Cheers, tim
Hello Timothy, Tuesday, November 16, 2004, 10:13:42 PM, you wrote: Timothy> I have a fresh install of the 1.32 draft release tarball compiled with Timothy> the intel-win32 environment (I have Intel's C++ version 8.1 installed). Timothy> I started getting the following warning when I uprgaded the draft Timothy> tarballs (I'm using intel's 8.1 compiler in Visual Studio .NET): Timothy> C:\Projects\base\boost\boost/date_time/gregorian/greg_facet.hpp(293): Timothy> warning #54: too few arguments in macro invocation Timothy> greg_month::max(), s); Timothy> Any advice on what I could be doing wrong? Try to add #undef max #undef min before inclusion of date_time headers. This looks ugly, but should help for now. -- Best regards, Vladimir mailto:vkrasovsky@yandex.ru
VK> Hello Timothy, VK> VK> Tuesday, November 16, 2004, 10:13:42 PM, you wrote: VK> Timothy>> I have a fresh install of the 1.32 draft release tarball Timothy>> compiled with the intel-win32 environment (I have Intel's C++ Timothy>> version 8.1 installed). I started getting the following Timothy>> warning when I uprgaded the draft tarballs (I'm using intel's Timothy>> 8.1 compiler in Visual Studio .NET): Timothy>> Timothy>> C:\Projects\base\boost\boost/date_time/gregorian/greg_facet.hp Timothy>> p(293): Timothy>> warning #54: too few arguments in macro invocation Timothy>> greg_month::max(), s); Timothy>> Any advice on what I could be doing wrong? Timothy>> VK> Try to add VK> VK> #undef max VK> #undef min VK> before inclusion of date_time headers. VK> This looks ugly, but should help for now. Define NOMINMAX in project's settings would be less ugly. -- Vyacheslav E. Andrejev System Architect, Excelsior, LLC
Vyacheslav E. Andrejev wrote:
VK> Try to add VK> VK> #undef max VK> #undef min VK> before inclusion of date_time headers. VK> This looks ugly, but should help for now.
Define NOMINMAX in project's settings would be less ugly.
Both of these suggestions did the trick. I ended up using a #define NOMINMAX before the include.
participants (3)
-
Timothy Ritchey
-
Vladimir Krasovsky
-
Vyacheslav E. Andrejev