In general our policy has been: 1) If it's easy to create a macro or workalike for windows, create one 2) If not, don't use the feature and update the style guide explaining why.
In this case, a basic keyword like constexpr is not like a missing type or helper function and I'd prefer not to use a macro to work around the problem. So probably, we just have to not use constexpr until Microsoft decides to actually implement the standard :(. On Fri, 2015-11-13 at 08:18 +0100, Uwe Klotz wrote: > Did a short research again: > > - VS 2013 does not support constexpr > - VS 2013 CTP does support constexpr partially (except on member functions) > > http://blogs.msdn.com/b/vcblog/archive/2013/11/18/announcing-the-visual-c-compiler-november-2013-ctp.aspx > > So officially it is not supported in VS 2013 :( I must have read about VS > 2013 CTP and assumed that simple constexpr like those that we need are > already supported. > > But I wonder why it compiles successfully on my Windows VM with a fresh > install (about half a year ago) of the official VS 2013 Community Edition?! > I will check it again and also the version information of VS 2013 on this > machine. > > What do you suggest, Owen? > > On 11/13/2015 03:59 AM, Owen Williams wrote: > > C:\mixxx\workspace\master\architecture\amd64\platform\windows\src > > \util/types.h(19) : error C2146: syntax error : missing ';' before > > identifier 'SAMPLE' > > C:\mixxx\workspace\master\architecture\amd64\platform\windows\src > > \util/types.h(19) : error C4430: missing type specifier - int assumed. > > Note: C++ does not support default-int > > C:\mixxx\workspace\master\architecture\amd64\platform\windows\src > > \util/types.h(20) : error C2146: syntax error : missing ';' before > > identifier 'SAMPLE' > > C:\mixxx\workspace\master\architecture\amd64\platform\windows\src > > \util/types.h(20) : error C4430: missing type specifier - int assumed. > > Note: C++ does not support default-int > > C:\mixxx\workspace\master\architecture\amd64\platform\windows\src > > \util/types.h(20) : error C2086: 'int constexpr' : redefinition > > C:\mixxx\workspace\master\architecture\amd64\platform\windows > > \src\util/types.h(19) : see declaration of 'constexpr' > > C:\mixxx\workspace\master\architecture\amd64\platform\windows\src > > \util/types.h(21) : error C2146: syntax error : missing ';' before > > identifier 'SAMPLE' > > > > http://builds.mixxx.org:8081/jenkins/job/master/architecture=amd64,platform=windows/396/console > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Get Mixxx, the #1 Free MP3 DJ Mixing software Today > > http://mixxx.org > > > > > > Mixxx-devel mailing list > > Mixxx-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/mixxx-devel > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Get Mixxx, the #1 Free MP3 DJ Mixing software Today > http://mixxx.org > > > Mixxx-devel mailing list > Mixxx-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mixxx-devel > > ------------------------------------------------------------------------------ _______________________________________________ Get Mixxx, the #1 Free MP3 DJ Mixing software Today http://mixxx.org Mixxx-devel mailing list Mixxx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mixxx-devel