Opened 8 years ago
Closed 6 years ago
#11226 closed Bugs (fixed)
let statements fail to compile for void return types
Reported by: | Owned by: | Thomas Heller | |
---|---|---|---|
Milestone: | To Be Determined | Component: | phoenix |
Version: | Boost 1.58.0 | Severity: | Problem |
Keywords: | Cc: |
Description
A let expression whose result is void will fail to compile, starting in 1.58. It appears to be related to commit b959ed0c33ef28ec978689a8b1235661fcde93fe and specifically the change from code of the form
return result-expression;
to
result_type r = result-expression; return r;
which will fail for result_type void, as assignments are not permitted.
A small test case that compiles in 1.57 but fails in 1.58 (gcc 4.8.2) is attached.
Attachments (1)
Change History (5)
by , 8 years ago
Attachment: | let_testcase.cpp added |
---|
comment:1 by , 8 years ago
commit f63e401ea5cac691dcb91a6edaf8f92dbcaa91bc has been merged to fix this issue
comment:2 by , 8 years ago
I think this might be related to other compilation issues that exist for some time when targetting Phoenix V3:
- http://stackoverflow.com/a/19631830/85371 (phoenix::try_) or
- http://stackoverflow.com/a/29452921/85371 (phoenix::if_)
comment:4 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Yes, it should be fixed in 1.59. https://github.com/boostorg/phoenix/commit/1a5348e5e46b348a816d30df30a724375c5a527e
Test case illustrating compile failure for void result type