Pull requests

#1 Declined
Repository
bitsquid
Branch
default

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

Author
  1. gyulalaszlo
Reviewers
Description

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

  • Learn about pull requests

Comments (2)

  1. gyulalaszlo 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

    #define _ALLOW_KEYWORD_MACROS
    

    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.