aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.ucl/type.ccm
diff options
context:
space:
mode:
Diffstat (limited to 'nihil.ucl/type.ccm')
-rw-r--r--nihil.ucl/type.ccm6
1 files changed, 4 insertions, 2 deletions
diff --git a/nihil.ucl/type.ccm b/nihil.ucl/type.ccm
index 5050e7a..bf6c6bc 100644
--- a/nihil.ucl/type.ccm
+++ b/nihil.ucl/type.ccm
@@ -5,6 +5,7 @@
module;
#include <concepts>
+#include <format>
#include <string>
#include <ucl.h>
@@ -69,8 +70,9 @@ concept datatype = requires(T o) {
// Exception thrown when a type assertion fails.
export struct type_mismatch : error {
type_mismatch(object_type expected_type, object_type actual_type)
- : error("UCL type mismatch: expected type '{}' != actual type '{}'",
- str(expected_type), str(actual_type))
+ : error(std::format("UCL type mismatch: expected type '{}' "
+ "!= actual type '{}'",
+ str(expected_type), str(actual_type)))
, _expected_type(expected_type)
, _actual_type(actual_type)
{}