From d9a1368e23fae9e696bc061b3688fc226eaf1d7e Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Mon, 29 Jul 2024 20:57:51 +0200 Subject: Fixed lib for basic example --- c++/distance/meter.hpp | 2 +- c++/time/second.hpp | 2 +- c++/unit.hpp | 4 ++-- c++/unit_print.hpp | 14 +++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'c++') diff --git a/c++/distance/meter.hpp b/c++/distance/meter.hpp index 0d9fb3b..9ab3762 100644 --- a/c++/distance/meter.hpp +++ b/c++/distance/meter.hpp @@ -1,6 +1,6 @@ #pragma once -#include "../unit.h" +#include "../unit.hpp" #include diff --git a/c++/time/second.hpp b/c++/time/second.hpp index 6dca456..d127f86 100644 --- a/c++/time/second.hpp +++ b/c++/time/second.hpp @@ -1,6 +1,6 @@ #pragma once -#include "../unit.h" +#include "../unit.hpp" namespace kel { namespace unit_type { diff --git a/c++/unit.hpp b/c++/unit.hpp index a8e8320..171fcb6 100644 --- a/c++/unit.hpp +++ b/c++/unit.hpp @@ -1,6 +1,6 @@ #pragma once -#include "unit_reduction.h" +#include "unit_reduction.hpp" namespace kel { template @@ -46,4 +46,4 @@ template using scalar = unit; } -#include "unit.tmpl.h" +#include "unit.tmpl.hpp" diff --git a/c++/unit_print.hpp b/c++/unit_print.hpp index 4d9187b..248a48d 100644 --- a/c++/unit_print.hpp +++ b/c++/unit_print.hpp @@ -1,11 +1,11 @@ -#include "./unit.h" +#include "unit.hpp" #include namespace std { template -inline ostream& operator<<(ostream& o, const kel::unit_base& ele){ +inline ostream& operator<<(ostream& o, const kel::unit_component&){ o< -struct unit_print_impl,unit_base...> { +struct unit_print_impl,unit_component...> { static std::ostream& print(std::ostream& o){ - unit_base element; + unit_component element; std::ostream& o_ret = o << element; if constexpr (sizeof...(UnitTL) > 0){ std::ostream& o_ret_next = o_ret << ' ' << '*' << ' '; - return unit_print_impl...>::print(o_ret_next); + return unit_print_impl...>::print(o_ret_next); } return o_ret<<']'; @@ -44,11 +44,11 @@ template inline ostream& operator<<(ostream& o, const kel::unit& unit); template -inline ostream& operator<<(ostream& o, const kel::unit...>& unit){ +inline ostream& operator<<(ostream& o, const kel::unit...>& unit){ o << unit.data(); if constexpr (sizeof...(UnitT) > 0) { auto& o_ret = o << ' '<<'['; - return kel::unit_print_impl...>::print(o_ret); + return kel::unit_print_impl...>::print(o_ret); } return o; } -- cgit v1.2.3