Tidy up test and docs on template double brackets

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@13845 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-09-21 05:53:44 +00:00
commit e8deb880c2
2 changed files with 13 additions and 12 deletions

View file

@ -346,14 +346,6 @@ shift operator &gt;&gt; otherwise.</p>
std::vector&lt;std::vector&lt;int&gt;&gt; myIntTable;
</pre></div>
<p>The bit shifting operator using the parenthesis
around the expressions can be forced. For example</p>
<div class="code"><pre>
template&lt;(5&gt;&gt;3)&gt;
class A {};
</pre></div>
<H3><a name="Cpp0x_Explicit_conversion_operators"></a>7.2.14 Explicit conversion operators</H3>

View file

@ -5,14 +5,23 @@
%module cpp0x_template_double_brackets
%inline %{
#include <map>
std::map<int,std::map<int, double>> m;
std::map< int,std::map<int, double> > n;
std::map<int,std::map<int, double>> map1;
std::map< int,std::map<int, double> > map2;
std::map<int,std::map<int, std::map<int, double>>> map3;
std::map<int,std::map<int, std::map<int, std::map<int, double>>>> map4;
%}
// Check streaming operators are still okay
%rename(ExtractionOperator) operator>>;
%rename(InsertionOperator) operator<<;
%inline %{
class ABC {
public:
int a;
int operator>>(ABC &);
int operator<<(ABC &);
int operator>>(ABC &) { return 0; }
int operator<<(ABC &) { return 0; }
};
template<class T>