[variant.visit] in C++17 doesn’t use variant_size_v
, but it does in the current working draft as a result of an editorial change. I don’t see any indication that LWG reviewed the change before it went in, but it has looked at this part of the standard several times since then and has yet to object to it, so I’m going to postulate that it is in fact required.
Meanwhile, LWG issue 3052, which has been referred to LEWG, would explicitly require std::variant
. When that issue is resolved – one way or the other – it should resolve this too.