autoppl  v0.8
A C++ template library for probabilistic programming
program_expr_traits.hpp
Go to the documentation of this file.
1 #pragma once
3 
4 namespace ppl {
5 namespace util {
6 
7 template <class Derived>
8 struct ProgramExprBase: BaseCRTP<Derived>
9 {};
10 
11 template <class T>
12 inline constexpr bool program_expr_is_base_of_v =
13  std::is_base_of_v<ProgramExprBase<T>, T>;
14 
15 template <class T>
17 {};
18 
19 #if __cplusplus <= 201703L
20 
21 template <class T>
22 inline constexpr bool is_program_expr_v =
23  program_expr_is_base_of_v<T>
24  ;
25 
26 #else
27 
28 template <class T>
29 concept program_expr_c =
30  program_expr_is_base_of_v<T>
31  ;
32 
33 template <class T>
34 concept is_program_expr_v = program_expr_c<T>;
35 
36 #endif
37 
38 } // namespace util
39 } // namespace ppl
ppl::util::ProgramExprBase
Definition: program_expr_traits.hpp:9
type_traits.hpp
ppl::util::is_program_expr_v
constexpr bool is_program_expr_v
Definition: program_expr_traits.hpp:22
ppl::util::BaseCRTP
Definition: type_traits.hpp:65
ppl::util::program_expr_traits
Definition: program_expr_traits.hpp:17
ppl::util::program_expr_is_base_of_v
constexpr bool program_expr_is_base_of_v
Definition: program_expr_traits.hpp:12
ppl
Definition: bounded.hpp:11