Skip to content

Regression: no match for 'operator!=' comparing json_pointer and const char */string_t #3654

Closed
@falbrechtskirchinger

Description

@falbrechtskirchinger

Description

Comparing a json_pointer and const char */const char[N]/json_pointer::string_t fails to compile.

v3.10.5 compiles.

Reproduction steps

See code example.

Expected vs. actual results

n/a

Minimal code example

#include <https://raw.githubusercontent.com/nlohmann/json/develop/single_include/nlohmann/json.hpp>
using nlohmann::json;

#include <iostream>

int main() {
    std::cout << std::boolalpha
              << (json::json_pointer{"/foo"} != "")
              << std::endl;
}

Error messages

No response

Compiler and operating system

any

Library version

develop (3.11.0, 3.11.1)

Validation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions