Skip to content
New issue

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

fix list constructor #55

Merged
merged 1 commit into from
Sep 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions include/eixx/marshal/list.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,11 @@ class list : protected alloc_base<cons<Alloc>, Alloc> {
///
/// When a_estimated_size is 0, an empty initialized list is created. Otherwise,
/// the list is not initialized.
explicit list(int a_estimated_size, const Alloc& alloc = Alloc()) {
explicit list(int a_estimated_size, const Alloc& alloc = Alloc())
: list((size_t)a_estimated_size, alloc)
{
if (a_estimated_size < 0)
throw err_bad_argument("List too short");
list((size_t)a_estimated_size, alloc);
}

/// Construct a list with a given estimated size.
Expand Down