Allow using vector with classes without default ctor in C too
This is similar to be491506a (Java std::vector improvements for types
that do not have a default constructor., 2019-03-01) for Java, except we
don't have to bother with any compatibility constraints for this, not
yet used by anyone. module.
This commit is contained in:
parent
5cbdae42d3
commit
3dd96d5b95
3 changed files with 1 additions and 3 deletions
|
|
@ -76,7 +76,6 @@ FAILING_CPP_TESTS := \
|
||||||
multiple_inheritance_shared_ptr \
|
multiple_inheritance_shared_ptr \
|
||||||
nested_class \
|
nested_class \
|
||||||
smart_pointer_template_defaults_overload \
|
smart_pointer_template_defaults_overload \
|
||||||
stl_no_default_constructor \
|
|
||||||
template_basic \
|
template_basic \
|
||||||
template_default \
|
template_default \
|
||||||
template_enum \
|
template_enum \
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ struct NoDefaultCtor {
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
#if defined(SWIGCSHARP) || defined(SWIGJAVA) || defined(SWIGD)
|
#if defined(SWIGC) || defined(SWIGCSHARP) || defined(SWIGJAVA) || defined(SWIGD)
|
||||||
%template(VectorNoDefaultCtor) std::vector<NoDefaultCtor>;
|
%template(VectorNoDefaultCtor) std::vector<NoDefaultCtor>;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@ namespace std {
|
||||||
typedef const value_type& const_reference;
|
typedef const value_type& const_reference;
|
||||||
|
|
||||||
vector();
|
vector();
|
||||||
vector(size_type n);
|
|
||||||
vector(const vector& other);
|
vector(const vector& other);
|
||||||
|
|
||||||
size_type size() const;
|
size_type size() const;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue