Comments (5)
Hi @bearbattle,
Thanks for the report. Looks like the "isMessageBase()" function is referenced in several other places as well without proper include. The "develop" branch should contain the fix. If no other problems are discovered, the correction release will be out soon.
from comms.
Hi @arobenko ,
When compiling this with MSVC cl.exe
19.16.27048, it gave me this error:
warning C4003: not enough arguments for function-like macro invocation 'min'
The error would cause ~\comms\install\include\comms\options.h:76
with other errors.
A solution is adding #define NOMINMAX
macro to prevent 'dump' MSVC compiler from recognize std::numeric_limits<~>::min()
as the min(a, b)
macro.
Ref: numeric_limits::max() not recognized
As followed from this discussion, there are two ways around:
#define NOMINMAX
- it disables min(a, b) and max(a, b) macros, but std::min(a,b) and std::max(a, b) from are working fine#ifdef min
#undef min
#undef max
#endif
If it is placed in right place it works.
from comms.
Hi @bearbattle,
It is a bad practice for the library to impose compilation restrictions on the client code. It's the opposite that needs to apply, i.e. trying to adapt to the used compilation options. That's why I disable some warnings in some places and restore original state at the end of the "problematic" section. I cannot silently change the client code controlling defines in my headers. It may have nasty, unintended, difficult to debug consequences.
You've listed the solution yourself. If you don't use the Microsoft specific macros in you code, just use global "/D NOMINMAX" compilation option in your project. If you do use them, then you just do #define NOMINMAX
before any windows specific includes (like #include <windows.h>
) in the problematic file.
The bottom line, I'm not going to change anything in the library in this regard. Won't fix.
from comms.
By the way I just noticed that I did the include fix on the "master" branch by mistake, rather than on the develop. I'll do the "v5.0.2" correction release soon to keep the "master" branch pointing to the latest release.
from comms.
Original report is fixed in v5.0.2 release.
from comms.
Related Issues (2)
- FYI: vcpkg HOT 20
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from comms.