Visual C ++ 10 reduces the __FILE__ macro

The __FILE__ preprocessor __FILE__ in Visual C ++ 10 expands to the name of the source module, but in lower case, for example

 c:\path\to\my\file\somesource.cpp 

when the file name is actually

 SomeSource.cpp 

Can this behavior be changed?

+6
visual-studio-2008 visual-c ++ visual-studio-2010
source share
1 answer

As suggested by Hans Passant, I asked a question about Microsoft Connect and received the following answer:

Thank you for noticing this. This behavior has existed for some time, at least until VS 2008. Changing the default behavior could potentially be a change for other clients, so we would rather keep the current behavior. Since FOO.TXT is basically the same as foo.txt for the file system, hopefully using __FILE__ with any comparison can just include case insensitive for your application.

+6
source share

All Articles