forked from catchorg/Catch2
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
This commit is contained in:
@@ -66,11 +66,18 @@ namespace Catch {
|
||||
endElement();
|
||||
}
|
||||
|
||||
# ifndef CATCH_CPP11_OR_GREATER
|
||||
XmlWriter& operator = ( XmlWriter const& other ) {
|
||||
XmlWriter temp( other );
|
||||
swap( temp );
|
||||
return *this;
|
||||
}
|
||||
# else
|
||||
XmlWriter( XmlWriter const& ) = default;
|
||||
XmlWriter( XmlWriter && ) = default;
|
||||
XmlWriter& operator = ( XmlWriter const& ) = default;
|
||||
XmlWriter& operator = ( XmlWriter && ) = default;
|
||||
# endif
|
||||
|
||||
void swap( XmlWriter& other ) {
|
||||
std::swap( m_tagIsOpen, other.m_tagIsOpen );
|
||||
|
||||
Reference in New Issue
Block a user