From 48f2d71a2778075da792e2236c2533342132bb0c Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Wed, 27 Nov 2024 13:27:29 +0100 Subject: [PATCH] [#264] Fix accessability of 'FileDescriptorView' methods --- .../cxx/include/iox2/file_descriptor.hpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/iceoryx2-ffi/cxx/include/iox2/file_descriptor.hpp b/iceoryx2-ffi/cxx/include/iox2/file_descriptor.hpp index 2c0ee692c..1c7bfe963 100644 --- a/iceoryx2-ffi/cxx/include/iox2/file_descriptor.hpp +++ b/iceoryx2-ffi/cxx/include/iox2/file_descriptor.hpp @@ -35,15 +35,7 @@ class FileDescriptorBased { /// A view to a [`FileDescriptor`]. class FileDescriptorView : public FileDescriptorBased { - private: - template - friend class WaitSet; - friend class FileDescriptor; - template - friend class Listener; - - explicit FileDescriptorView(iox2_file_descriptor_ptr handle); - + public: /// Returns a [`FileDescriptorView`] to the underlying [`FileDescriptor`]. auto file_descriptor() const -> FileDescriptorView override; @@ -57,6 +49,15 @@ class FileDescriptorView : public FileDescriptorBased { /// auto unsafe_native_handle() const -> int32_t; + private: + template + friend class WaitSet; + friend class FileDescriptor; + template + friend class Listener; + + explicit FileDescriptorView(iox2_file_descriptor_ptr handle); + iox2_file_descriptor_ptr m_handle = nullptr; };