Skip to content

Commit

Permalink
Fix build failure on C++20
Browse files Browse the repository at this point in the history
  • Loading branch information
mikee47 committed Sep 14, 2024
1 parent 79eb493 commit 21d87cc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/include/FlashString/Object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,13 @@ template <class ObjectType, typename ElementType> class Object : public ObjectBa
using DataPtrType = const ElementType*;
using Iterator = ObjectIterator<ObjectType, ElementType>;

// This is precautionary to prevent misuse. No known fix for C++20.
#if __cplusplus < 202002L
Object(const Object&) = delete;
Object(const Object&&) = delete;
Object& operator=(const Object&) = delete;
Object& operator=(const Object&&) = delete;
#endif

Iterator begin() const
{
Expand Down

0 comments on commit 21d87cc

Please sign in to comment.