diff options
-rw-r--r-- | data/skeletons/variant.hh | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/data/skeletons/variant.hh b/data/skeletons/variant.hh index 8b9d4802..be4a3ce7 100644 --- a/data/skeletons/variant.hh +++ b/data/skeletons/variant.hh @@ -72,9 +72,9 @@ m4_map([ b4_symbol_tag_comment], [$@])dnl # The needed includes for variants support. m4_define([b4_variant_includes], [b4_parse_assert_if([[#include <typeinfo>]])[ -#ifndef YYASSERT +#ifndef YY_ASSERT # include <cassert> -# define YYASSERT assert +# define YY_ASSERT assert #endif ]]) @@ -111,14 +111,14 @@ m4_define([b4_value_type_declare], semantic_type (YY_RVREF (T) t)]b4_parse_assert_if([ : yytypeid_ (&typeid (T))])[ { - YYASSERT (sizeof (T) <= size); + YY_ASSERT (sizeof (T) <= size); new (yyas_<T> ()) T (YY_MOVE (t)); } /// Destruction, allowed only if empty. ~semantic_type () YY_NOEXCEPT {]b4_parse_assert_if([ - YYASSERT (!yytypeid_); + YY_ASSERT (!yytypeid_); ])[} # if 201103L <= YY_CPLUSPLUS @@ -127,8 +127,8 @@ m4_define([b4_value_type_declare], T& emplace (U&&... u) {]b4_parse_assert_if([ - YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= size); + YY_ASSERT (!yytypeid_); + YY_ASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T);])[ return *new (yyas_<T> ()) T (std::forward <U>(u)...); } @@ -138,8 +138,8 @@ m4_define([b4_value_type_declare], T& emplace () {]b4_parse_assert_if([ - YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= size); + YY_ASSERT (!yytypeid_); + YY_ASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T);])[ return *new (yyas_<T> ()) T (); } @@ -149,8 +149,8 @@ m4_define([b4_value_type_declare], T& emplace (const T& t) {]b4_parse_assert_if([ - YYASSERT (!yytypeid_); - YYASSERT (sizeof (T) <= size); + YY_ASSERT (!yytypeid_); + YY_ASSERT (sizeof (T) <= size); yytypeid_ = & typeid (T);])[ return *new (yyas_<T> ()) T (t); } @@ -179,9 +179,9 @@ m4_define([b4_value_type_declare], T& as () YY_NOEXCEPT {]b4_parse_assert_if([ - YYASSERT (yytypeid_); - YYASSERT (*yytypeid_ == typeid (T)); - YYASSERT (sizeof (T) <= size);])[ + YY_ASSERT (yytypeid_); + YY_ASSERT (*yytypeid_ == typeid (T)); + YY_ASSERT (sizeof (T) <= size);])[ return *yyas_<T> (); } @@ -190,9 +190,9 @@ m4_define([b4_value_type_declare], const T& as () const YY_NOEXCEPT {]b4_parse_assert_if([ - YYASSERT (yytypeid_); - YYASSERT (*yytypeid_ == typeid (T)); - YYASSERT (sizeof (T) <= size);])[ + YY_ASSERT (yytypeid_); + YY_ASSERT (*yytypeid_ == typeid (T)); + YY_ASSERT (sizeof (T) <= size);])[ return *yyas_<T> (); } @@ -208,8 +208,8 @@ m4_define([b4_value_type_declare], void swap (self_type& that) YY_NOEXCEPT {]b4_parse_assert_if([ - YYASSERT (yytypeid_); - YYASSERT (*yytypeid_ == *that.yytypeid_);])[ + YY_ASSERT (yytypeid_); + YY_ASSERT (*yytypeid_ == *that.yytypeid_);])[ std::swap (as<T> (), that.as<T> ()); } @@ -401,7 +401,7 @@ m4_define([_b4_token_constructor_define], b4_symbol_if([$1], [has_type], [std::move (v)]), b4_locations_if([std::move (l)]))[) { - YYASSERT (]m4_join([ || ], m4_map_sep([_b4_type_clause], [, ], [$@]))[); + YY_ASSERT (]m4_join([ || ], m4_map_sep([_b4_type_clause], [, ], [$@]))[); } #else symbol_type (]b4_join( @@ -413,7 +413,7 @@ m4_define([_b4_token_constructor_define], b4_symbol_if([$1], [has_type], [v]), b4_locations_if([l]))[) { - YYASSERT (]m4_join([ || ], m4_map_sep([_b4_type_clause], [, ], [$@]))[); + YY_ASSERT (]m4_join([ || ], m4_map_sep([_b4_type_clause], [, ], [$@]))[); } #endif ]])]) |