Skip to content

Clang compilation fails on Windows #87

@SeveriSuominen

Description

@SeveriSuominen
/build/_deps/libmorton-src/include\libmorton/morton3D.h:149:71: error: expected unqualified-id
C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\shared\minwindef.h:193:29: note: expanded from macro 'max'
  193 | #define max(a,b)            (((a) > (b)) ? (a) : (b))
      |                             ^

undef 'min' and 'max' macros after including 'intrin.h' header in 'morton_common.h', line 6, seems to fix this issue:

#if defined(_MSC_VER)
#include <intrin.h>

#undef min
#undef max

#endif

this issue does not occur when compiling with MSVC.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions