summaryrefslogtreecommitdiff
path: root/c++
diff options
context:
space:
mode:
Diffstat (limited to 'c++')
-rw-r--r--c++/distance/meter.hpp2
-rw-r--r--c++/time/second.hpp2
-rw-r--r--c++/unit.hpp4
-rw-r--r--c++/unit_print.hpp14
4 files changed, 11 insertions, 11 deletions
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 <string_view>
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<typename UnitType, int64_t Exponent>
@@ -46,4 +46,4 @@ template<typename S>
using scalar = unit<S>;
}
-#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 <iostream>
namespace std {
template<typename UnitT, int64_t UnitE>
-inline ostream& operator<<(ostream& o, const kel::unit_base<UnitT,UnitE>& ele){
+inline ostream& operator<<(ostream& o, const kel::unit_component<UnitT,UnitE>&){
o<<UnitT::short_name;
if constexpr ( UnitE != 1 ){
o<<'^'<<'('<<UnitE<<')';
@@ -21,16 +21,16 @@ struct unit_print_impl {
};
template<typename UnitT, int64_t UnitE, typename... UnitTL, int64_t... UnitEL>
-struct unit_print_impl<unit_base<UnitT,UnitE>,unit_base<UnitTL,UnitEL>...> {
+struct unit_print_impl<unit_component<UnitT,UnitE>,unit_component<UnitTL,UnitEL>...> {
static std::ostream& print(std::ostream& o){
- unit_base<UnitT,UnitE> element;
+ unit_component<UnitT,UnitE> element;
std::ostream& o_ret = o << element;
if constexpr (sizeof...(UnitTL) > 0){
std::ostream& o_ret_next = o_ret << ' ' << '*' << ' ';
- return unit_print_impl<unit_base<UnitTL,UnitEL>...>::print(o_ret_next);
+ return unit_print_impl<unit_component<UnitTL,UnitEL>...>::print(o_ret_next);
}
return o_ret<<']';
@@ -44,11 +44,11 @@ template<typename StorageT, typename... T>
inline ostream& operator<<(ostream& o, const kel::unit<StorageT,T...>& unit);
template<typename StorageT, typename... UnitT, int64_t... UnitE>
-inline ostream& operator<<(ostream& o, const kel::unit<StorageT,kel::unit_base<UnitT,UnitE>...>& unit){
+inline ostream& operator<<(ostream& o, const kel::unit<StorageT,kel::unit_component<UnitT,UnitE>...>& unit){
o << unit.data();
if constexpr (sizeof...(UnitT) > 0) {
auto& o_ret = o << ' '<<'[';
- return kel::unit_print_impl<kel::unit_base<UnitT,UnitE>...>::print(o_ret);
+ return kel::unit_print_impl<kel::unit_component<UnitT,UnitE>...>::print(o_ret);
}
return o;
}