implicit semantics not clear enough
- Dominant language
- C++
- Stars
- 509
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
It is not clear to me from http://pfultz2.github.io/Fit/doc/html/implicit/index.html the semantics of implicit as the T is not part of the implicit parameters
```
assert(T(implicit()(xs...)) == F()(xs...));
```
IIUC, what you mean is that the the `T`conversion operator of `implicit()(xs...)` behaves like `F()(xs...))`
I had a `implicitly` function that wrapped a type `U` and provided an implicit conversion to any type (something similar to your `auto_cast`)
```
template
struct implicitly_wrapper
{
U x;
implicitly_wrapper(T x) : x(x) {}
template
operator T()
{
return T(x);
}
};
template
implicitly_wrapper> implicitly(U&& u)
{
return implicitly_wrapper>(std::forward(u));
}
```
Do you have other examples of use of 'implicit'?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.