+2015-08-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Improve port of stdalign to C++11
+ Problem reported by Sundaram in:
+ http://lists.gnu.org/archive/html/bug-gnulib/2015-08/msg00003.html
+ * lib/stdalign.in.h (alignof, alignas): Don't define if C++11 or newer.
+ (__alignas_is_defined): Define if C++11 or newer.
+
2015-08-01 Assaf Gordon <assafgordon@gmail.com> (tiny change)
pmccabe2html: fix gawk regex escaping
# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b)
# endif
#endif
-#define alignof _Alignof
+#if ! (defined __cplusplus && 201103 <= __cplusplus)
+# define alignof _Alignof
+#endif
#define __alignof_is_defined 1
/* alignas (A), also known as _Alignas (A), aligns a variable or type
# define _Alignas(a) __declspec (align (a))
# endif
#endif
-#if defined _Alignas || (defined __STDC_VERSION && 201112 <= __STDC_VERSION__)
+#if ((defined _Alignas && ! (defined __cplusplus && 201103 <= __cplusplus)) \
+ || (defined __STDC_VERSION && 201112 <= __STDC_VERSION__))
# define alignas _Alignas
+#endif
+#if defined alignas || (defined __cplusplus && 201103 <= __cplusplus)
# define __alignas_is_defined 1
#endif