mirror of
https://github.com/recp/cglm.git
synced 2025-10-04 17:09:40 +00:00
Merge pull request #309 from recp/anonymous-structs-check
Add Enhanced Support for Anonymous Structs
This commit is contained in:
@@ -25,10 +25,17 @@
|
|||||||
* only #define governing the use of anonymous structs, so for backward
|
* only #define governing the use of anonymous structs, so for backward
|
||||||
* compatibility, we still honor that choice and disable them. */
|
* compatibility, we still honor that choice and disable them. */
|
||||||
# define CGLM_USE_ANONYMOUS_STRUCT 0
|
# define CGLM_USE_ANONYMOUS_STRUCT 0
|
||||||
# elif __STDC_VERSION__ >= 20112L || defined(_MSVC_VER)
|
# elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
|
||||||
|
(defined(__cplusplus) && __cplusplus >= 201103L)
|
||||||
/* We're compiling for C11 or this is the MSVC compiler. In either
|
/* We're compiling for C11 or this is the MSVC compiler. In either
|
||||||
* case, anonymous structs are available, so use them. */
|
* case, anonymous structs are available, so use them. */
|
||||||
# define CGLM_USE_ANONYMOUS_STRUCT 1
|
# define CGLM_USE_ANONYMOUS_STRUCT 1
|
||||||
|
# elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
|
||||||
|
/* GCC 4.6 and onwards support anonymous structs as an extension */
|
||||||
|
# define CGLM_USE_ANONYMOUS_STRUCT 1
|
||||||
|
# elif defined(__clang__) && __clang_major__ >= 3
|
||||||
|
/* Clang 3.0 and onwards support anonymous structs as an extension */
|
||||||
|
# define CGLM_USE_ANONYMOUS_STRUCT 1
|
||||||
# elif defined(_MSC_VER) && (_MSC_VER >= 1900) /* Visual Studio 2015 */
|
# elif defined(_MSC_VER) && (_MSC_VER >= 1900) /* Visual Studio 2015 */
|
||||||
/* We can support anonymous structs
|
/* We can support anonymous structs
|
||||||
* since Visual Studio 2015 or 2017 (1910) maybe? */
|
* since Visual Studio 2015 or 2017 (1910) maybe? */
|
||||||
|
Reference in New Issue
Block a user