Skip to content

Instantly share code, notes, and snippets.

@vinniefalco
Created November 13, 2019 14:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vinniefalco/58777dc0cd2c0c042340a44215907e52 to your computer and use it in GitHub Desktop.
Save vinniefalco/58777dc0cd2c0c042340a44215907e52 to your computer and use it in GitHub Desktop.
#ifndef BOOST_NO_EXCEPTIONS
try
{
#endif
string_impl tmp(t->size, sp);
std::memcpy(
tmp.data(),
data(),
size());
destroy(sp);
*this = tmp;
#ifndef BOOST_NO_EXCEPTIONS
}
catch(std::exception const&)
{
// eat the exception
}
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment