@@ -394,8 +394,7 @@ template <class Derived, typename FileType> class FileMemberAccess {
394394#undef FSAPI_FUNCTION_GROUP
395395
396396#define FSAPI_FUNCTION_GROUP (QUAL ) \
397- template <typename Type> \
398- auto QUAL ioctl (int request, Type *arg = nullptr ) QUAL { \
397+ template <typename Type> auto QUAL ioctl (int request, Type *arg) QUAL { \
399398 m_file.ioctl (request, arg); \
400399 return static_cast <Derived QUAL >(*this ); \
401400 }
@@ -404,13 +403,20 @@ template <class Derived, typename FileType> class FileMemberAccess {
404403 FSAPI_FUNCTION_GROUP (&&)
405404#undef FSAPI_FUNCTION_GROUP
406405
406+ #define FSAPI_FUNCTION_GROUP (QUAL ) \
407+ auto QUAL ioctl (int request) QUAL { \
408+ m_file.ioctl (request); \
409+ return static_cast <Derived QUAL >(*this ); \
410+ }
411+ FSAPI_FUNCTION_GROUP (const &)
412+ FSAPI_FUNCTION_GROUP (&)
413+ FSAPI_FUNCTION_GROUP (&&)
414+ #undef FSAPI_FUNCTION_GROUP
415+
407416 const FileType &file () const { return m_file; }
408417 FileType &file () { return m_file; }
409418
410- private:
411- // This should not be moved during move operations
412- // the file it points to will move the fd from the temporary
413- // to the new location and this will point to the new location
419+ protected:
414420 FileType m_file;
415421}; // namespace fs
416422
0 commit comments