/// Default constructor.
inline basic_symbol ();
-]b4_locations_if([
- /// Constructor.
- inline basic_symbol (const location_type& l);])[
/// Copy constructor.
inline basic_symbol (const basic_symbol& other);
const location_type& l])[);
~basic_symbol ();
- /// Assignment operator.
- inline basic_symbol& operator= (const basic_symbol& other);
/// Destructive move, \a s is emptied into this.
inline void move (basic_symbol& s);
/// The location.
location_type location;])[
+
+ private:
+ /// Assignment operator.
+ basic_symbol& operator= (const basic_symbol& other);
};
/// Type access provider for token (enum) based symbols.
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol ()
: value ()
{}
-]b4_locations_if([
- template <typename Base>
- ]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (const location_type& l)
- : value ()
- , location (l)
- {}])[
-
- template <typename Base>
- ]b4_parser_class_name[::basic_symbol<Base>&
- ]b4_parser_class_name[::basic_symbol<Base>::operator= (const basic_symbol&)
- {
- abort ();
- }
template <typename Base>
]b4_parser_class_name[::basic_symbol<Base>::basic_symbol (const basic_symbol& other)
[m4_pushdef([b4_parse_param], m4_defn([b4_parse_param_orig]))dnl
b4_percent_code_get([[requires]])[
-#include <cstdlib> // abort
#include <stdexcept>
#include <string>
#include <iostream>]b4_defines_if([
m4_define([b4_shared_declarations],
[b4_percent_code_get([[requires]])[
]b4_parse_assert_if([# include <cassert>])[
-# include <cstdlib> // abort
# include <vector>
# include <iostream>
# include <stdexcept>
stack_symbol_type ();
/// Steal the contents from \a sym to build this.
stack_symbol_type (state_type s, symbol_type& sym);
+ /// Assignment, needed by push_back.
stack_symbol_type& operator= (const stack_symbol_type& that);
};
# The needed includes for variants support.
m4_define([b4_variant_includes],
[b4_parse_assert_if([[#include <typeinfo>]])[
-#include <cstdlib> // abort
#ifndef YYASSERT
# include <cassert>
# define YYASSERT assert
tname = YY_NULL;])[
}
+ private:
/// Prohibit blind copies.
- private:
- self_type& operator=(const self_type&)
- {
- abort ();
- }
+ self_type& operator=(const self_type&);
+ variant (const self_type&);
- variant (const self_type&)
- {
- abort ();
- }
-
- private:
/// A buffer large enough to store any of the semantic values.
/// Long double is chosen as it has the strongest alignment
/// constraints.