]> git.saurik.com Git - bison.git/blobdiff - data/variant.hh
parsers: rename YY_NULL as YY_NULLPTR to avoid conflicts with Flex
[bison.git] / data / variant.hh
index ac4f7a78507c49250d12dc789e0acf70ec61ff70..633c29abc4c0da229335b3072f9310397b7501e3 100644 (file)
@@ -95,7 +95,7 @@ m4_define([b4_variant_define],
 
     /// Empty construction.
     variant ()]b4_parse_assert_if([
-      : yytname_ (YY_NULL)])[
+      : yytname_ (YY_NULLPTR)])[
     {}
 
     /// Construct and fill.
@@ -178,8 +178,7 @@ m4_define([b4_variant_define],
     template <typename T>
     void
     move (self_type& other)
-    {]b4_parse_assert_if([
-      YYASSERT (!yytname_);])[
+    {
       build<T> ();
       swap<T> (other);
       other.destroy<T> ();
@@ -199,7 +198,7 @@ m4_define([b4_variant_define],
     destroy ()
     {
       as<T> ().~T ();]b4_parse_assert_if([
-      yytname_ = YY_NULL;])[
+      yytname_ = YY_NULLPTR;])[
     }
 
   private:
@@ -321,7 +320,6 @@ b4_join(b4_symbol_if([$1], [has_type],
     return symbol_type (b4_join([token::b4_symbol([$1], [id])],
                                 b4_symbol_if([$1], [has_type], [v]),
                                 b4_locations_if([l])));
-
   }
 
 ])])])