parent
1309b47cbb
commit
f1546e289c
4 changed files with 53 additions and 3 deletions
@ -0,0 +1,3 @@ |
||||
## Added `cpp_std` option for the Visual Studio C++ compiler |
||||
Allows the use of C++17 features and experimental not-yet-standardized |
||||
features. Valid options are `c++11`, `c++14`, `c++17`, and `c++latest`. |
@ -0,0 +1,7 @@ |
||||
[[nodiscard]] int foo() { |
||||
return 0; |
||||
} |
||||
|
||||
int main() { |
||||
return foo(); |
||||
} |
@ -0,0 +1,9 @@ |
||||
project('msvc_cpp17', 'cpp', default_options: ['cpp_std=c++17']) |
||||
|
||||
compiler = meson.get_compiler('cpp') |
||||
if compiler.get_id() != 'msvc' or compiler.version().version_compare('<19.11') |
||||
error('MESON_SKIP_TEST Visual Studio 2017 (version 15.3) or later is required for C++17 support') |
||||
endif |
||||
|
||||
exe = executable('msvc_cpp17', 'main.cpp') |
||||
test('msvc_cpp17', exe) |
Loading…
Reference in new issue