isl_test_cpp17-generic.cc: work around std::optional::value issue in older macOSmaster
commit931fa37d5b046fbc7228a214bc2397b5e598290c
authorSven Verdoolaege <sven.verdoolaege@gmail.com>
Sat, 20 Apr 2024 10:42:26 +0000 (20 12:42 +0200)
committerSven Verdoolaege <sven.verdoolaege@gmail.com>
Sat, 20 Apr 2024 10:42:26 +0000 (20 12:42 +0200)
tree547d2e35b53abfc5887d6e87aa8650c512365040
parent5a23e59b9f47de16fd7fe8b75e323c5810f61c83
isl_test_cpp17-generic.cc: work around std::optional::value issue in older macOS

In versions of macOS prior to 10.14, std::optional::value
is not available, while the compiler may still be detected
as supporting C++17.
While it would be possible to extend the detection
to include a check for std::optional::value, it is easy
enough to work around the absence of std::optional::value
by simply calling operator* on the std::optional.

Reported-by: Liviu Ionescu <ilg@livius.net>
Tested-by: Liviu Ionescu <ilg@livius.net>
Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>
isl_test_cpp17-generic.cc