Fix static_string not allowing move construction
This commit is contained in:
parent
8d51604f02
commit
72f8c0d592
@ -149,8 +149,8 @@ namespace rexy{
|
|||||||
~static_string(void) = default;
|
~static_string(void) = default;
|
||||||
|
|
||||||
static_string& operator=(const char* c);
|
static_string& operator=(const char* c);
|
||||||
static_string& operator=(const static_string& s);
|
constexpr static_string& operator=(const static_string& s);
|
||||||
static_string& operator=(static_string&&) = delete;
|
constexpr static_string& operator=(static_string&&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -240,6 +240,16 @@ namespace rexy{
|
|||||||
string_base(s.m_data, s.m_length, s.m_length){}
|
string_base(s.m_data, s.m_length, s.m_length){}
|
||||||
constexpr static_string::static_string(static_string&& s):
|
constexpr static_string::static_string(static_string&& s):
|
||||||
string_base(s.m_data, s.m_length, s.m_length){}
|
string_base(s.m_data, s.m_length, s.m_length){}
|
||||||
|
constexpr static_string& static_string::operator=(const static_string& s){
|
||||||
|
m_data = s.m_data;
|
||||||
|
m_length = s.m_length;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
constexpr static_string& static_string::operator=(static_string&& s){
|
||||||
|
m_data = s.m_data;
|
||||||
|
m_length = s.m_length;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
namespace detail{
|
namespace detail{
|
||||||
template<class Targ>
|
template<class Targ>
|
||||||
|
|||||||
@ -40,10 +40,5 @@ namespace rexy{
|
|||||||
m_length = strlen(c);
|
m_length = strlen(c);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
static_string& static_string::operator=(const static_string& s){
|
|
||||||
m_data = s.m_data;
|
|
||||||
m_length = s.m_length;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user