forked from boostorg/static_string
Fix weird clang link error
This commit is contained in:
@ -927,7 +927,14 @@ public:
|
|||||||
*/
|
*/
|
||||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||||
basic_static_string&
|
basic_static_string&
|
||||||
assign(const basic_static_string& s) noexcept;
|
assign(const basic_static_string& s) noexcept
|
||||||
|
{
|
||||||
|
if (this == &s)
|
||||||
|
return *this;
|
||||||
|
this->set_size(s.size());
|
||||||
|
traits_type::copy(data(), &s.data()[0], size() + 1);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
/** Replace the contents.
|
/** Replace the contents.
|
||||||
|
|
||||||
@ -942,8 +949,8 @@ public:
|
|||||||
assign(const basic_static_string<M, CharT, Traits>& s)
|
assign(const basic_static_string<M, CharT, Traits>& s)
|
||||||
{
|
{
|
||||||
// VFALCO this could come in two flavors,
|
// VFALCO this could come in two flavors,
|
||||||
// N>M and N<M, and skip the exception
|
// N > M and N < M, and skip the exception
|
||||||
// check when N>M
|
// check when N > M
|
||||||
return assign(s.data(), s.size());
|
return assign(s.data(), s.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4781,19 +4788,19 @@ assign(
|
|||||||
return term();
|
return term();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<std::size_t N, typename CharT, typename Traits>
|
//template<std::size_t N, typename CharT, typename Traits>
|
||||||
BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
//BOOST_STATIC_STRING_CPP14_CONSTEXPR
|
||||||
auto
|
//auto
|
||||||
basic_static_string<N, CharT, Traits>::
|
//basic_static_string<N, CharT, Traits>::
|
||||||
assign(const basic_static_string& s) noexcept ->
|
//assign(const basic_static_string& s) noexcept ->
|
||||||
basic_static_string&
|
// basic_static_string&
|
||||||
{
|
//{
|
||||||
if(this == &s)
|
// if(this == &s)
|
||||||
return *this;
|
// return *this;
|
||||||
this->set_size(s.size());
|
// this->set_size(s.size());
|
||||||
traits_type::copy(data(), &s.data()[0], size() + 1);
|
// traits_type::copy(data(), &s.data()[0], size() + 1);
|
||||||
return *this;
|
// return *this;
|
||||||
}
|
//}
|
||||||
|
|
||||||
template<std::size_t N, typename CharT, typename Traits>
|
template<std::size_t N, typename CharT, typename Traits>
|
||||||
template<std::size_t M>
|
template<std::size_t M>
|
||||||
|
@ -7042,37 +7042,37 @@ testOperatorPlus()
|
|||||||
BOOST_TEST(res.size() == 10);
|
BOOST_TEST(res.size() == 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
//// operator+(static_string, CharT)
|
// operator+(static_string, CharT)
|
||||||
//{
|
{
|
||||||
// auto res = s1 + '!';
|
auto res = s1 + '!';
|
||||||
// BOOST_TEST(res == "hello!");
|
BOOST_TEST(res == "hello!");
|
||||||
// BOOST_TEST(res.capacity() == 11);
|
BOOST_TEST(res.capacity() == 11);
|
||||||
// BOOST_TEST(res.size() == 6);
|
BOOST_TEST(res.size() == 6);
|
||||||
//}
|
}
|
||||||
|
|
||||||
//// operator+(CharT, static_string)
|
// operator+(CharT, static_string)
|
||||||
//{
|
{
|
||||||
// auto res = '!' + s1;
|
auto res = '!' + s1;
|
||||||
// BOOST_TEST(res == "!hello");
|
BOOST_TEST(res == "!hello");
|
||||||
// BOOST_TEST(res.capacity() == 11);
|
BOOST_TEST(res.capacity() == 11);
|
||||||
// BOOST_TEST(res.size() == 6);
|
BOOST_TEST(res.size() == 6);
|
||||||
//}
|
}
|
||||||
|
|
||||||
//// operator+(static_string, CharT(&)[N])
|
// operator+(static_string, CharT(&)[N])
|
||||||
//{
|
{
|
||||||
// auto res = s1 + "world";
|
auto res = s1 + "world";
|
||||||
// BOOST_TEST(res == "helloworld");
|
BOOST_TEST(res == "helloworld");
|
||||||
// BOOST_TEST(res.capacity() == 15);
|
BOOST_TEST(res.capacity() == 15);
|
||||||
// BOOST_TEST(res.size() == 10);
|
BOOST_TEST(res.size() == 10);
|
||||||
//}
|
}
|
||||||
|
|
||||||
//// operator+(CharT(&)[N], static_string)
|
// operator+(CharT(&)[N], static_string)
|
||||||
//{
|
{
|
||||||
// auto res = "hello" + s2;
|
auto res = "hello" + s2;
|
||||||
// BOOST_TEST(res == "helloworld");
|
BOOST_TEST(res == "helloworld");
|
||||||
// BOOST_TEST(res.capacity() == 15);
|
BOOST_TEST(res.capacity() == 15);
|
||||||
// BOOST_TEST(res.size() == 10);
|
BOOST_TEST(res.size() == 10);
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Reference in New Issue
Block a user