Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to 'ne' is ambiguous -- with solution #395

Closed
Snuggan opened this issue Jul 14, 2020 · 2 comments
Closed

Call to 'ne' is ambiguous -- with solution #395

Snuggan opened this issue Jul 14, 2020 · 2 comments

Comments

@Snuggan
Copy link

Snuggan commented Jul 14, 2020

Description

I have implemented the functions eq, ne, etc. in my own project and there is a name clash:

[...]/doctest2.4/doctest.h:1287:37: error: call to 'ne' is ambiguous
    DOCTEST_BINARY_RELATIONAL_OP(1, ne)

Solution

Change lines 1286-1291 from

    DOCTEST_BINARY_RELATIONAL_OP(0, eq)
    DOCTEST_BINARY_RELATIONAL_OP(1, ne)
    DOCTEST_BINARY_RELATIONAL_OP(2, gt)
    DOCTEST_BINARY_RELATIONAL_OP(3, lt)
    DOCTEST_BINARY_RELATIONAL_OP(4, ge)
    DOCTEST_BINARY_RELATIONAL_OP(5, le)

to

    DOCTEST_BINARY_RELATIONAL_OP(0, doctest::detail::eq)
    DOCTEST_BINARY_RELATIONAL_OP(1, doctest::detail::ne)
    DOCTEST_BINARY_RELATIONAL_OP(2, doctest::detail::gt)
    DOCTEST_BINARY_RELATIONAL_OP(3, doctest::detail::lt)
    DOCTEST_BINARY_RELATIONAL_OP(4, doctest::detail::ge)
    DOCTEST_BINARY_RELATIONAL_OP(5, doctest::detail::le)
@Snuggan Snuggan changed the title Call to 'ne' is ambiguous Call to 'ne' is ambiguous -- with solution Jul 15, 2020
@onqtam
Copy link
Member

onqtam commented Sep 7, 2020

Sorry for the late reply! Thanks for reporting - just fixed it in the dev branch!

@Snuggan
Copy link
Author

Snuggan commented Sep 7, 2020

Great! Thanks for a great testing environment!

@onqtam onqtam closed this as completed in aa05975 Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants