Correct unordered_set/unordered_multiset template Key parameter name
This commit is contained in:
parent
404aa2c3db
commit
4a25ddbb97
7 changed files with 80 additions and 80 deletions
|
|
@ -7,9 +7,9 @@
|
|||
%fragment("StdUnorderedSetTraits","header",fragment="<stddef.h>",fragment="StdSetTraits")
|
||||
%{
|
||||
namespace swig {
|
||||
template <class RubySeq, class T>
|
||||
template <class RubySeq, class Key>
|
||||
inline void
|
||||
assign(const RubySeq& rubyseq, std::unordered_set<T>* seq) {
|
||||
assign(const RubySeq& rubyseq, std::unordered_set<Key>* seq) {
|
||||
// seq->insert(rubyseq.begin(), rubyseq.end()); // not used as not always implemented
|
||||
typedef typename RubySeq::value_type value_type;
|
||||
typename RubySeq::const_iterator it = rubyseq.begin();
|
||||
|
|
@ -18,17 +18,17 @@
|
|||
}
|
||||
}
|
||||
|
||||
template <class T>
|
||||
struct traits_asptr<std::unordered_set<T> > {
|
||||
static int asptr(VALUE obj, std::unordered_set<T> **s) {
|
||||
return traits_asptr_stdseq<std::unordered_set<T> >::asptr(obj, s);
|
||||
template <class Key>
|
||||
struct traits_asptr<std::unordered_set<Key> > {
|
||||
static int asptr(VALUE obj, std::unordered_set<Key> **s) {
|
||||
return traits_asptr_stdseq<std::unordered_set<Key> >::asptr(obj, s);
|
||||
}
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct traits_from<std::unordered_set<T> > {
|
||||
static VALUE from(const std::unordered_set<T>& vec) {
|
||||
return traits_from_stdseq<std::unordered_set<T> >::from(vec);
|
||||
template <class Key>
|
||||
struct traits_from<std::unordered_set<Key> > {
|
||||
static VALUE from(const std::unordered_set<Key>& vec) {
|
||||
return traits_from_stdseq<std::unordered_set<Key> >::from(vec);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue