forked from boostorg/static_string
committed by
Alan de Freitas
parent
9c3d5febe7
commit
82ff4e0679
@ -1319,7 +1319,7 @@ public:
|
||||
basic_static_string&
|
||||
assign(const basic_static_string& s) noexcept
|
||||
{
|
||||
if (this == &s)
|
||||
if (data() == s.data())
|
||||
return *this;
|
||||
return assign_unchecked(s.data(), s.size());
|
||||
}
|
||||
|
@ -674,6 +674,13 @@ testAssignment()
|
||||
|
||||
s_long.assign(s_long.data() + 2, 8);
|
||||
BOOST_TEST(s_long == "rem ipsu");
|
||||
|
||||
// issue #41
|
||||
{
|
||||
boost::static_strings::static_string<0> a;
|
||||
auto b = a;
|
||||
BOOST_TEST(b == "");
|
||||
}
|
||||
}
|
||||
|
||||
// done
|
||||
|
Reference in New Issue
Block a user