You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Though std::vector<member_def>({t_members}) is valid when _GLIBCXX_DEBUG is not defined, I think it is better to update it to std::vector<member_def>(t_members).
The current code std::vector<member_def>({t_members}) creates a temporary vector from {t_members} and calls the move constructor unnecessarily. Since t_members is already of type std::initializer_list<member_def>, directly passing it to the constructor of std::vector<member_def> will resolve this issue.
The text was updated successfully, but these errors were encountered:
This code produce following compilation error when tested with gcc 11.3.0.
Though
std::vector<member_def>({t_members})
is valid when _GLIBCXX_DEBUG is not defined, I think it is better to update it tostd::vector<member_def>(t_members)
.The current code
std::vector<member_def>({t_members})
creates a temporary vector from{t_members}
and calls the move constructor unnecessarily. Sincet_members
is already of typestd::initializer_list<member_def>
, directly passing it to the constructor ofstd::vector<member_def>
will resolve this issue.The text was updated successfully, but these errors were encountered: