Fix flat_list: destructor hack should only compile for types with nontrivial destructor
This commit is contained in:
parent
76c465903b
commit
8ea508ee20
1 changed files with 20 additions and 18 deletions
|
|
@ -169,7 +169,8 @@ namespace psemek::util
|
|||
first_ = null;
|
||||
return;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (size_ == 0)
|
||||
{
|
||||
nodes_.reset();
|
||||
|
|
@ -193,6 +194,7 @@ namespace psemek::util
|
|||
size_ = 0;
|
||||
first_ = null;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T, typename Handle>
|
||||
void flat_list<T, Handle>::swap(flat_list & other)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue