1257 {
1258 if (this == &other) return;
1259
1261 bool otherInline = other.isInline();
1262
1263 if (!thisInline && !otherInline) {
1264
1267 } else if (thisInline && otherInline) {
1268
1270 bool otherFits =
mLength + 1 <= other.mInlineCapacity;
1271 if (thisFits && otherFits) {
1272
1274 for (fl::size i = 0; i <= maxLen; ++i) {
1277 other.inlineBufferPtr()[i] = tmp;
1278 }
1280 } else {
1281
1287 fl::size otherLen = other.mLength;
1288 if (thisFits) {
1291 } else {
1293 }
1295 if (otherFits) {
1296 other.mStorage.reset();
1297 fl::memcpy(other.inlineBufferPtr(), thisData->data(), thisLen + 1);
1298 } else {
1299 other.mStorage = thisData;
1300 }
1301 other.mLength = thisLen;
1302 }
1303 } else if (thisInline) {
1304
1306
1309
1310 other.mStorage.reset();
1311 if (thisLen + 1 <= other.mInlineCapacity) {
1313 } else {
1316 }
1317 other.mLength = thisLen;
1318 } else {
1319
1320 other.swapWith(*this);
1321 }
1322}
char * inlineBufferPtr() FL_NO_EXCEPT
bool isInline() const FL_NO_EXCEPT
fl::variant< NotNullStringHolderPtr, ConstLiteral, ConstView > mStorage
constexpr common_type_t< T, U > max(T a, U b) FL_NO_EXCEPT
void swap(array< T, N > &lhs, array< T, N > &rhs) FL_NO_EXCEPT
constexpr remove_reference< T >::type && move(T &&t) FL_NO_EXCEPT
fl::not_null< StringHolderPtr > NotNullStringHolderPtr
void * memcpy(void *dest, const void *src, size_t n) FL_NO_EXCEPT
shared_ptr< T > make_shared(Args &&... args) FL_NO_EXCEPT