Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

visitor.hpp
Go to the documentation of this file.
1 //
2 // immer: immutable data structures for C++
3 // Copyright (C) 2016, 2017, 2018 Juan Pedro Bolivar Puente
4 //
5 // This software is distributed under the Boost Software License, Version 1.0.
6 // See accompanying file LICENSE or copy at http://boost.org/LICENSE_1_0.txt
7 //
8 
9 #pragma once
10 
11 #include <immer/config.hpp>
12 
13 #include <tuple>
14 #include <utility>
15 
16 namespace immer {
17 namespace detail {
18 namespace rbts {
19 
20 template <typename Deriv>
22 {
23  template <typename... Args>
24  static decltype(auto) visit_node(Args&& ...args)
25  {
27  }
28 
29  template <typename... Args>
30  static decltype(auto) visit_relaxed(Args&& ...args)
31  {
32  return Deriv::visit_inner(std::forward<Args>(args)...);
33  }
34 
35  template <typename... Args>
36  static decltype(auto) visit_regular(Args&& ...args)
37  {
38  return Deriv::visit_inner(std::forward<Args>(args)...);
39  }
40 
41  template <typename... Args>
42  static decltype(auto) visit_inner(Args&& ...args)
43  {
44  return Deriv::visit_node(std::forward<Args>(args)...);
45  }
46 
47  template <typename... Args>
48  static decltype(auto) visit_leaf(Args&& ...args)
49  {
50  return Deriv::visit_node(std::forward<Args>(args)...);
51  }
52 };
53 
54 } // namespace rbts
55 } // namespace detail
56 } // namespace immer
static decltype(auto) visit_inner(Args &&...args)
Definition: visitor.hpp:42
static decltype(auto) visit_leaf(Args &&...args)
Definition: visitor.hpp:48
static decltype(auto) visit_relaxed(Args &&...args)
Definition: visitor.hpp:30
static decltype(auto) visit_node(Args &&...args)
Definition: visitor.hpp:24
#define IMMER_UNREACHABLE
Definition: config.hpp:45
static decltype(auto) visit_regular(Args &&...args)
Definition: visitor.hpp:36
Released under the MIT license