Return of bug#6554 (Compiler error dereferencing multi_array value via an iterator)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
Research direction
Start by reproducing the failing expression from the issue with boost/multi_array.hpp in the linked Godbolt example, then compare it with the dereference form that compiles. Inspect the multi_array iterator path involved in a.begin()->begin()->value. Done means the failing expression compiles and assigns the value as shown, with regression coverage for this example.
Written by the indexing model from the issue text.
Description
The bug described in https://svn.boost.org/trac10/ticket/6554 seems to return. I tried the example from this bug in godbolt: https://godbolt.org/z/4vMf8oo4q and it fails to compile. The code I used is:
#include <boost/multi_array.hpp>
struct data
{
int value;
};
typedef boost::multi_array<data, 2> array_type;
int main() {
array_type a(boost::extents[4][5]);
// ERROR: Cannot compile this line
a.begin()->begin()->value = 7;
// Compiles successfully
(*a.begin()->begin()).value = 5;
return 0;
}
All versions of boost on godbolt (1.64 to 1.79) seem to be affected.
- Dominant language
- C++
- Stars
- 32
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/multi_array
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
boostorg/multi_array#38 · 2 comments · 1 reaction ·
-
boostorg/multi_array#35 · 2 comments · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
boostorg/multi_array#34 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
boostorg/multi_array#33 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
boostorg/multi_array#32 ·
All issues in boostorg/multi_array
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·