lucabaldini / xpedaq

Data acquisition software for the X-ray polarimetry explorers
GNU General Public License v2.0
0 stars 0 forks source link

Switch to C++11? #87

Closed lucabaldini closed 8 years ago

lucabaldini commented 8 years ago

This was first suggested by Alberto who wanted to use the auto syntax for vector iteration.

I came across at least two other new C++11 functionalities that I'd like to use, namely scoped enums and default values for struct members.

Five years after the fact gcc has full support for C++11 and I'd propose to give it a try.

lucabaldini commented 8 years ago

Enabling C++11 in Qt is as easy as adding

QMAKE_CXXFLAGS += -std=c++11

in Qt 4 and

CONFIG += c++11

in Qt 5.

lucabaldini commented 8 years ago

(See also issue #62.)

albertomanfreda commented 8 years ago

Needless to say, I wholeheartedly support this possibility.

lucabaldini commented 8 years ago

See also issue #95

lucabaldini commented 8 years ago

Edit,what it's really needed is apparently something along the lines of

equals(QT_MAJOR_VERSION, 4) {
  QMAKE_CXXFLAGS += -std=c++11
  QMAKE_CXXFLAGS_RELEASE -= -std=gnu++98
  }

equals(QT_MAJOR_VERSION, 5) {
  CONFIG += c++11
  }
lucabaldini commented 8 years ago

Everything switched to C++ 11. Closing this one.