Skip to content

Commit eac1e21

Browse files
committed
Merge branch 'master' of github.com:mpusz/mp-units
2 parents 3975401 + 0b0e7a8 commit eac1e21

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

.devcontainer/check_all.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,31 +57,31 @@ echo "⚙️ Testing GCC configurations..."
5757
conan $1 . -pr gcc12 -c user.mp-units.build:all=True -o '&:cxx_modules=False' -o '&:import_std=False' -o '&:std_format=False' -o '&:contracts=gsl-lite' -s compiler.cppstd=20 -b missing
5858
conan $1 . -pr gcc13 -c user.mp-units.build:all=True -o '&:cxx_modules=False' -o '&:import_std=False' -o '&:std_format=True' -o '&:contracts=none' -s compiler.cppstd=23 -b missing
5959
conan $1 . -pr gcc14 -c user.mp-units.build:all=True -o '&:cxx_modules=False' -o '&:import_std=False' -o '&:std_format=False' -o '&:contracts=ms-gsl' -s compiler.cppstd=23 -b missing
60-
# gcc-15.0.1 has bugs preventing mp-units from compiling
61-
# conan $1 . -pr gcc15 -c user.mp-units.build:all=True -o '&:cxx_modules=False' -o '&:import_std=False' -o '&:std_format=True' -o '&:contracts=gsl-lite' -s compiler.cppstd=26 -b missing
60+
conan $1 . -pr gcc15 -c user.mp-units.build:all=True -o '&:cxx_modules=False' -o '&:import_std=False' -o '&:std_format=True' -o '&:contracts=gsl-lite' -s compiler.cppstd=26 -b missing
6261

6362
echo "⚙️ Testing Clang configurations..."
6463
conan $1 . -pr clang16 -c user.mp-units.build:all=True -o '&:cxx_modules=False' -o '&:import_std=False' -o '&:std_format=False' -o '&:contracts=gsl-lite' -s compiler.cppstd=20 -b missing
6564
conan $1 . -pr clang17 -c user.mp-units.build:all=True -o '&:cxx_modules=True' -o '&:import_std=False' -o '&:std_format=True' -o '&:contracts=ms-gsl' -s compiler.cppstd=26 -b missing
6665
conan $1 . -pr clang18 -c user.mp-units.build:all=True -o '&:cxx_modules=True' -o '&:import_std=True' -o '&:std_format=True' -o '&:contracts=none' -s compiler.cppstd=26 -b missing
6766
# clang-19 will never compile mp-units due to https://github.com/llvm/llvm-project/pull/118288
6867
conan $1 . -pr clang20 -c user.mp-units.build:all=True -o '&:cxx_modules=True' -o '&:import_std=True' -o '&:std_format=True' -o '&:contracts=none' -s compiler.cppstd=26 -b missing
68+
conan $1 . -pr clang21 -c user.mp-units.build:all=True -o '&:cxx_modules=True' -o '&:import_std=True' -o '&:std_format=True' -o '&:contracts=none' -s compiler.cppstd=26 -b missing
6969

7070
if [[ $run_debug ]]; then
7171
echo "🐛 Starting debug build configurations..."
7272
echo "⚙️ Testing GCC debug configurations..."
7373
conan $1 . -pr gcc12 -c user.mp-units.build:all=True -o '&:cxx_modules=False' -o '&:import_std=False' -o '&:std_format=False' -o '&:contracts=gsl-lite' -s compiler.cppstd=20 -b missing -s build_type=Debug
7474
conan $1 . -pr gcc13 -c user.mp-units.build:all=True -o '&:cxx_modules=False' -o '&:import_std=False' -o '&:std_format=True' -o '&:contracts=none' -s compiler.cppstd=23 -b missing -s build_type=Debug
7575
conan $1 . -pr gcc14 -c user.mp-units.build:all=True -o '&:cxx_modules=False' -o '&:import_std=False' -o '&:std_format=False' -o '&:contracts=ms-gsl' -s compiler.cppstd=23 -b missing -s build_type=Debug
76-
# gcc-15.0.1 has bugs preventing mp-units from compiling
77-
# conan $1 . -pr gcc15 -c user.mp-units.build:all=True -o '&:cxx_modules=False' -o '&:import_std=False' -o '&:std_format=True' -o '&:contracts=gsl-lite' -s compiler.cppstd=26 -b missing -s build_type=Debug
76+
conan $1 . -pr gcc15 -c user.mp-units.build:all=True -o '&:cxx_modules=False' -o '&:import_std=False' -o '&:std_format=True' -o '&:contracts=gsl-lite' -s compiler.cppstd=26 -b missing -s build_type=Debug
7877

7978
echo "⚙️ Testing Clang debug configurations..."
8079
conan $1 . -pr clang16 -c user.mp-units.build:all=True -o '&:cxx_modules=False' -o '&:import_std=False' -o '&:std_format=False' -o '&:contracts=gsl-lite' -s compiler.cppstd=20 -b missing -s build_type=Debug
8180
conan $1 . -pr clang17 -c user.mp-units.build:all=True -o '&:cxx_modules=True' -o '&:import_std=False' -o '&:std_format=True' -o '&:contracts=ms-gsl' -s compiler.cppstd=26 -b missing -s build_type=Debug
8281
conan $1 . -pr clang18 -c user.mp-units.build:all=True -o '&:cxx_modules=True' -o '&:import_std=True' -o '&:std_format=True' -o '&:contracts=none' -s compiler.cppstd=26 -b missing -s build_type=Debug
8382
# clang-19 will never compile mp-units due to https://github.com/llvm/llvm-project/pull/118288
8483
conan $1 . -pr clang20 -c user.mp-units.build:all=True -o '&:cxx_modules=True' -o '&:import_std=True' -o '&:std_format=True' -o '&:contracts=none' -s compiler.cppstd=26 -b missing -s build_type=Debug
84+
conan $1 . -pr clang21 -c user.mp-units.build:all=True -o '&:cxx_modules=True' -o '&:import_std=True' -o '&:std_format=True' -o '&:contracts=none' -s compiler.cppstd=26 -b missing -s build_type=Debug
8585
echo "✅ Debug builds completed!"
8686
fi
8787

src/core/include/mp-units/bits/fmt.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,18 +293,24 @@ struct dynamic_spec_id_handler {
293293
{
294294
const int id = MP_UNITS_FMT_FROM_ARG_ID(ctx.next_arg_id());
295295
ref = fmt_arg_ref<Char>(id);
296-
#if MP_UNITS_USE_FMTLIB || __cpp_lib_format >= 202305L
296+
#if MP_UNITS_USE_FMTLIB
297297
ctx.check_dynamic_spec(id);
298+
#elif __cpp_lib_format >= 202305L
299+
ctx.check_dynamic_spec_integral(MP_UNITS_FMT_TO_ARG_ID(id));
298300
#endif
299301
}
302+
300303
constexpr void on_index(int id)
301304
{
302305
ref = fmt_arg_ref<Char>(id);
303306
ctx.check_arg_id(MP_UNITS_FMT_TO_ARG_ID(id));
304-
#if MP_UNITS_USE_FMTLIB || __cpp_lib_format >= 202305L
307+
#if MP_UNITS_USE_FMTLIB
305308
ctx.check_dynamic_spec(id);
309+
#elif __cpp_lib_format >= 202305L
310+
ctx.check_dynamic_spec_integral(MP_UNITS_FMT_TO_ARG_ID(id));
306311
#endif
307312
}
313+
308314
#if MP_UNITS_USE_FMTLIB
309315
constexpr void on_name([[maybe_unused]] std::basic_string_view<Char> id)
310316
{

0 commit comments

Comments
 (0)