Skip to content

Commit 996f009

Browse files
committed
making the C++20 literals into inline functions
1 parent 4920fe6 commit 996f009

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ namespace sakurajin{
210210

211211
//forward declare all units
212212
{% for unit in units %}
213-
UNIT_SYSTEM_EXPORT_MACRO typedef {{ unit.name }}_t<UNIT_SYSTEM_DEFAULT_TYPE> {{ unit.name }};
213+
typedef {{ unit.name }}_t<UNIT_SYSTEM_DEFAULT_TYPE> {{ unit.name }};
214214
{% endfor %}
215215

216216

@@ -219,10 +219,10 @@ namespace sakurajin{
219219
{% for unit in units %}
220220
{% if unit.literals|length > 0 %}
221221
{% for literal in unit.literals %}
222-
{{ extra_data.export_macro }} auto operator "" _{{ literal.code_literal }}(long double val){
222+
inline auto operator "" _{{ literal.code_literal }}(long double val){
223223
return sakurajin::unit_system::{{ unit.name }}{val,{{ literal.multiplier }}, {{ literal.offset }}};
224224
}
225-
{{ extra_data.export_macro }} auto operator "" _{{ literal.code_literal }}(unsigned long long int val){
225+
inline auto operator "" _{{ literal.code_literal }}(unsigned long long int val){
226226
return sakurajin::unit_system::{{ unit.name }}{static_cast<long double>(val),{{ literal.multiplier }}, {{ literal.offset }}};
227227
}
228228
{% endfor %}

0 commit comments

Comments
 (0)