Skip to content

Commit

Permalink
mac clang workaround for inheriting base constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
diablodale committed Jun 8, 2023
1 parent 2ae8877 commit 0aaf58a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/pc/protocols/wrap_libusb.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ class unique_resource_ptr : public std::unique_ptr<Resource, unique_resource_del
using _base = std::unique_ptr<Resource, unique_resource_deleter<Resource, Dispose>>;

public:
// inherit base constructors
using _base::unique_ptr;
// inherit base constructors, long form due to Clang fail using _base
using std::unique_ptr<Resource, unique_resource_deleter<Resource, Dispose>>::unique_ptr;

// delete base unique_resource_ptr constructors that would conflict with ref counts
unique_resource_ptr(typename _base::pointer, const typename _base::deleter_type &) = delete;
Expand Down Expand Up @@ -214,8 +214,8 @@ class device_handle : public unique_resource_ptr<libusb_device_handle, libusb_cl
// constructors
////////////////

// inherit base constructors
using _base::unique_resource_ptr;
// inherit base constructors, long form due to Clang fail using _base
using unique_resource_ptr<libusb_device_handle, libusb_close>::unique_resource_ptr;

/// @brief Create a device_handle from a raw libusb_device_handle*
/// @param handle raw libusb_device_handle* to wrap and manage ownership
Expand Down Expand Up @@ -504,8 +504,8 @@ class usb_device : public unique_resource_ptr<libusb_device, libusb_unref_device
using _base = unique_resource_ptr<libusb_device, libusb_unref_device>;

public:
// inherit base constructors
using _base::unique_resource_ptr;
// inherit base constructors, long form due to Clang fail using _base
using unique_resource_ptr<libusb_device, libusb_unref_device>::unique_resource_ptr;

/// @brief construct a usb_device from a raw libusb_device* pointer and shares ownership
/// @param ptr raw libusb_device* pointer
Expand Down

0 comments on commit 0aaf58a

Please sign in to comment.