Skip to content

Commit

Permalink
Fix vector constructor ambiguity in H5DataType.hpp (#775)
Browse files Browse the repository at this point in the history
Updated the code in H5DataType.hpp to fix the compilation error caused by a vector constructor ambiguity when _GLIBCXX_DEBUG is defined. Replaced std::vector<member_def>({t_members}) with std::vector<member_def>(t_members) to eliminate unnecessary copy constructor calls.
  • Loading branch information
hn-sl committed Jun 20, 2023
1 parent f53d0eb commit 64b7ad9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/highfive/H5DataType.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class EnumType: public DataType {
}

EnumType(std::initializer_list<member_def> t_members)
: EnumType(std::vector<member_def>({t_members})) {}
: EnumType(std::vector<member_def>(t_members)) {}

/// \brief Commit datatype into the given Object
/// \param object Location to commit object into
Expand Down

0 comments on commit 64b7ad9

Please sign in to comment.