Skip to content

is_integer and is_float tests #90

Description

@ropuls

Hi Niels,

excellent library, thanks!

would it be possible to add two more members, namely:

    inline bool is_float() const noexcept {
        return (m_type == value_t::number_float);
    }

    inline bool is_integer() const noexcept {
        return (m_type == value_t::number_integer);
    }

that would be extremly helpful when it comes to serializing json i.e. via msgpack or saving a json into mysql.

Thanks and Cheers,
Roman

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions