17 Sep
2020
17 Sep
'20
6:31 p.m.
Andrzej Krzemienski wrote:
2. tag_invoke() takes tag arguments by reference, does it have to?
In principle, pass by reference is idiomatic for tag_invoke tags because this allows tag_invoke overloads to be defined without including any header from the corresponding library. You can forward declare the tags. This does not apply here though, as you need to have the declaration of json::value visible in order to define the tag_invoke overload. So it's possible to pass the tags by value and nothing would be lost.