I've owned the BGL book for a few years and am, just now, having a
go at chapter 3. I've written...
#include
AMDG Louis Lavery wrote:
I've owned the BGL book for a few years and am, just now, having a go at chapter 3. I've written...
#include
int main() { return EXIT_SUCCESS; }
...and, when I compile it using vc9, get...
Compiling... main.cpp c:\boost_1_42_0\boost\unordered\unordered_set.hpp(402) : error C2220: warning treated as error - no 'object' file generated c:\boost_1_42_0\boost\unordered\unordered_set.hpp(500) : see reference to class template instantiation 'boost::unordered_set
' being compiled c:\boost_1_42_0\boost\unordered\unordered_set.hpp(402) : warning C4224: nonstandard extension used : formal parameter 'hash' was previously defined as a type
I don't think this is a legitimate warning. I've seen complaints about it before, but I've never been able to reproduce it. What compiler options are you using? (You can get them from the IDE at Project -> Properties -> Configuration Properties -> C/C++ -> Command Line) In Christ, Steven Watanabe
On 09/08/2010 18:29, Steven Watanabe wrote:
AMDG
Louis Lavery wrote:
I've owned the BGL book for a few years and am, just now, having a go at chapter 3. I've written...
#include
int main() { return EXIT_SUCCESS; }
...and, when I compile it using vc9, get...
Compiling... main.cpp c:\boost_1_42_0\boost\unordered\unordered_set.hpp(402) : error C2220: warning treated as error - no 'object' file generated c:\boost_1_42_0\boost\unordered\unordered_set.hpp(500) : see reference to class template instantiation 'boost::unordered_set
' being compiled c:\boost_1_42_0\boost\unordered\unordered_set.hpp(402) : warning C4224: nonstandard extension used : formal parameter 'hash' was previously defined as a type I don't think this is a legitimate warning. I've seen complaints about it before, but I've never been able to reproduce it. What compiler options are you using? (You can get them from the IDE at Project -> Properties -> Configuration Properties -> C/C++ -> Command Line)
/Od /I "C:\boost_1_42_0" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_VC80_UPGRADE=0x0710" /D "_MBCS" /Gm /EHsc /RTC1 /MTd /Za /Fo"Debug\\" /Fd"Debug\vc90.pdb" /W4 /WX /nologo /c /ZI /TP /errorReport:prompt Louis. BTW, I haven't seen my original post on boost-users, just this reply, and the same thing happened last time. Any idea what I'm doing wrong?
AMDG Louis Lavery wrote:
/Od /I "C:\boost_1_42_0" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_VC80_UPGRADE=0x0710" /D "_MBCS" /Gm /EHsc /RTC1 /MTd /Za /Fo"Debug\\" /Fd"Debug\vc90.pdb" /W4 /WX /nologo /c /ZI /TP /errorReport:prompt
It's /Za that causes the problem. You can either turn it off (Language -> Disable Language Extensions = No), or disable the specific warning (Advanced -> Disable Specific Warnings). The code in question conforms to the standard.
BTW, I haven't seen my original post on boost-users, just this reply, and the same thing happened last time. Any idea what I'm doing wrong?
You don't normally receive a copy of your own posts. In Christ, Steven Watanabe
participants (2)
-
Louis Lavery
-
Steven Watanabe