You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 30, 2025. It is now read-only.
I'm using Ubuntu 18.04.4 LTS (Bionic Beaver), clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final), cmake version 3.10.2.
I cloned, compiled, installed the project, and trying to use it in my own project.
But once I included the header "glog/logging.h", I got an compile error like:
_/usr/local/include/glog/logging.h:649:9: error: use of overloaded operator '<<' is ambiguous
(with operand types 'std::ostream' (aka 'basic_ostream<char>') and 'const nullptr_t')
(*os) << v;_
Did this because the use of the operator is really ambiguous or there's implicit incompatible with some cmake settings I made?
I found it is because that CHECK_NE() is not suitable to estimate a pointer to nullptr.
Try following code:
#include"glog/logging.h"
#include<iostream>intmain() {
int i = 0;
CHECK_NE(&i, nullptr);
return0;
}