From 0fa623093366351ad47583f47add6e51f56a56d8 Mon Sep 17 00:00:00 2001 From: Lexi Winter Date: Mon, 23 Jun 2025 00:32:38 +0100 Subject: nihil.ucl: improve tests --- nihil.ucl/real.ccm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'nihil.ucl/real.ccm') diff --git a/nihil.ucl/real.ccm b/nihil.ucl/real.ccm index 51607f2..260e993 100644 --- a/nihil.ucl/real.ccm +++ b/nihil.ucl/real.ccm @@ -17,7 +17,7 @@ import :object; namespace nihil::ucl { export struct real final : object { - using value_type = double; + using contained_type = double; inline static constexpr object_type ucl_type = object_type::real; @@ -42,7 +42,7 @@ export struct real final : object { {} // Create a new real from a value. - explicit real(value_type value) + explicit real(contained_type value) : object(noref, ::ucl_object_fromdouble(value)) { if (_object == nullptr) @@ -50,9 +50,9 @@ export struct real final : object { } // Return the value of this real. - auto value(this real const &self) -> value_type + auto value(this real const &self) -> contained_type { - auto v = value_type{}; + auto v = contained_type{}; auto const *uobj = self.get_ucl_object(); if (::ucl_object_todouble_safe(uobj, &v)) @@ -78,13 +78,13 @@ export auto operator<=> (real const &a, real const &b) return a.value() <=> b.value(); } -export auto operator== (real const &a, real::value_type b) +export auto operator== (real const &a, real::contained_type b) -> bool { return a.value() == b; } -export auto operator<=> (real const &a, real::value_type b) +export auto operator<=> (real const &a, real::contained_type b) -> std::partial_ordering { return a.value() <=> b; -- cgit v1.2.3