Registered Member
|
There are only several C++11 features freely available for Frameworks: https://community.kde.org/Frameworks/Po ... _C.2B.2B11
But according to paragraph above Frameworks Qt requirements current minimal Qt is Qt 5.7, which "requires C++11 support from the compiler, and has removed support from older compilers not providing adequate C++11 support." Shouldn't C++11 available features be widened for Frameworks? What about range-based for loop? Since Qt 5.7 use of Q_FOREACH is discouraged. So shouldn't for ( : ) used where it possible to? |
Registered Member
|
There is a semantic difference between for ( : ) and Q_FOREACH, so it cannot be blindly replaced.
|
Registered Member
|
Yes, I'm aware of their difference, though in most case it could be replaced but surely that must not be done blindly with sed.
I was not clear, I'm not about porting of existing code, but writing new one. What C++11 features are accepted for new code? Current Frameworks/Policies doesn't allow for ( : ), while Q_FOREACH is already discouraged. I believe Frameworks/Policies should be updated and range-based for allowed among with other C++11 features, but maybe I'm wrong. |
Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]