46 ptr_ = std::make_unique<T>(*other.ptr_);
58 explicit operator T&() {
return *
ptr_; }
59 explicit operator T
const&()
const {
return *
ptr_; }
75 template <
typename Visitor,
typename Variant>
79 [&vis](
auto&& alternative) ->
decltype(
auto) {
80 using Alternative = std::decay_t<
decltype(alternative)>;
81 if constexpr (is_recursive_wrapper_v<Alternative>) {
82 return vis(alternative.get());
84 return vis(alternative);
87 std::forward<Variant>(var));
114 typedef std::variant<
126 typedef std::variant<
166 std::list<function_call_argument>
args;
178 out <<
"nil";
return out;
183 out <<
id.name;
return out;
constexpr bool is_recursive_wrapper_v
decltype(auto) apply_visitor(Visitor &&vis, Variant &&var)
std::variant< expression, quoted_string > function_call_argument
std::ostream & operator<<(std::ostream &out, identifier const &id)
std::variant< nil, bool, unsigned int, double, identifier, recursive_wrapper< unary >, recursive_wrapper< function_call >, recursive_wrapper< expression > > operand
recursive_wrapper & operator=(recursive_wrapper &&) noexcept=default
recursive_wrapper & operator=(T &&value)
std::unique_ptr< T > ptr_
recursive_wrapper(recursive_wrapper &&) noexcept=default
recursive_wrapper(T const &value)
recursive_wrapper(recursive_wrapper const &other)
recursive_wrapper(T &&value)
identifier(std::string const &name="")
quoted_string(std::string const &value="")
std::list< function_call_argument > args
std::list< operation > rest