C++ doc example does not compile if gnulib overrides the "write" function on mingw
Hello,
Mingw does not have a "write" function, but it has a "_write" function. Gnulib is smart: it defines the "write" macro as "_write" on mingw. The only problem is, the C++ STL defines a method in std::ostream, named "write". Since "write" is a macro, now some C++ code somewhere is compiled as a call to std::ostream::_write, which does not exist.
The only solution I see is to use a C++ namespace for gnulib: https://www.gnu.org/software/gnulib/manual/html_node/A-C_002b_002b-namespace-for-gnulib.html
This is for doc/examples/ex-cxx.cpp