title: Issue with rowset of boost tuples with SOCI c++ database access library
body: <p>I have a compilation error when using rowset of tuples with the latest soci and boost libraries. </p>
  
  <p>I found an example on the net but it does not compile with the version of SOCI that I use and which is the latest.</p>
  
  <p>The portion which is causing issue is this one:</p>
  
  <pre><code>typedef std::vector&lt;boost::tuple&lt;double, double&gt; &gt; V;
  
  soci::rowset&lt;boost::tuple&lt;double, double&gt; &gt; rows
          = sql.prepare &lt;&lt; "select x(location),y(location) from cities";
  </code></pre>
  
  <p>Here is the complete code that I got from an example on the net: </p>
  
  <pre><code>#include &lt;soci.h&gt;
  #include &lt;soci-postgresql.h&gt;
  #include &lt;boost/algorithm/string.hpp&gt;
  #include &lt;boost/optional.hpp&gt;
  #include &lt;boost/timer.hpp&gt;
  #include &lt;boost/random.hpp&gt;
  #include &lt;boost/tuple/tuple.hpp&gt;
  #include &lt;iostream&gt;
  #include &lt;istream&gt;
  #include &lt;ostream&gt;
  #include &lt;sstream&gt;
  #include &lt;string&gt;
  #include &lt;exception&gt;
  
  int main()
  {
      try
      {
          soci::session sql(soci::postgresql, "dbname=ggl user=ggl password=ggl");
  
      int count;
      sql &lt;&lt; "select count(*) from cities", soci::into(count);
      std::cout &lt;&lt; "# Capitals: " &lt;&lt; count &lt;&lt; std::endl;
  
      typedef std::vector&lt;boost::tuple&lt;double, double&gt; &gt; V;
  
      soci::rowset&lt;boost::tuple&lt;double, double&gt; &gt; rows
          = sql.prepare &lt;&lt; "select x(location),y(location) from cities";
      V vec;
      std::copy(rows.begin(), rows.end(), std::back_inserter(vec));
  
      for (V::const_iterator it = vec.begin(); it != vec.end(); ++it)
      {
          std::cout &lt;&lt; it-&gt;get&lt;0&gt;() &lt;&lt; " " &lt;&lt; it-&gt;get&lt;1&gt;() &lt;&lt; std::endl;
      }
  }
  catch (std::exception const &amp;e)
  {
      std::cerr &lt;&lt; "Error: " &lt;&lt; e.what() &lt;&lt; '\n';
  }
  return 0;
  </code></pre>
  
  <p>}</p>
  
  <p>It fails on the following line:</p>
  
  <pre><code>   soci::rowset&lt;boost::tuple&lt;double, double&gt; &gt; rows
              = sql.prepare &lt;&lt; "select x(location),y(location) from cities";
  </code></pre>
  
  <p>And here is the error which I don quite understand:</p>
  
  <pre><code>   g++  -c  "/home/ubuntu/dev/testSoci/test.cpp" -g -O0 -Wall  -o ./Debug/test.o -I./include -I/home/ubuntu/dev/tools/QxOrm/include -I/usr/share/qt4/include -I/home/ubuntu/dev/tools/boost_1_48_0  -I. -I. -I/home/ubuntu/dev/tools/soci-3.1.0/core -I/home/ubuntu/dev/tools/soci-3.1.0/backends/postgresql -I/usr/include/postgresql -I/home/ubuntu/dev/tools/boost_1_48_0/boost 
  In file included from /home/ubuntu/dev/tools/soci-3.1.0/core/into-type.h:13,
                   from /home/ubuntu/dev/tools/soci-3.1.0/core/blob-exchange.h:12,
                   from /home/ubuntu/dev/tools/soci-3.1.0/core/soci.h:18,
                   from /home/ubuntu/dev/testSoci/test.cpp:21:
  /home/ubuntu/dev/tools/soci-3.1.0/core/exchange-traits.h: In instantiation of ‘soci::details::exchange_traits&lt;boost::tuples::tuple&lt;double, double, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type&gt; &gt;’:
  /home/ubuntu/dev/tools/soci-3.1.0/core/into.h:29:   instantiated from ‘soci::details::into_type_ptr soci::into(T&amp;) [with T = boost::tuples::tuple&lt;double, double, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type&gt;]’
  /home/ubuntu/dev/tools/soci-3.1.0/core/rowset.h:125:   instantiated from ‘soci::details::rowset_impl&lt;T&gt;::rowset_impl(const soci::details::prepare_temp_type&amp;) [with T = boost::tuples::tuple&lt;double, double, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type&gt;]’
  /home/ubuntu/dev/tools/soci-3.1.0/core/rowset.h:185:   instantiated from ‘soci::rowset&lt;T&gt;::rowset(const soci::details::prepare_temp_type&amp;) [with T = boost::tuples::tuple&lt;double, double, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type&gt;]’
  /home/ubuntu/dev/testSoci/test.cpp:51:   instantiated from here
  /home/ubuntu/dev/tools/soci-3.1.0/core/exchange-traits.h:34: error: incomplete type ‘soci::details::exchange_traits&lt;boost::tuples::tuple&lt;double, double, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type&gt; &gt;’ used in nested name specifier
  make[1]: *** [Debug/test.o] Error 1
  </code></pre>
  
  <p>Any idea of what could be the cause?</p>
  
  <p>Thanks a lot! Ludovic </p>
  
  <hr>
  
  <p>A solution was</p>
  
  <p>1/ to add parenthesis
         soci::rowset > rows
                  = (sql.prepare &lt;&lt; "select x(location),y(location) from cities");</p>
  
  <p>2/ to do what is proposed as answer: 
     #include  or the #define</p>