boost::fusion::map or boost::fusion::map surprising behavior
- Dominant language
- C++
- Stars
- 50
- Forks
- 68
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
I found surprising behavior with `boost::fusion::map`.
Given the following set of types:
```cpp
struct Foo {};
struct Bar {};
using Child = boost::fusion::map>;
using Parent = boost::fusion::map>;
```
The following example fails to compile:
```cpp
auto example()
{
return Parent{
boost::fusion::make_pair(
boost::fusion::make_pair(42))};
}
```
This can be fixed by doing:
```cpp
auto example()
{
return Parent{
boost::fusion::pair(
boost::fusion::make_pair(42))};
}
```
While I do understand while the former fails and the latter doesn't. I do find this suprising behavior. Specially, considering the errors produced by the failing example.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the minimal examples in the issue and inspect the behavior of boost::fusion::map, boost::fusion::pair, and make_pair during compilation. The issue names no source files or tests; done would require an agreed resolution for the surprising construction behavior, with its expected behavior documented or verified by project tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100