Skip to content

Commit

Permalink
provide std::hash for ObjectFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
whoozle committed Mar 17, 2020
1 parent 035d521 commit 8018093
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mtp/ptp/ObjectFormat.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,10 @@ namespace mtp

}

namespace std
{
template<> struct hash<mtp::ObjectFormat>
{ public: size_t operator()(mtp::ObjectFormat format) const { return static_cast<size_t>(format); } };
}

#endif

0 comments on commit 8018093

Please sign in to comment.