mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-31 08:57:58 +00:00
Redo build matrix on .travis for C++14 and up
* Use Xenial as the base distribution * Remove C++11 builds * Add a lot more C++14 builds * Add some C++17 builds * Include newer versions of Clang and GCC
This commit is contained in:
parent
7c48ea6016
commit
2c6ace04a7
5 changed files with 103 additions and 199 deletions
|
@ -10,11 +10,12 @@
|
|||
#define CATCH_CONFIG_MAIN
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
|
||||
class out_buff : public std::stringbuf {
|
||||
std::FILE* m_stream;
|
||||
public:
|
||||
out_buff(std::FILE* stream) :m_stream(stream) {}
|
||||
~out_buff() { pubsync(); }
|
||||
out_buff(std::FILE* stream):m_stream(stream) {}
|
||||
~out_buff();
|
||||
int sync() {
|
||||
int ret = 0;
|
||||
for (unsigned char c : str()) {
|
||||
|
@ -29,6 +30,12 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
out_buff::~out_buff() { pubsync(); }
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic ignored "-Wexit-time-destructors" // static variables in cout/cerr/clog
|
||||
#endif
|
||||
|
||||
namespace Catch {
|
||||
std::ostream& cout() {
|
||||
static std::ostream ret(new out_buff(stdout));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue