Skip to content

Commit

Permalink
Merge pull request #252 from SofaDefrost/vectorInitializer
Browse files Browse the repository at this point in the history
[SofaKernel] ADD brace initializer to helper::vector class
  • Loading branch information
damienmarchal authored Apr 28, 2017
2 parents db05d30 + 44e900f commit adc7d9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SofaKernel/framework/sofa/helper/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ class vector<T, CPUMemoryManager<T> > : public std::vector<T, std::allocator<T>
explicit vector(size_type n): std::vector<T,Alloc>(n) {}
/// Constructor
vector(const std::vector<T, Alloc>& x): std::vector<T,Alloc>(x) {}
/// Brace initalizer constructor
vector(const std::initializer_list<T>& t) : std::vector<T,Alloc>(t) {}
/// Move constructor
vector(std::vector<T,Alloc>&& v): std::vector<T,Alloc>(std::move(v)) {}

/// Copy operator
vector<T, Alloc>& operator=(const std::vector<T, Alloc>& x)
{
Expand Down

0 comments on commit adc7d9c

Please sign in to comment.