Skip to content
Snippets Groups Projects
Commit 93a34ce4 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

std: remove not needed string extension

parent 1ababefc
No related branches found
No related tags found
1 merge request!207Merge jt
Pipeline #172649 passed with warnings
...@@ -27,91 +27,6 @@ ...@@ -27,91 +27,6 @@
   
namespace ext { namespace ext {
   
/**
* Class extending the set class from the standard library. Original reason is to allow printing of the container with overloaded operator <<.
*
* The class mimics the behavior of the set from the standard library.
*
*/
class string : public std::string {
public:
/**
* Inherit constructors of the standard set
*/
using std::string::string; // NOLINT(modernize-use-equals-default)
/**
* Inherit operator = of the standard set
*/
using std::string::operator =;
#ifndef __clang__
/**
* Default constructor needed by g++ since it is not inherited
*/
string ( ) = default;
/**
* Copy constructor needed by g++ since it is not inherited
*/
string ( const string & other ) = default;
/**
* Move constructor needed by g++ since it is not inherited
*/
string ( string && other ) = default;
/**
* Copy operator = needed by g++ since it is not inherited
*/
string & operator = ( string && other ) = default;
/**
* Move operator = needed by g++ since it is not inherited
*/
string & operator = ( const string & other ) = default;
#endif
/**
* \brief
* Constructor from standard string.
*
* \param the standard string
*/
explicit string ( const std::string & other ) noexcept : std::string ( other ) {
}
/**
* \brief
* Constructor from standard string.
*
* \param the standard string
*/
explicit string ( std::string && other ) noexcept : std::string ( std::move ( other ) ) {
}
/**
* \brief
* Assignment from standard string.
*
* \param the standard string
*/
string & operator = ( std::string && other ) noexcept {
static_cast < std::string & > ( * this ) = std::move ( other );
return * this;
}
/**
* \brief
* Assignment from standard string.
*
* \param the standard string
*/
string & operator = ( const std::string & other ) noexcept {
static_cast < std::string & > ( * this ) = other;
return * this;
}
};
/** /**
* \brief * \brief
* To string method designated for objects that can be casted to string. * To string method designated for objects that can be casted to string.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment