Vcsn  2.8
Be Rational
num-tapes.hh
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vcsn/ctx/traits.hh>
4 #include <vcsn/dyn/context.hh>
5 
6 namespace vcsn
7 {
8  /*-------------.
9  | num_tapes. |
10  `-------------*/
11 
12  template <typename Ctx>
13  constexpr auto
15  -> size_t
16  {
18  }
19 
20  template <typename Ctx>
21  constexpr auto
22  num_tapes(const Ctx&)
23  -> size_t
24  {
25  return num_tapes<Ctx>();
26  }
27 
28  namespace dyn
29  {
30  namespace detail
31  {
33  template <typename Ctx>
34  size_t
36  {
37  return vcsn::num_tapes(ctx->as<Ctx>());
38  }
39  }
40  }
41 }
Template-less root for contexts.
Definition: context.hh:16
Definition: a-star.hh:8
auto & as()
Downcast to the exact type.
Definition: context.hh:36
size_t num_tapes(const context &ctx)
Bridge.
Definition: num-tapes.hh:35
constexpr auto num_tapes() -> size_t
Definition: num-tapes.hh:14