Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a function to get property list from object #629

Merged
merged 11 commits into from
Nov 3, 2022
Merged
9 changes: 3 additions & 6 deletions include/highfive/H5PropertyList.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ T get_plist(const U& obj, hid_t (*f)(hid_t)) {
if (hid < 0) {
HDF5ErrMapper::ToException<PropertyException>(std::string("Unable to get property list"));
}
return T{hid};
T t{};
t._hid = hid;
return t;
}

///
Expand All @@ -64,9 +66,6 @@ class PropertyListBase: public Object {
return plist;
}

protected:
using Object::Object;

alkino marked this conversation as resolved.
Show resolved Hide resolved
private:
template <typename T, typename U>
friend T get_plist(const U&, hid_t (*f)(hid_t));
alkino marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -99,8 +98,6 @@ class PropertyList: public PropertyListBase {
}

protected:
using PropertyListBase::PropertyListBase;

void _initializeIfNeeded();
};

Expand Down