diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-12-30 12:44:58 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-12-30 12:44:58 +0000 |
commit | 2131a71c0525c556b73441dc905e3956e8e54f70 (patch) | |
tree | 24528f56b798a8a14a40fa8822a805e821f37687 /llvm/docs/CommandGuide/llvm-readobj.rst | |
parent | a8d45de6ce8afbb529a24887ec7d8d66c3b9e04a (diff) | |
download | bcm5719-llvm-2131a71c0525c556b73441dc905e3956e8e54f70.tar.gz bcm5719-llvm-2131a71c0525c556b73441dc905e3956e8e54f70.zip |
Fix PR19460 - std::ios is convertible to int.
std::basic_ios has an operator bool(). In C++11 and later
it is explicit, and only allows contextual implicit conversions.
However explicit isn't available in C++03 which causes std::istream (et al)
to have an implicit conversion to int. This can easily cause ambiguities
when calling operator<< and operator>>.
This patch uses a "bool-like" type in C++03 to work around this. The
"bool-like" type is an arbitrary pointer to member function type. It
will not convert to either int or void*, but will convert to bool.
llvm-svn: 290750
Diffstat (limited to 'llvm/docs/CommandGuide/llvm-readobj.rst')
0 files changed, 0 insertions, 0 deletions