View Issue Details

IDProjectCategoryView StatusLast Update
0001535FreeCADBugpublic2014-05-08 15:58
Reportermdinger Assigned Towmayer  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
OSwindows 
Product Versiontrunk 
Summary0001535: Remove conflict between min/max macros and std::min/max
Descriptionwindows.h defines a macro for min and max. This conflicts with std::min and std::max. The conflict is seen here where Qt Creator points out that this line is using a macro (when it shouldn't be).

https://github.com/FreeCAD/FreeCAD_sf_master/blob/master/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp#L848

Solution here:
http://stackoverflow.com/questions/5004858/stdmin-gives-error

Doesn't seem to give errors but Qt Creator notes it is an error.

Fix here:
https://github.com/mdinger/FreeCAD_sf_master/compare/min_max_macro_conflict

I'm building but I'll probably request merge if no problems.
TagsNo tags attached.
FreeCAD Information

Activities

wmayer

2014-05-07 20:07

administrator   ~0004636

Do you get a build error or what is the actual problem?

mdinger

2014-05-07 20:31

reporter   ~0004637

No, not a build error but Qt Creator's syntax highlighting marks it as red.

Go here:
1. Tools->C++->Inspect C++ Code Model to go to C++ Code Model Inspector
2. Snapshots and Documents tab -> Select `Sketcher\Gui\CommandCreateGeo.cpp`
3. Click `Diagnostic Messages` tab at the bottom

Among the list of warnings is an error. My fix is to fix this error.

mdinger

2014-05-07 20:44

reporter   ~0004638

Granted, I'm not actually sure if this is a big problem but it does seem ambiguous to me once Qt Creator pointed it out. I'm not sure why there isn't a build error since the stackoverflow link is showing one for him.

mdinger

2014-05-07 21:16

reporter   ~0004639

Builds and runs for both Qt Creator and VS for me. I should think it'd be good to merge if you think it's worth pulling in.

Related Changesets

FreeCAD: master 6d17bbb7

2014-05-08 17:30:23

wmayer

Details Diff
+ fixes 0001535: Remove conflict between min/max macros and std::min/max Affected Issues
0001535
mod - src/Mod/Sketcher/Gui/PreCompiled.h Diff File

Issue History

Date Modified Username Field Change
2014-05-07 18:46 mdinger New Issue
2014-05-07 20:07 wmayer Note Added: 0004636
2014-05-07 20:31 mdinger Note Added: 0004637
2014-05-07 20:44 mdinger Note Added: 0004638
2014-05-07 21:16 mdinger Note Added: 0004639
2014-05-08 15:58 wmayer Changeset attached => FreeCAD Master master 6d17bbb7
2014-05-08 15:58 wmayer Assigned To => wmayer
2014-05-08 15:58 wmayer Status new => closed
2014-05-08 15:58 wmayer Resolution open => fixed