Opened 13 years ago
Closed 12 years ago
#3206 closed Bugs (fixed)
compiler warnings in VC9
| Reported by: | Owned by: | Hailin Jin | |
|---|---|---|---|
| Milestone: | Boost 1.40.0 | Component: | gil USE GITHUB |
| Version: | Boost 1.39.0 | Severity: | Problem |
| Keywords: | Cc: | mateusz@… |
Description
VC9 at warning level 4 produces the following simple to fix compiler warnings:
line 528 of channel.hpp: Casting the result of the returned expression to the function's return type will silence warnings about conversion to a smaller type.
line 451 of algorithm.hpp: Changing this line to read as follows will silence unused local variable warnings:
void destruct_range_impl(It /*first*/, It /*last*/, mpl::false_) {}
line 586 of algorithm.hpp: Changing this line to read as follows will silence unused local variable warnings:
void default_construct_range_impl(It /*first*/, It /*last*/, mpl::false_) {}
Change History (4)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
| Cc: | added |
|---|
comment:3 by , 13 years ago
I think it's preferred to solve this kind of issues using [source:trunk/boost/concept_check.hpp@48821#L45 boost::ignore_unused_variable_warning] sink:
#include <boost/concept_check.hpp>
void destruct_range_impl(It first, It last, mpl::false_)
{
boost::ignore_unused_variable_warning(first);
boost::ignore_unused_variable_warning(last);
}
It's also more self-documenting about explicit author's intentions.
comment:4 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
The code changes have a done a while ago. Closing this ticket.

The last two were fixed in Revision 54727