There was an error while loading. Please reload this page.
1 parent 4ecae59 commit b311f59Copy full SHA for b311f59
1 file changed
include/rsl/assert
@@ -32,7 +32,7 @@ constexpr std::string format_sloc(std::source_location sloc) {
32
33
template <typename T>
34
requires std::convertible_to<T const&, std::string_view>
35
-consteval void compile_error(T const& message) {
+consteval void compile_error(T const& message, std::source_location sloc = std::source_location::current()) {
36
auto diagnostic = '\n' + _error_impl::format_sloc(sloc) + ": error: " + message;
37
auto compile_error =
38
substitute(^^_error_impl::error, {std::meta::reflect_constant_string(diagnostic)});
0 commit comments