-
Type: Improvement
-
Resolution: Done
-
Priority: Trivial - P5
-
None
-
Affects Version/s: None
-
Component/s: Internal Client
-
Environment:Windows 7, Visual C++ 2012 Update 3, mongo-cxx-driver-v2.4
-
Fully Compatible
In VC++, the "#error temp error" directive at line 75 in file "mongo/util/text.h" isn't well interpreted.
This lead to a confusing error C1004:
"src\mongo/util/text.h(75) : fatal error C1004: unexpected end-of-file found"
Using the directive "#error" in an header file could be the result of this weird behaviour. See the report: http://connect.microsoft.com/VisualStudio/feedback/details/757886/c1004-instead-of-c1189-when-error-is-in-a-header
What I suggest is to add a "#pragma warning" before the "#error", like:
"#pragma message (_FILE_": temp error")"