Commit Graph

29 Commits

Author SHA1 Message Date
Martin Hořeňovský
a1bed572be Standardize C++11 feature toggles to follow documentation
Closes #774
2017-01-10 22:54:57 +01:00
Martin Hořeňovský
6991549457 Fixed compile error under VS2015 /c++:latest, caused by using random_shuffle
Now if we detect C++11 compiler, or MSVC in version corresponding to VS2015,
we switch from using `std::random_shuffle` to `std::shuffle`.

`std::random_shuffle` was officially deprecated in C++14, and removed in C++17.

Also removed guarded inclusion of `<random>` header, as there was nothing
in the header that used it.
2017-01-09 23:29:13 +01:00
Phil Nash
be3570ef22 Use std::shuffle instead of (deprecated) std::random_shuffle if C++14 detected 2016-06-09 08:15:57 +01:00
Phil Nash
13a887ad24 Use __COUNTER__ when generating unique names instead of __LINE__, if available.
Based on PR #351
2016-03-14 07:55:00 +00:00
David Grayson
97e335437e Fix CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS: GCC needs to be capitalized.
Fixes issue #600.
2016-03-04 19:24:10 -08:00
Phil Nash
91bfe68a75 Suppress parentheses warnings on clang and gcc
- should address #593, #528, #521, #496 (and possibly others)
2016-02-29 08:03:48 +00:00
Phil Nash
40d0d2f656 Added unique_ptr detection to compiler_capabilities
- as well as use by C++11 conformant compilers now enabled for VS2013 on too (see #479)
- updated docs with this (and long long and override support)
2015-08-11 08:09:41 +01:00
Phil Nash
4cb74761d9 Support for multiple reporters
- can't (yet) specify different targets for each reporter (e.g. different files)
2015-08-05 19:02:17 +01:00
Phil Nash
f3308ed7c4 Let gcc use __cplusplus identifier to decide if nullptr supported
- or, for 4.6, continue to check __GX_EXPERIMENTAL_CXX0X__
See GitHb issue #445 and PR #471
2015-07-27 18:42:36 +01:00
Phil Nash
733ebb6024 Added CATCH_CONFIG_CPP11_LONG_LONG support 2015-07-23 23:05:05 +01:00
Phil Nash
805de43a3d Use CATCH_NULL instead of NULL
- expands to nullptr if CATCH_CONFIG_CPP11_NULLPTR is defined (see #444)
2015-07-01 07:33:27 +01:00
Phil Nash
7ab3b5aefb Added compiler feature suppression macros
_NO_ forms to disable detection of features - particularly C++11 features.
Also removed SFINAE detection (and use in tostring)
2015-06-30 08:41:55 +01:00
Phil Nash
43470b2606 Removed CATCH_CONFIG_CPP11_NULLPTR for VS2015
- as it was already there for VS2010 on
2015-05-19 22:38:30 +01:00
Phil Nash
e86daf8bdd Reorganised C+11 feature detection a bit
and added CATCH_CONFIG_CPP11_NULLPTR for VS2015
2015-05-19 22:31:57 +01:00
Phil Nash
16a7db036f enable nullptr for VS2010 2014-09-18 18:23:47 +01:00
Phil Nash
73a0744452 Backed out PR #307 (use nullptr from VS2005) as it seems clr specific 2014-09-17 18:06:47 +01:00
Phil Nash
3eefa7f537 use nullptr in MSVC from 2005+
(based on PR #307 - thanks alex85k)
2014-09-02 08:30:57 +01:00
Phil Nash
1a6f2a0a80 Changed the way noexcept support is handled to (hopefully) fix #275 and #273 2014-04-23 18:19:19 +01:00
Phil Nash
d7e1790347 Merge branch 'master' of https://github.com/gnzlbg/Catch
# By gnzlbg
# Via gnzlbg
* 'master' of https://github.com/gnzlbg/Catch:
  Conditionally removes usage of deprecated features

Conflicts (resolved):
	include/internal/catch_common.h
	include/internal/catch_section.hpp
2014-04-18 08:49:35 +01:00
gnzlbg
ce6598599b Conditionally removes usage of deprecated features
-add macros to test for C++ version and features
to catch_compiler_capabilities.hpp
- replaces dynamic exception specifications (deprecated)
with noexcept in C++ Version >= 11
- defines defaulted copy constructor/move constructors/assignment
in C++ Version >= 11 since their implicit generation is deprecated
under some circumstances.
- fixes #259
2014-03-20 14:03:51 +01:00
Phil Nash
2851b4a55a Try again with nullptr compatibility check in GCC 2013-12-14 23:04:06 +00:00
Phil Nash
9d7b77956c build 19
- fixes nullptr regression (I had accidentally left in some dev changes)
2013-12-14 22:53:28 +00:00
Phil Nash
563429d9a3 Compile in CATCH_CONFIG_CPP11_NULLPTR for some compilers 2013-12-14 14:32:26 +00:00
Phil Nash
597ed1f79d handle TEST_CASE_METHOD macro consistently
- internally define INTERNAL_CATCH_TEST_CASE_METHOD
2013-05-14 19:31:21 +01:00
Phil Nash
c887d1a167 Removed rogue CATCH_CONFIG_SFINAE for GCC 3.x 2013-04-22 22:20:42 +01:00
Phil Nash
4dd3f68dd9 Compiler capabilities clean-up
- renamed CATCH_SFINAE -> CATCH_CONFIG_SFINAE
- moved variadic macros detection into catch_compiler_capabilities.h
2013-04-22 08:19:17 +01:00
Phil Nash
9fff9e47d3 Complete disable CATCH_SFINAE for now 2013-04-20 23:18:44 +01:00
Phil Nash
052dc18c76 Remove SFINAE support for all unknown compilers 2013-04-18 07:40:19 +01:00
Phil Nash
5062d3e92b Added (conditional) SFINAE support.
Better streamable detection for toString using SFINAE (falls back to non-SFINAE version without)
2013-04-16 22:55:31 +01:00