ReadLockedPointer
-
When compiling 3.5-dev, I get this strange compilation errors:
../src/Platform/Platform.cpp:4047:77: error: no matching function for call to 'ReadLockedPointer<const char>::ReadLockedPointer(ReadWriteLock&, const char*)'
4047 | return ReadLockedPointer<const char>(sysDirLock, InternalGetSysDir());
| ^
\src/RTOSIface/RTOSIface.h:480:9: note: candidate: 'ReadLockedPointer<T>::ReadLockedPointer(ReadLockedPointer<T>&&) [with T = const char]'
480 | ReadLockedPointer(ReadLockedPointer<T>&& other) noexcept : locker(std::move(other.locker)), ptr(other.ptr) { other.ptr = nullptr; }
| ^~~~~~~~~~~~~~~~~
/RTOSIface/RTOSIface.h:480:9: note: candidate expects 1 argument, 2 provided
RTOSIface/RTOSIface.h:479:9: note: candidate: 'ReadLockedPointer<T>::ReadLockedPointer(std::nullptr_t, T*) [with T = const char; std::nullptr_t = std::nullptr_t]'
479 | ReadLockedPointer(std::nullptr_t, T* p_ptr) noexcept : locker(nullptr), ptr(p_ptr) { }
| ^~~~~~~~~~~~~~~~~
\src/RTOSIface/RTOSIface.h:479:27: note: no known conversion for argument 1 from 'ReadWriteLock' to 'std::nullptr_t'
479 | ReadLockedPointer(std::nullptr_t, T* p_ptr) noexcept : locker(nullptr), ptr(p_ptr) { }
| ^~~~~~~~~~~~~~
\src/RTOSIface/RTOSIface.h:478:9: note: candidate: 'ReadLockedPointer<T>::ReadLockedPointer(ReadLocker&, T*) [with T = const char]'
478 | ReadLockedPointer(ReadLocker& p_locker, T* p_ptr) noexcept : locker(std::move(p_locker)), ptr(p_ptr) { }
| ^~~~~~~~~~~~~~~~~
\RRFLibraries\src/RTOSIface/RTOSIface.h:478:39: note: no known conversion for argument 1 from 'ReadWriteLock' to 'ReadLocker&'
478 | ReadLockedPointer(ReadLocker& p_locker, T* p_ptr) noexcept : locker(std::move(p_locker)), ptr(p_ptr) { }
| ~~~~~~~^
make[1]: *** [src/Platform/Platform.o] Error 1
make[1]: *** Waiting for unfinished jobs....Has someone experienced the same ?
=> etc....
-
@joergs5 I found a workaround (half an hour after writing this thread - that's typical...)
RRFLibraries 3.4-dev is newer than 3.5-dev, so I copied the .h file from 3.4 to 3.5, it compiles ok now. I can live with this workaround.
If someone fells over the next trap like me, errors about WifiAuth, this is because the changed MessageFormats.h of ...WifiSocketServer...-dev is needed to compile.
-
-