diff --git a/docs/configuration.md b/docs/configuration.md index daa79931..48250b62 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -50,48 +50,7 @@ Catch does not use ```std::cout``` and ```std::cerr``` directly but gets them fr This can be useful on certain platforms that do not provide ```std::cout``` and ```std::cerr```, such as certain embedded systems. -# C++ conformance toggles - CATCH_CONFIG_CPP11_NULLPTR // nullptr is supported? - CATCH_CONFIG_CPP11_NOEXCEPT // noexcept is supported? - CATCH_CONFIG_CPP11_GENERATED_METHODS // delete and default keywords for methods - CATCH_CONFIG_CPP11_IS_ENUM // std::is_enum is supported? - CATCH_CONFIG_CPP11_TUPLE // std::tuple is supported - CATCH_CONFIG_VARIADIC_MACROS // Usually pre-C++11 compiler extensions are sufficient - CATCH_CONFIG_CPP11_LONG_LONG // generates overloads for the long long type - CATCH_CONFIG_CPP11_OVERRIDE // CATCH_OVERRIDE expands to override (for virtual function implementations) - CATCH_CONFIG_CPP11_UNIQUE_PTR // Use std::unique_ptr instead of std::auto_ptr - CATCH_CONFIG_CPP11_SHUFFLE // Use std::shuffle instead of std::random_shuffle - CATCH_CONFIG_CPP11_TYPE_TRAITS // Use std::enable_if and - CATCH_CONFIG_CPP11_STREAM_INSERTABLE_CHECK // Use C++11 expression SFINAE to check if class can be inserted to std::ostream - -Catch has some basic compiler detection that will attempt to select the appropriate mix of these macros. However being incomplete - and often without access to the respective compilers - this detection tends to be conservative. -So overriding control is given to the user. If a compiler supports a feature (and Catch does not already detect it) then one or more of these may be defined to enable it (or suppress it, in some cases). If you do do this please raise an issue, specifying your compiler version (ideally with an idea of how to detect it) and stating that it has such support. -You may also suppress any of these features by using the `_NO_` form, e.g. `CATCH_CONFIG_CPP11_NO_NULLPTR`. - -All C++11 support can be disabled with `CATCH_CONFIG_NO_CPP11` - -## `CATCH_CONFIG_CPP11_STREAM_INSERTABLE_CHECK` - -This flag is off by default, but allows you to resolve problems caused by types with private base class that are streamable, but the classes themselves are not. Without it, the following code will cause a compilation error: -```cpp -#define CATCH_CONFIG_MAIN -#include -struct A {}; -std::ostream &operator<< (std::ostream &o, const A &v) { return o << 0; } - -struct B : private A { - bool operator==(int){ return true;} -}; - -B f (); -std::ostream g (); - -TEST_CASE ("Error in streamable check") { - B x; - REQUIRE (x == 4); -} -``` # Other toggles @@ -107,7 +66,7 @@ Currently Catch enables `CATCH_CONFIG_WINDOWS_SEH` only when compiled with MSVC, `CATCH_CONFIG_WINDOWS_CRTDBG` is off by default. If enabled, Windows's CRT is used to check for memory leaks, and displays them after the tests finish running. -Just as with the C++11 conformance toggles, these toggles can be disabled by using `_NO_` form of the toggle, e.g. `CATCH_CONFIG_NO_WINDOWS_SEH`. +These toggles can be disabled by using `_NO_` form of the toggle, e.g. `CATCH_CONFIG_NO_WINDOWS_SEH`. ## `CATCH_CONFIG_FAST_COMPILE` Defining this flag speeds up compilation of test files by ~20%, by making 2 changes: