Opened 12 years ago
Closed 12 years ago
#4353 closed Bugs (fixed)
warning needs suppressed --> warning: "_MSC_VER" is not defined
Reported by: | Owned by: | Neil Groves | |
---|---|---|---|
Milestone: | Boost 1.43.0 | Component: | range |
Version: | Boost 1.43.0 | Severity: | Cosmetic |
Keywords: | Cc: |
Description
The warning situates here: boost/range.hpp:18:5: warning: "_MSC_VER" is not defined
Attachments (1)
Change History (4)
comment:1 by , 12 years ago
Component: | None → range |
---|---|
Owner: | set to |
by , 12 years ago
Attachment: | D51645.patch added |
---|
comment:2 by , 12 years ago
It's perhaps stating the obvious, but nonetheless worth doing so for the benefit of search engines, that this warning occurs with gcc when passed the -Wundef flag. (This little-known and rarely-used flag is useful because it stops you from doing #if tests when the appropriate header file hasn't been included.) Much of boost is clean in the presence of this flag and I've had other similar patches accepted in the past. Another technique that's sometimes used to fix this sort of issue is BOOST_WORKAROUND, as demonstrated in eg https://svn.boost.org/trac/boost/ticket/1291. I didn't choose that approach because I'm less familiar with it and I was concerned for consistency with the existing defined(_MSC_VER) test higher up this file.
comment:3 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
fix in the style of the earlier test in this file