mirror of https://github.com/swig/swig
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
|
@ -76,7 +76,6 @@ FAILING_CPP_TESTS := \
|
|||
multiple_inheritance_shared_ptr \
|
||||
nested_class \
|
||||
smart_pointer_template_defaults_overload \
|
||||
stl_no_default_constructor \
|
||||
template_basic \
|
||||
template_default \
|
||||
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>;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@ namespace std {
|
|||
typedef const value_type& const_reference;
|
||||
|
||||
vector();
|
||||
vector(size_type n);
|
||||
vector(const vector& other);
|
||||
|
||||
size_type size() const;
|
||||
|
|
Loading…
Reference in New Issue