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

Build of unit tests fails in clang with c++11 #1565

Closed
s-kenji opened this issue Apr 12, 2018 · 1 comment
Closed

Build of unit tests fails in clang with c++11 #1565

s-kenji opened this issue Apr 12, 2018 · 1 comment

Comments

@s-kenji
Copy link

s-kenji commented Apr 12, 2018

Hi,
I cannot run unit tests using gtest in clang with c++11.
The following error has occurred.

In file included from /Users/s-kenji/workspace/my_project/test/jsonparser.cc:5:
In file included from /Users/s-kenji/workspace/my_project/build/googletest-src/googlemock/include/gmock/gmock.h:58:
/Users/ksugimur/workspace/my_project/build/googletest-src/googlemock/include/gmock/gmock-actions.h:388:18: error: use of overloaded operator '==' is ambiguous (with operand types 'const internal::linked_ptr<ActionInterface<void
      (const basic_json<std::map, std::vector, basic_string<char>, bool, long long, unsigned long long, double, std::allocator, adl_serializer> &, bool *, int *)> >' and 'nullptr_t')
    return impl_ == nullptr && fun_ == nullptr;
           ~~~~~ ^  ~~~~~~~

The cause of this error is that overloaded operator '==' is not defined for comparison of linked_ptr and nullptr, So I would like to contribute a patch to define the comparison of linked_ptr and nullptr.

Version:
Clang: Apple LLVM version 9.1.0 (clang-902.0.39.1)
OS: macOS HighSierra 10.13.2
commit: 531e294

@s-kenji s-kenji changed the title Build of unit tests fails in clang with c++11. Build of unit tests fails in clang with c++11 Apr 12, 2018
@gennadiycivil
Copy link
Contributor

gennadiycivil commented Oct 29, 2018

Looking through comments looks like it is no longer an issue. Please let me know otherwise

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