Skip to content

Question about type_error::create #3566

Discussion options

You must be logged in to vote

What exactly are you trying to do? Please provide more context.

You will notice that create has two arguments. All the documentation I see online shows only two arguments

Where are you seeing this? Creating exceptions is not documented at all, to my knowledge.

I thought I was using 3.10.5 but the documentation seems to say 3.10.2

template<typename BasicJsonContext, enable_if_t<is_basic_json_context<BasicJsonContext>::value, int> = 0>
    static type_error create(int id_, const std::string& what_arg, BasicJsonContext context)

Based on this code, you're not using 3.10.5 but develop. In 3.10.5 the third parameter is of type const BasicJsonType &.

Visual studio 2019 generates an error
er…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
3 replies
@jamesbloom-scheff
Comment options

@nlohmann
Comment options

@falbrechtskirchinger
Comment options

Answer selected by nlohmann
Comment options

You must be logged in to vote
3 replies
@gregmarr
Comment options

@falbrechtskirchinger
Comment options

@nlohmann
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants