c++ - "#define bool bool" says QtCreator when I hover bool - I tracked that into boost::asio -
i noticed bool
highlighted in different color other types in qtcreator:
this occurs when including headers, tracked <boost/asio.hpp>
. qtcreator's code inspector doesn't seem able track definition manually. boost version use boost 1.59.
is there purpose that? don't mind it's rather strange define same thing, more bool
.
well, searched boost 1.59 code see if find either: #define bool bool
or #include <stdbool.h>
ended not finding them in these files might somewhere else.
is there purpose that? don't mind it's rather strange define same thing, more bool.
imagine code containing like:
#define bool int // next line change previous definition #define bool bool
then there is:
#ifndef bool #elif bool #endif // etc..
which ugly way of trying port c program (considering redefining keywords not allowed in c++).
this coming include of stdbool.h. contains exact content (atleast on clang). think either bug in ide/highlighter/parser or there file includes header/code.
if not getting warning @ these settings code not being used , parsing being bad:
- level 1: c4005 warning (vs)
- -wkeyword-macro (clang)
not sure gcc -wall doesn't seem pick on it.
Comments
Post a Comment