mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Clarify documentation
This commit is contained in:
parent
2bfa3a7c97
commit
e48f902c28
@ -32,14 +32,14 @@ namespace dev
|
||||
* This one does not have a fallback and will fail at
|
||||
* compile-time if you do not specify all variants.
|
||||
*
|
||||
* Fallback with no return:
|
||||
* Fallback with no return (it will not fail if you do not specify all variants):
|
||||
* std::visit(GenericVisitor{
|
||||
* VisitorFallback<>{},
|
||||
* [](Class1& _c) { _c.f(); },
|
||||
* [](Class2& _c) { _c.g(); }
|
||||
* }, variant);
|
||||
*
|
||||
* Fallback with return type R:
|
||||
* Fallback with return type R (the fallback returns `R{}`:
|
||||
* std::visit(GenericVisitor{
|
||||
* VisitorFallback<R>{},
|
||||
* [](Class1& _c) { _c.f(); },
|
||||
|
Loading…
Reference in New Issue
Block a user