Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Added 3rd party bug to documentation

Commit
a38ccec33ac309a3495c277cf76f6a3e3df12093
Author
Martin Hořeňovský ·
Parents
1ff56301a1f3

Files · Download .tar.gz

Changes

 docs/limitations.md             |  5 +++++
 include/internal/catch_meta.hpp | 41 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)

diff --git a/docs/limitations.md b/docs/limitations.md
index 412c957c..bee4a296 100644
--- a/docs/limitations.md
+++ b/docs/limitations.md
@@ -73,6 +73,11 @@ TEST_CASE("No longer a syntax error with VC12") {
 }
 ```
 
+### Visual Studio 2003 -- Syntax error caused by improperly expanded `__LINE__` macro
+Older version of Visual Studio can have trouble compiling Catch, not expanding the `__LINE__` macro properly when recompiling the test binary. This is caused by Edit and Continue being on.
+
+A workaround is to turn off Edit and Continue when compiling the test binary.
+
 ### Clang/G++ -- skipping leaf sections after an exception
 Some versions of `libc++` and `libstdc++` (or their runtimes) have a bug with `std::uncaught_exception()` getting stuck returning `true` after rethrow, even if there are no active exceptions. One such case is this snippet, which skipped the sections "a" and "b", when compiled against `libcxxrt` from master
 ```cpp
diff --git a/include/internal/catch_meta.hpp b/include/internal/catch_meta.hpp
new file mode 100644
index 00000000..28002c76
--- /dev/null
+++ b/include/internal/catch_meta.hpp
@@ -0,0 +1,41 @@
+/*
+ *  Created by Phil on 08/02/2017.
+ *
+ *  Distributed under the Boost Software License, Version 1.0. (See accompanying
+ *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ */
+#ifndef TWOBLUECUBES_CATCH_META_HPP_INCLUDED
+#define TWOBLUECUBES_CATCH_META_HPP_INCLUDED
+
+#if defined(CATCH_CONFIG_CPP11_TYPE_TRAITS)
+#include <type_traits>
+#endif
+
+
+namespace Catch {
+    
+#if defined(CATCH_CONFIG_CPP11_TYPE_TRAITS)
+
+     template <class T>
+     using add_lvalue_reference = std::add_lvalue_reference<T>;
+
+#else
+    
+    template <typename T>
+    struct add_l_value_reference {
+        typedef T& type;
+    };
+    template <typename T>
+    struct add_l_value_reference<T&> {
+        typedef T& type;
+    };
+    template <typename T>
+    struct add_l_value_reference<T&&> {
+        typedef T& type;
+    };
+    
+#endif
+   
+}
+
+#endif // TWOBLUECUBES_CATCH_META_HPP_INCLUDED
\ No newline at end of file