https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95606
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- And probably one or both of the basic_json and json_ref constructors should be explicit, so that you can't implicitly convert them both to each other.