Merge pull request #4366 from douzzer/cpp-anon-inline-unions

C++ HAVE_ANONYMOUS_INLINE_AGGREGATES sensing
This commit is contained in:
David Garske
2021-09-02 09:14:31 -07:00
committed by GitHub

View File

@@ -96,11 +96,13 @@ decouple library dependencies with standard string, memory and so on.
#endif #endif
#ifndef HAVE_ANONYMOUS_INLINE_AGGREGATES #ifndef HAVE_ANONYMOUS_INLINE_AGGREGATES
/* if __STDC__, pivot on the version, otherwise guess it's allowed, /* if a version is available, pivot on the version, otherwise guess it's
* subject to override. * allowed, subject to override.
*/ */
#if !defined(__STDC__) \ #if !defined(__STDC__) \
|| (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201101L)) || (!defined(__STDC_VERSION__) && !defined(__cplusplus)) \
|| (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201101L)) \
|| (defined(__cplusplus) && (__cplusplus >= 201103L))
#define HAVE_ANONYMOUS_INLINE_AGGREGATES 1 #define HAVE_ANONYMOUS_INLINE_AGGREGATES 1
#else #else
#define HAVE_ANONYMOUS_INLINE_AGGREGATES 0 #define HAVE_ANONYMOUS_INLINE_AGGREGATES 0