We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
template <class Iter, typename std::enable_if< mystl::is_input_iterator::value, int>::type = 0> hashtable(Iter first, Iter last, size_type bucket_count, const Hash& hash = Hash(), const KeyEqual& equal = KeyEqual()) :size_(mystl::distance(first, last)), mlf_(1.0f), hash_(hash), equal_(equal) { init(mystl::max(bucket_count, static_cast<size_type>(mystl::distance(first, last)))); } 这段代码,这个init()明显就没有复制[first,last)的内容
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
是的,这里应该要做一次copy insert的,而且还得加上是否multi的判断
No branches or pull requests
template <class Iter, typename std::enable_if<
mystl::is_input_iterator::value, int>::type = 0>
hashtable(Iter first, Iter last,
size_type bucket_count,
const Hash& hash = Hash(),
const KeyEqual& equal = KeyEqual())
:size_(mystl::distance(first, last)), mlf_(1.0f), hash_(hash), equal_(equal)
{
init(mystl::max(bucket_count, static_cast<size_type>(mystl::distance(first, last))));
}
这段代码,这个init()明显就没有复制[first,last)的内容
The text was updated successfully, but these errors were encountered: