Closed sjoubert closed 6 years ago
Weird. Those classes inherit from variant_base
, which should be enough for ADL, not sure why std::visit
is preferred. VS2017 in c++17 mode doesn't report errors though.
According to https://stackoverflow.com/questions/41754425/use-adl-swap-of-base-class#41754492 the conversion to the base class makes it a worse match than std::
which is a direct template instantiation.
But it's still weird that all compilers do not agree.
The visit implementation provided by bustache are not in the exact namespace as the parameters preventing ADL to correctly choose the bustache implementation in some cases. When std::visit from C++17 is also in scope it is preferred. Qualifying the visit calls to force the bustache implementation.