This PR removes copy support from the FlashString library. Doing so simplifies the code, improves performance and portability to other compilers (e.g. clang).
The FlashString library previously supported copies (references) like this::
These will now fail to compile.
Copy construction and assignment has been explicitly deleted so avoid unintentional side-effects.
Objects should always be passed by reference.
This change has the additional benefit of catching pass-by-copy errors. These function/method templates have been fixed:
This PR removes copy support from the FlashString library. Doing so simplifies the code, improves performance and portability to other compilers (e.g. clang).
The FlashString library previously supported copies (references) like this::
These will now fail to compile. Copy construction and assignment has been explicitly deleted so avoid unintentional side-effects. Objects should always be passed by reference.
This change has the additional benefit of catching pass-by-copy errors. These function/method templates have been fixed:
fileSetContent
IFS::File::setAttribute
IFS::FileSystem::setUserAttribute
IFS::ArchiveStream::setUserAttribute