fix: make the library & unit test compile on MSVC 2010

#1 Declined
  1. Gyula László

Just a quick and dirty hack that produces a warning in MSVC, but doesn't require any rewrite in foundation.

Update: Refactor all MSVC-specific code to platform.msvc.h

Update: Remove compiler warnings for c++ do { ... } while(0) loops in MAKE_DELETE

Comments (2)

  1. Gyula László author

    For compiling on VS 2012, defining _ALLOW_KEYWORD_MACROS is necessary.

    Because alignof is a C++11 keyword, VS2012 doesn't allow to override it with macros by default. Meanwhile (at least on my default CMake VS2012 projects) it doesn't seem to provide an implementation for alignof()

    Simply putting


    into types.h seems to solve this issue for me (including platform.mscv.h seems like overkill there, and this definition shouldn't bother other compilers).

    NOTE: Im writing this from memory, a bad patch I did for this a while ago (on a different clone).

    Will check out tomorrow on a fresh copy of foundation, and provide a patch if necessary.