From 9f5d446e36c37824a7321c16e1b4603d80b67a58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Guzm=C3=A1n?= Date: Tue, 19 Apr 2022 21:59:52 -0600 Subject: [PATCH] use c++14 on windows on windows may show an error in xstddef if c++11 is used this is a workarround for that issue "deduced return types are a C++14 extension" --- meson.build | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 5447d8b..81058e1 100644 --- a/meson.build +++ b/meson.build @@ -84,7 +84,14 @@ if not (host_machine.system() == 'windows' and cxx.get_id() == 'msvc') '-Wno-long-long', ] endif - +## using MSVC headers requires c++14, if not will show an error on xstddef as: +## 'auto' return without trailing return type; deduced return types are a C++14 extension +if host_machine.system() == 'windows' + message('[WINDOWS] using c++14 standard') + sqlitecpp_opts += [ + 'cpp_std=c++14', + ] +endif # Options relative to SQLite and SQLiteC++ functions if get_option('SQLITE_ENABLE_COLUMN_METADATA')