Opened 11 years ago
Closed 6 years ago
#5875 closed Bugs (fixed)
local variable in phoenix let discards value
Reported by: | Owned by: | Thomas Heller | |
---|---|---|---|
Milestone: | To Be Determined | Component: | phoenix |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | phoenix local let | Cc: |
Description
In the following test case, the size of the vector is zero, while it should be three as that's what the vector is constructed with.
#include <boost/phoenix.hpp> #include <iostream> #include <vector> namespace phx = boost::phoenix; int main() { std::vector<int> v = phx::let(phx::local_names::_a = std::vector<int>(3)) [ phx::local_names::_a ] (); std::cerr << v.size() << std::endl; }
If the local is used in a non-trivial way in the let block, the vector will be properly initialized.
Change History (4)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
The test bug5875 is failing with crashes on a number of compilers, but not any which I have available. I would be grateful for any information on this. In the meantime I will leave it on develop to get more information but will not post the test to master.
I have not made any changes to phoenix for this at all.
comment:4 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Works fine now. http://melpon.org/wandbox/permlink/DkDO0A9fIgYUzZ41
This bug is now fixed by other changes. Test bug5875 installed as a check.