Opened 10 years ago
Closed 10 years ago
#7752 closed Support Requests (fixed)
algorithm minmax_element triggers warning with Clang
Reported by: | Paul A. Bristow | Owned by: | Marshall Clow |
---|---|---|---|
Milestone: | To Be Determined | Component: | algorithm |
Version: | Boost Development Trunk | Severity: | Optimization |
Keywords: | minmax_element warning clang | Cc: |
Description
algorithm minmax_element triggers warning with Clang 3.1
if (comp(first, min_result)) min_result = first, potential_min_result = last;
is flagged as having Cish comma abuse ;-)
Unless I'm missing something subtle, this can easily be avoided with the more C++ish?
if (comp(first, min_result)) { min_result = first; potential_min_result = last; }
path attached.
(This does not show when compiling tests, but does show in user code. There are many duplicated warnings from Boost.Test that make it difficult to find other possibly helpful warnings. And hex_test1 aborted...).
Attachments (1)
Change History (3)
by , 10 years ago
Attachment: | algorithm_minmax_element added |
---|
comment:2 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Path to suppress warning