• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[#nullary_metafunction]
2[section Nullary template metafunction]
3
4A ['nullary template metafuncion] is a [link metafunction template metafunction]
5taking 0 arguments. It is a type with a nested type called `type`, which is the
6return value of the nullary metafunction. For example:
7
8  struct always13
9  {
10    using type = std::integral_constant<int, 13>;
11  };
12
13This metafunction is called `always13`. It is a nullary metafunction, because it
14takes no arguments. It always returns `std::integral_constant<int, 13>`.
15
16To call this metafunction, one has to access its `::type`. For example:
17
18  always13::type
19
20The above example calls the metafunction to get
21`std::integral_constant<int, 13>`.
22
23[endsect]
24
25