Unbreak Embarcadero C++ clang-based compilers

* Change __BORLANDC__ to BOOST_BORLANDC, which is defined in Boost config for the Embarcadero non-clang-based compilers.

* Restored a Borland check.

* Specify std:: for all standard identifiers and remove 'using namespace std:'.

* Removed std:: from C header abort call.

* Moved 'using namespace std;' after header file inclusions
This commit is contained in:
Edward Diener
2020-08-25 12:30:10 -04:00
committed by GitHub
parent a2379420f6
commit 0414abe3f4
2 changed files with 2 additions and 3 deletions

View File

@@ -308,7 +308,7 @@ void test_environment()
("bar", new untyped_value, "")
;
#if (defined(_WIN32) && ! defined(__BORLANDC__)) || (defined(__CYGWIN__))
#if (defined(_WIN32) && ! defined(BOOST_BORLANDC) && ! defined(BOOST_EMBTC)) || (defined(__CYGWIN__))
_putenv("PO_TEST_FOO=1");
#else
putenv(const_cast<char*>("PO_TEST_FOO=1"));

View File

@@ -9,10 +9,9 @@
#include <cctype>
#include <iostream>
#include <stdlib.h>
#include <boost/program_options/parsers.hpp>
using namespace std;
#include <boost/program_options/parsers.hpp>
using namespace boost::program_options;
void check_equal(const std::vector<string>& actual, char **expected, int n)