Author Topic: Unix V's Windows project file language standard different (c++11 V gnu++11)  (Read 4168 times)

Offline AndrewCot

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 654
I was just looking at the C::B project files and it seems the standard compiler standard is:
    Unix: "std=c++11"
    Windows x86 & x64: "std=gnu++11"

Does anyone have any ideas why there is a difference when the standard C::B compiler used to build itself is GCC or can post me a link to read as to why there is a difference? It would be nice to be consistent if possible.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1115
Looks like GNU extensions are not used at all (Unix compilation would fail). IMHO it is better to use c++11 in all projects.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5636
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
I don't see the gnu++ 11 extension feature in our C::B's code base. So, I agree with Miguel Gimenez.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.