
The following code snippet: #include <boost/function.hpp> class TestClass { public: void doSomethingDefault(boost::function2<void, bool, bool> cb=boost::function2<void,bool,bool>()) {;} }; int main() { TestClass test; test.doSomethingDefault(); return 1; } Gives an internal compiler error on vc 7.1: cl /nologo /Od /Ob0 /Z7 /W1 /MDd /EHsc /GR /TP /Ic:\Software\boost\boost_1_33_1 /DWIN32 /D_WINDOWS /D_DEBUG /c test.cpp /Fotest.obj test.cpp test.cpp(6) : fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 2701) Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information scons: *** [test.obj] Error 2 scons: building terminated because of errors. (line 6 is the method declaration with the default value). If I remove the use of the default value, the code compiles with no errors. I know this code compiles and works correctly on gcc 4.0 and I believe I have used it with older versions of gcc. Is there something incorrect with my usage? If not, is this an known issue? I searched through the bug tracker and the mailing lists but did not see anything about this bug. Does anyone have any ideas on how to work around this bug? Thanks, Allen