23namespace shamrock::patch {
30 template<
template<
class>
class Container>
34 using var_t_template = std::variant<
60 Container<T> &get_if_ref_throw() {
61 if (Container<T> *pval = std::get_if<Container<T>>(&
value)) {
65 "the type asked is not correct");
69 void visit(Func &&f) {
78 auto visit_return(Func &&f) {
87 void visit(Func &&f)
const {
96 auto visit_return(Func &&f)
const {
104 template<
template<
class>
class Container2,
class Func>
105 FieldVariant<Container2> convert(Func &&f) {
114 template<
template<
class>
class Container>
115 using var_t_template =
typename FieldVariant<Container>::var_t_template;
This header file contains utility functions related to exception handling in the code.
void throw_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Throw an exception and append the source location to it.