Skip to content

Commit ee011c3

Browse files
committed
Fix build failure on C++20
1 parent 79eb493 commit ee011c3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/include/FlashString/Object.hpp

+5
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,15 @@ template <class ObjectType, typename ElementType> class Object : public ObjectBa
103103
using DataPtrType = const ElementType*;
104104
using Iterator = ObjectIterator<ObjectType, ElementType>;
105105

106+
// This is precautionary to prevent misuse. No known fix for C++20
107+
// NB. esp-quick-toolchain 10.3 reports 201703L for C++17,
108+
// and 201709L for C++20 - standard says 202002L.
109+
#if __cplusplus <= 201703L
106110
Object(const Object&) = delete;
107111
Object(const Object&&) = delete;
108112
Object& operator=(const Object&) = delete;
109113
Object& operator=(const Object&&) = delete;
114+
#endif
110115

111116
Iterator begin() const
112117
{

0 commit comments

Comments
 (0)