[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/5] c++: style: use more regular m4 quoting patterns
From: |
Akim Demaille |
Subject: |
[PATCH 1/5] c++: style: use more regular m4 quoting patterns |
Date: |
Wed, 11 Nov 2020 16:39:47 +0100 |
* data/skeletons/variant.hh: here.
---
data/skeletons/variant.hh | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/data/skeletons/variant.hh b/data/skeletons/variant.hh
index c37bdd42..736a2677 100644
--- a/data/skeletons/variant.hh
+++ b/data/skeletons/variant.hh
@@ -133,10 +133,10 @@ m4_define([b4_value_type_declare],
template <typename T, typename... U>
T&
emplace (U&&... u)
- {]b4_parse_assert_if([
+ {]b4_parse_assert_if([[
YY_ASSERT (!yytypeid_);
YY_ASSERT (sizeof (T) <= size);
- yytypeid_ = & typeid (T);])[
+ yytypeid_ = & typeid (T);]])[
return *new (yyas_<T> ()) T (std::forward <U>(u)...);
}
# else
@@ -144,10 +144,10 @@ m4_define([b4_value_type_declare],
template <typename T>
T&
emplace ()
- {]b4_parse_assert_if([
+ {]b4_parse_assert_if([[
YY_ASSERT (!yytypeid_);
YY_ASSERT (sizeof (T) <= size);
- yytypeid_ = & typeid (T);])[
+ yytypeid_ = & typeid (T);]])[
return *new (yyas_<T> ()) T ();
}
@@ -155,10 +155,10 @@ m4_define([b4_value_type_declare],
template <typename T>
T&
emplace (const T& t)
- {]b4_parse_assert_if([
+ {]b4_parse_assert_if([[
YY_ASSERT (!yytypeid_);
YY_ASSERT (sizeof (T) <= size);
- yytypeid_ = & typeid (T);])[
+ yytypeid_ = & typeid (T);]])[
return *new (yyas_<T> ()) T (t);
}
# endif
@@ -185,10 +185,10 @@ m4_define([b4_value_type_declare],
template <typename T>
T&
as () YY_NOEXCEPT
- {]b4_parse_assert_if([
+ {]b4_parse_assert_if([[
YY_ASSERT (yytypeid_);
YY_ASSERT (*yytypeid_ == typeid (T));
- YY_ASSERT (sizeof (T) <= size);])[
+ YY_ASSERT (sizeof (T) <= size);]])[
return *yyas_<T> ();
}
@@ -196,10 +196,10 @@ m4_define([b4_value_type_declare],
template <typename T>
const T&
as () const YY_NOEXCEPT
- {]b4_parse_assert_if([
+ {]b4_parse_assert_if([[
YY_ASSERT (yytypeid_);
YY_ASSERT (*yytypeid_ == typeid (T));
- YY_ASSERT (sizeof (T) <= size);])[
+ YY_ASSERT (sizeof (T) <= size);]])[
return *yyas_<T> ();
}
@@ -214,9 +214,9 @@ m4_define([b4_value_type_declare],
template <typename T>
void
swap (self_type& that) YY_NOEXCEPT
- {]b4_parse_assert_if([
+ {]b4_parse_assert_if([[
YY_ASSERT (yytypeid_);
- YY_ASSERT (*yytypeid_ == *that.yytypeid_);])[
+ YY_ASSERT (*yytypeid_ == *that.yytypeid_);]])[
std::swap (as<T> (), that.as<T> ());
}
--
2.29.2
- [PATCH 0/5] maint: c++: fix several issues with assertions, Akim Demaille, 2020/11/11
- [PATCH 1/5] c++: style: use more regular m4 quoting patterns,
Akim Demaille <=
- [PATCH 0/5] maint: c++: fix several issues with assertions, Akim Demaille, 2020/11/11
- [PATCH 2/5] c++: don't use YY_ASSERT at all if parse.assert is disabled, Akim Demaille, 2020/11/11
- [PATCH 3/5] lalr1.cc: YY_ASSERT should use api.prefix, Akim Demaille, 2020/11/11
- [PATCH 4/5] c++: don't glue functions together, Akim Demaille, 2020/11/11
- [PATCH 5/5] c++: shorten the assertions that check whether tokens are correct, Akim Demaille, 2020/11/11