c++20. clock chrono API. STL + format

Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
This commit is contained in:
Viktar Lukashonak
2023-11-10 17:57:26 +03:00
parent c4330a1e36
commit 86a38980e4
8 changed files with 379 additions and 374 deletions

View File

@ -126,7 +126,22 @@ gtk_layer_shell = dependency('gtk-layer-shell-0',
systemd = dependency('systemd', required: get_option('systemd'))
cpp_lib_chrono = compiler.compute_int('__cpp_lib_chrono', prefix : '#include <chrono>')
have_chrono_timezones = cpp_lib_chrono >= 201907
have_chrono_timezones = cpp_lib_chrono >= 201611
if have_chrono_timezones
code = '''
#include <chrono>
using namespace std::chrono;
int main(int argc, char** argv) {
const time_zone* tz;
return 0;
}
'''
if not compiler.links(code)
have_chrono_timezones = false
endif
endif
if have_chrono_timezones
tz_dep = declare_dependency()
else