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:

image description

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:

not sure gcc -wall doesn't seem pick on it.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -