aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.ucl/type.ccm
diff options
context:
space:
mode:
authorLexi Winter <lexi@le-fay.org>2025-06-23 16:28:11 +0100
committerLexi Winter <lexi@le-fay.org>2025-06-23 16:28:11 +0100
commitd5963532328ce5f1c9f266bf7e760b7d18a60c15 (patch)
tree28e8d4b98f2f3adbd2f02bcc656ad74e626677c9 /nihil.ucl/type.ccm
parent0fa623093366351ad47583f47add6e51f56a56d8 (diff)
downloadnihil-d5963532328ce5f1c9f266bf7e760b7d18a60c15.tar.gz
nihil-d5963532328ce5f1c9f266bf7e760b7d18a60c15.tar.bz2
various updates
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)
{}