mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
c++: style: follow the Bison m4 quoting pattern
* data/skeletons/variant.hh: here.
This commit is contained in:
@@ -133,10 +133,10 @@ m4_define([b4_value_type_declare],
|
|||||||
template <typename T, typename... U>
|
template <typename T, typename... U>
|
||||||
T&
|
T&
|
||||||
emplace (U&&... u)
|
emplace (U&&... u)
|
||||||
{]b4_parse_assert_if([
|
{]b4_parse_assert_if([[
|
||||||
YY_ASSERT (!yytypeid_);
|
YY_ASSERT (!yytypeid_);
|
||||||
YY_ASSERT (sizeof (T) <= size);
|
YY_ASSERT (sizeof (T) <= size);
|
||||||
yytypeid_ = & typeid (T);])[
|
yytypeid_ = & typeid (T);]])[
|
||||||
return *new (yyas_<T> ()) T (std::forward <U>(u)...);
|
return *new (yyas_<T> ()) T (std::forward <U>(u)...);
|
||||||
}
|
}
|
||||||
# else
|
# else
|
||||||
@@ -144,10 +144,10 @@ m4_define([b4_value_type_declare],
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
T&
|
T&
|
||||||
emplace ()
|
emplace ()
|
||||||
{]b4_parse_assert_if([
|
{]b4_parse_assert_if([[
|
||||||
YY_ASSERT (!yytypeid_);
|
YY_ASSERT (!yytypeid_);
|
||||||
YY_ASSERT (sizeof (T) <= size);
|
YY_ASSERT (sizeof (T) <= size);
|
||||||
yytypeid_ = & typeid (T);])[
|
yytypeid_ = & typeid (T);]])[
|
||||||
return *new (yyas_<T> ()) T ();
|
return *new (yyas_<T> ()) T ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,10 +155,10 @@ m4_define([b4_value_type_declare],
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
T&
|
T&
|
||||||
emplace (const T& t)
|
emplace (const T& t)
|
||||||
{]b4_parse_assert_if([
|
{]b4_parse_assert_if([[
|
||||||
YY_ASSERT (!yytypeid_);
|
YY_ASSERT (!yytypeid_);
|
||||||
YY_ASSERT (sizeof (T) <= size);
|
YY_ASSERT (sizeof (T) <= size);
|
||||||
yytypeid_ = & typeid (T);])[
|
yytypeid_ = & typeid (T);]])[
|
||||||
return *new (yyas_<T> ()) T (t);
|
return *new (yyas_<T> ()) T (t);
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
@@ -185,10 +185,10 @@ m4_define([b4_value_type_declare],
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
T&
|
T&
|
||||||
as () YY_NOEXCEPT
|
as () YY_NOEXCEPT
|
||||||
{]b4_parse_assert_if([
|
{]b4_parse_assert_if([[
|
||||||
YY_ASSERT (yytypeid_);
|
YY_ASSERT (yytypeid_);
|
||||||
YY_ASSERT (*yytypeid_ == typeid (T));
|
YY_ASSERT (*yytypeid_ == typeid (T));
|
||||||
YY_ASSERT (sizeof (T) <= size);])[
|
YY_ASSERT (sizeof (T) <= size);]])[
|
||||||
return *yyas_<T> ();
|
return *yyas_<T> ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,10 +196,10 @@ m4_define([b4_value_type_declare],
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
const T&
|
const T&
|
||||||
as () const YY_NOEXCEPT
|
as () const YY_NOEXCEPT
|
||||||
{]b4_parse_assert_if([
|
{]b4_parse_assert_if([[
|
||||||
YY_ASSERT (yytypeid_);
|
YY_ASSERT (yytypeid_);
|
||||||
YY_ASSERT (*yytypeid_ == typeid (T));
|
YY_ASSERT (*yytypeid_ == typeid (T));
|
||||||
YY_ASSERT (sizeof (T) <= size);])[
|
YY_ASSERT (sizeof (T) <= size);]])[
|
||||||
return *yyas_<T> ();
|
return *yyas_<T> ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -214,9 +214,9 @@ m4_define([b4_value_type_declare],
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
void
|
void
|
||||||
swap (self_type& that) YY_NOEXCEPT
|
swap (self_type& that) YY_NOEXCEPT
|
||||||
{]b4_parse_assert_if([
|
{]b4_parse_assert_if([[
|
||||||
YY_ASSERT (yytypeid_);
|
YY_ASSERT (yytypeid_);
|
||||||
YY_ASSERT (*yytypeid_ == *that.yytypeid_);])[
|
YY_ASSERT (*yytypeid_ == *that.yytypeid_);]])[
|
||||||
std::swap (as<T> (), that.as<T> ());
|
std::swap (as<T> (), that.as<T> ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user