Skip to content

Commit 7a041d9

Browse files
committed
fixing C++20 std output and C++20 unit multiplication
1 parent 64427ed commit 7a041d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

target_data/Cpp/cppDesktop/include/unit_system_20.hpp.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ namespace sakurajin{
169169
template <std::floating_point base_type>
170170
std::ostream& operator<<(std::ostream& os, const {{ unit.name }}_t<base_type>& val) {
171171
auto val_raw = val.convert_copy(1.0, 0.0);
172-
return os << val_raw.val() << " {{ base_name }}";
172+
return os << val_raw.val() << " {{ unit.base_name }}";
173173
}
174174

175175
{% endfor %}
@@ -191,7 +191,7 @@ namespace sakurajin{
191191
[[nodiscard]]auto operator*(const {{ unit.name }}_t<base_type>& val, const {{ mult.factor }}_t<base_type>& other){
192192
auto _v1 = val.convert_offset(0);
193193
auto _v2 = other.convert_offset(0);
194-
return sakurajin::unit_system::{{ mult.product }}_t<base_type>{_v1.val()*_v2.val(),_v1.mult()/_v2.mult()};
194+
return sakurajin::unit_system::{{ mult.product }}_t<base_type>{_v1.val()*_v2.val(),_v1.mult()*_v2.mult()};
195195
}
196196
{% endfor %}{% endif %}
197197

0 commit comments

Comments
 (0)