-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Precedence of to_json and builtin harmful #1617
Copy link
Copy link
Closed
Labels
kind: bugstate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updatedthe issue has not been updated in a while and will be closed automatically soon unless it is updated
Description
Activity
Metadata
Metadata
Assignees
Labels
kind: bugstate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updatedthe issue has not been updated in a while and will be closed automatically soon unless it is updated
For a class that supports user-defined conversion to a const char* (compatible to string_type of nlohmann::json) and a to_json specialization, the expectation would be that the to_json function takes precedence.
Executing (3), I would expect that (2) is selected, but (1) takes precedence.