implicit semantics not clear enough
- Lingua principale
- C++
- Stelle
- 509
- Fork
- 94
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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'?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.