I would like my Bazel project to use c++17. There is a similar question (How to set C++ standard version when build with Bazel?) but the accepted answer does not port to MSCV.
MSCV needs --cxxopt='/std:c++17' while gcc needs --cxxopt='--std=c++17'.
Does anyone have a minimal example configuration that builds on the most popular Windows and Linux compilers (gcc, MSCV, clang) that sets the version to c++17? I am having a real hard time understanding the toolchain documentation.
The following did not work.
# .bazelrc
build --cxxopt=select({
"@bazel_tools//src/conditions:windows": "/std:c++17",
"//conditions:default": "--std=c++17",
})