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
Design and implement a way to copy containers that maintains the capacity of the right-hand-size. For example (psedo-ish code):
template<typename LHST, typename RHST> LHST capacity_copy_construct(const RHST& rhs) { // default implementation LHST a{ rhs }; a.reserve(rhs.capacity()); return a; } template<> cetl::VariableLengthArray<std::size_t> capacity_copy_construct<std::vector<std::size_t>, std::vector<std::size_t>>(const std::vector<std::size_t>& rhs) { // do special stuff here to copy construct VLA with the rhs.capacity() }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Design and implement a way to copy containers that maintains the capacity of the right-hand-size. For example (psedo-ish code):
The text was updated successfully, but these errors were encountered: