Opened 12 years ago

Closed 12 years ago

#4353 closed Bugs (fixed)

warning needs suppressed --> warning: "_MSC_VER" is not defined

Reported by: Willem.deconinck@… 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)

D51645.patch (383 bytes ) - added by mdorey@… 12 years ago.
fix in the style of the earlier test in this file

Download all attachments as: .zip

Change History (4)

comment:1 by Steven Watanabe, 12 years ago

Component: Nonerange
Owner: set to Neil Groves

by mdorey@…, 12 years ago

Attachment: D51645.patch added

fix in the style of the earlier test in this file

comment:2 by mdorey@…, 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 Neil Groves, 12 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.