Opened 11 years ago
Closed 11 years ago
#6693 closed Bugs (invalid)
tribool.hpp causes warnings under -Wshadow on gcc
| Reported by: | Owned by: | Marshall Clow | |
|---|---|---|---|
| Milestone: | Boost 1.50.0 | Component: | logic |
| Version: | Boost 1.49.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
boost::logic::tribool's constructor accepts an argument "value", and it also has a data member named "value". This causes warnings under -Wshadow on gcc. I have attached a patch to fix this problem.
Attachments (1)
Change History (5)
by , 11 years ago
| Attachment: | shadow.patch added |
|---|
comment:1 by , 11 years ago
| Component: | None → logic |
|---|---|
| Owner: | set to |
comment:2 by , 11 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
Here's what I see in that file (both on trunk and release):
* \throws nothrow
*/
tribool(bool initial_value) : value(initial_value? true_value : false_value) {}
It appears to me that this was fixed back in 2009.
------------------------------------------------------------------------ r53429 | vladimir_prus | 2009-05-29 23:36:18 -0700 (Fri, 29 May 2009) | 4 lines Fix gcc -Wshadow warnings in tribool.
Are you sure that you are using version 1.49?
comment:3 by , 11 years ago
Arg! sorry about that. We use 1.46.1 internally, where we locally patched this problem, and two similar ones in the random library. When setting this patch up, I saw that everything in random had been cleared up, but I managed to forget / mess up this comparison.
This can be closed / rejected.
comment:4 by , 11 years ago
| Resolution: | → invalid |
|---|---|
| Status: | assigned → closed |

Patch to tribool shadowing issue