Skip to content

Warning for shadowed variables #3188

Closed

Description

@kernie

Hi,

wanted to report that I compiled a project that is based on nlohmann::json v3.10.4 and it used -Wshadow with the GNU g++ v7.5.
During compilation I see

json/single_include/nlohmann/json.hpp:18813:5: warning: declaration of 'count' shadows a member of 'nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType>' [-Wshadow]
     {
     ^
json/single_include/nlohmann/json.hpp:22078:15: note: shadowed declaration is here
     size_type count(KeyT&& key) const
               ^~~~~

Maybe worth looking into...
Thanks

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

Metadata

Metadata

Assignees

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ 换网址