@@ -75,8 +75,8 @@ class ModelError : public Error {
75
75
}
76
76
77
77
template <typename ... Args>
78
- ModelError explanation (const char * format, const Args&... args) && {
79
- this ->set_explanation (fmt::format (format, args...));
78
+ ModelError explanation (std::string_view format, const Args&... args) && {
79
+ this ->set_explanation (fmt::format (fmt::runtime ( format) , args...));
80
80
return std::move (*this );
81
81
}
82
82
};
@@ -100,8 +100,8 @@ class ModelAbort : public ModelError {
100
100
}
101
101
102
102
template <typename ... Args>
103
- ModelError explanation (const char * format, const Args&... args) && {
104
- this ->set_explanation (fmt::format (format, args...));
103
+ ModelAbort explanation (std::string_view format, const Args&... args) && {
104
+ this ->set_explanation (fmt::format (fmt::runtime ( format) , args...));
105
105
return std::move (*this );
106
106
}
107
107
};
@@ -123,8 +123,8 @@ class ModelReset : public ModelError {
123
123
}
124
124
125
125
template <typename ... Args>
126
- ModelError explanation (const char * format, const Args&... args) && {
127
- this ->set_explanation (fmt::format (format, args...));
126
+ ModelReset explanation (std::string_view format, const Args&... args) && {
127
+ this ->set_explanation (fmt::format (fmt::runtime ( format) , args...));
128
128
return std::move (*this );
129
129
}
130
130
};
@@ -146,8 +146,8 @@ class ModelStop : public ModelError {
146
146
}
147
147
148
148
template <typename ... Args>
149
- ModelError explanation (const char * format, const Args&... args) && {
150
- this ->set_explanation (fmt::format (format, args...));
149
+ ModelStop explanation (std::string_view format, const Args&... args) && {
150
+ this ->set_explanation (fmt::format (fmt::runtime ( format) , args...));
151
151
return std::move (*this );
152
152
}
153
153
};
0 commit comments