Is it possible to join two functors to one?
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
Description
I'm finding something like this:
```
struct functor_1 {
void operator() (std::string arg1, std::string arg2)
{
std::cout << arg1 << arg2 " from first functor" << std::endl
}
};
struct functor_2 {
void operator() (std::string arg1, std::string arg2)
{
std::cout << arg1 << arg2 " from second functor" << std::endl
}
};
join(functor_1(), functor_2())("Hello, ", "World!"); // will print two lines:
// "Hello, World! from first functor"
// .. and
// "Hello, World! from second functor"
```
Is it possible to do using boost.hana?
Contributor guide
Research direction
The issue names no source file, test, or entry point and is currently a usage question. Start by checking Boost.Hana's callable-composition documentation and examples; a useful resolution would be a confirmed approach or a clearly scoped implementation request with tests, but the payload does not define either.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100