title: Problems with reading into buffer using boost::asio::async_read
body: <p>Good day.</p>
  
  <p>I have a Types.hpp file in my project. And within it i have:</p>
  
  <pre><code>....    
  namespace RC 
  {
   .....
   .....
  
   struct ViewSettings
   {
    ....
   };
  
   .....
  }
  </code></pre>
  
  <p>In the Server.cpp file I'm including this Types.hpp file, and i have there:</p>
  
  <pre><code>class Session
  {
   .....
  
   RC::ViewSettings tmp;
   boost::asio::async_read(socket_, boost::asio::buffer(&amp;tmp, sizeof(RC::ViewSettings)), 
                           boost::bind(&amp;Session::Finish_Reading_Data, shared_from_this(), boost::asio::placeholders::error));
  
   .....
  }
  </code></pre>
  
  <p>And during the compilation i have an errors:</p>
  
  <pre><code> error C2825: 'F': must be a class or namespace when followed by '::'
   : see reference to class template instantiation 'boost::_bi::result_traits&lt;R,F&gt;' 
  
   being compiled with
   [
    R=boost::_bi::unspecified,
    F=void (__thiscall Session::* )(void)
   ]
  
   : see reference to class template instantiation 'boost::_bi::bind_t&lt;R,F,L&gt;' 
   being compiled with
   [
    R=boost::_bi::unspecified,
    F=void (__thiscall Session::* )(void),
    L=boost::_bi::list2&lt;boost::_bi::value&lt;boost::shared_ptr&lt;Session&gt;&gt;,boost::arg&lt;1&gt;&gt;
   ]
  
   error C2039: 'result_type' : is not a member of '`global namespace''
  </code></pre>
  
  <p>And the code like this works in proper way:</p>
  
  <pre><code>   int w; 
     boost::asio::async_read(socket_, boost::asio::buffer(&amp;w, sizeof(int)), 
                          boost::bind(&amp;Session::Handle_Read_Width, shared_from_this(), boost::asio::placeholders::error));
  </code></pre>
  
  <p>Please, help. What's the problem here?
  Thanks in advance.</p>