[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/5] c++: inline the implementation of syntax_error in its defini
From: |
Akim Demaille |
Subject: |
[PATCH 1/5] c++: inline the implementation of syntax_error in its definition |
Date: |
Mon, 31 Dec 2018 07:53:57 +0100 |
This way, it is easier to make sure its implementation is available in
glr.cc too, which is not the case currently.
* data/skeletons/c++.m4 (b4_public_types_define): Move the
implementation of syntax_error...
(b4_public_types_declare): here.
---
data/skeletons/c++.m4 | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/data/skeletons/c++.m4 b/data/skeletons/c++.m4
index bd2acfd8..0ef5bb70 100644
--- a/data/skeletons/c++.m4
+++ b/data/skeletons/c++.m4
@@ -214,7 +214,11 @@ m4_define([b4_public_types_declare],
/// Syntax errors thrown from user actions.
struct syntax_error : std::runtime_error
{
- syntax_error (]b4_locations_if([const location_type& l, ])[const
std::string& m);]b4_locations_if([
+ syntax_error (]b4_locations_if([const location_type& l, ])[const
std::string& m)
+ : std::runtime_error (m)]b4_locations_if([
+ , location (l)])[
+ {}]b4_locations_if([
+
location_type location;])[
};
@@ -360,12 +364,7 @@ m4_define([b4_symbol_type_define],
# -----------------------------
# Provide the implementation needed by the public types.
m4_define([b4_public_types_define],
-[ b4_inline([$1])b4_parser_class_name[::syntax_error::syntax_error
(]b4_locations_if([const location_type& l, ])[const std::string& m)
- : std::runtime_error (m)]b4_locations_if([
- , location (l)])[
- {}
-
- // basic_symbol.
+[[ // basic_symbol.
template <typename Base>
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol ()
: value ()]b4_locations_if([
--
2.20.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH 1/5] c++: inline the implementation of syntax_error in its definition,
Akim Demaille <=