Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVadim Zeitlin2012-10-31 19:03:08 +0100
committerVadim Zeitlin2012-10-31 19:17:31 +0100
commitb7f705482837eb24fc500e445762482fc4ebea46 (patch)
treead16a42b303b3dfa10cfdaceea428350a1a9e6fb
parent105726f8e4363b0a3bd1bae1979be7a7244e7a89 (diff)
downloadcatch3-b7f705482837eb24fc500e445762482fc4ebea46.tar.gz
Fix harmless but annoying MSVC warnings.
Suppress catch.hpp(1760) : warning C4512: 'Catch::TagExtracter' : assignment operator could not be generated catch.hpp(1864) : warning C4512: 'Catch::TagExpressionParser' : assignment operator could not be generated warnings given by MSVC 9 (and probably other version too) compiler with /W4 switch. The warnings are given because the compiler can't synthesize the assignment operators for the classes with members of reference type, so simply explicitly declare (without defining) these operators ourselves to suppress them.
-rw-r--r--include/internal/catch_tags.hpp8
-rw-r--r--single_include/catch.hpp10
2 files changed, 17 insertions, 1 deletions
diff --git a/include/internal/catch_tags.hpp b/include/internal/catch_tags.hpp
index d6060022..c30d6e71 100644
--- a/include/internal/catch_tags.hpp
+++ b/include/internal/catch_tags.hpp
@@ -74,6 +74,10 @@ namespace Catch {
m_remainder += c;
}
+ // Suppress assignment operator to avoid warnings from MSVC saying that
+ // it can't be implicitly synthesized.
+ TagExtracter& operator=(const TagExtracter&);
+
std::set<std::string>& m_tags;
std::string m_remainder;
};
@@ -177,6 +181,10 @@ namespace Catch {
m_exp.m_tagSets.push_back( m_currentTagSet );
}
+ // Suppress assignment operator to avoid warnings from MSVC saying that
+ // it can't be implicitly synthesized.
+ TagExpressionParser& operator=(const TagExpressionParser&);
+
bool m_isNegated;
TagSet m_currentTagSet;
TagExpression& m_exp;
diff --git a/single_include/catch.hpp b/single_include/catch.hpp
index dca88476..85a3d805 100644
--- a/single_include/catch.hpp
+++ b/single_include/catch.hpp
@@ -1,5 +1,5 @@
/*
- * Generated: 2012-10-12 18:17:54.059305
+ * Generated: 2012-10-31 19:15:51.281013
* ----------------------------------------------------------
* This file has been merged from multiple headers. Please don't edit it directly
* Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
@@ -1755,6 +1755,10 @@ namespace Catch {
m_remainder += c;
}
+ // Suppress assignment operator to avoid warnings from MSVC saying that
+ // it can't be implicitly synthesized.
+ TagExtracter& operator=(const TagExtracter&);
+
std::set<std::string>& m_tags;
std::string m_remainder;
};
@@ -1858,6 +1862,10 @@ namespace Catch {
m_exp.m_tagSets.push_back( m_currentTagSet );
}
+ // Suppress assignment operator to avoid warnings from MSVC saying that
+ // it can't be implicitly synthesized.
+ TagExpressionParser& operator=(const TagExpressionParser&);
+
bool m_isNegated;
TagSet m_currentTagSet;
TagExpression& m_exp;