title: How to resolve conflict between boost::shared_ptr and using std::shared_ptr?
body: <p>If I change from boost::shared_ptr to std::shared_ptr in this code snippet, I will get linker error.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;sstream&gt;
  #include &lt;iterator&gt;
  #include &lt;cctype&gt;
  #include &lt;cmath&gt;
  
  #include &lt;string&gt;
  #include &lt;vector&gt;
  #include &lt;stack&gt;
  #include &lt;queue&gt;
  #include &lt;set&gt;
  #include &lt;map&gt;
  
  #include &lt;functional&gt;
  #include &lt;utility&gt;
  #include &lt;numeric&gt;
  
  #include &lt;boost/assign.hpp&gt;
  #include &lt;boost/assign/std/vector.hpp&gt;
  
  #include &lt;boost/algorithm/string.hpp&gt;
  
  #include &lt;boost/test/included/unit_test.hpp&gt;
  #include &lt;boost/test/included/unit_test_framework.hpp&gt;
  #include &lt;boost/bind.hpp&gt;
  
  //using namespace std;
  //using namespace boost;
  
  using std::string;
  using std::ostringstream;
  using namespace boost::assign;
  using namespace boost::unit_test;
  
  template&lt;typename T&gt; string to_string( T data ) { ostringstream ost; ost &lt;&lt; data; return ost.str(); }
  
  class TwoStringMasks {
  public:
      string shortestCommon( string s1, string s2 ) {
          //if( s1.find( "*" ) != 0 ||
          return "";
      }
  };
  
  class two_string_masks_test {
  public:
      void test_case_one() {
          string str = "TOPCODER*";
          BOOST_CHECK_EQUAL( str.find( "*" ), str.length() - 2 );
      }
  };
  
  test_suite* init_unit_test_suite( int argc, char* argv[] ) {
      boost::shared_ptr&lt;two_string_masks_test&gt; tester( new two_string_masks_test );
      framework::master_test_suite().add(  
          BOOST_TEST_CASE( boost::bind( &amp;two_string_masks_test::test_case_one, tester ) ) ); 
      return 0;
  }
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Error   12  error C2784: 'T *boost::get_pointer(T *)' : could not deduce template argument for 'T *' from 'std::tr1::shared_ptr&lt;_Ty&gt;'   c:\program files\boost\boost_1_44\boost\bind\mem_fn_template.hpp    40  1   NET Report
  Error   10  error C2784: 'T *boost::get_pointer(const std::auto_ptr&lt;_Ty&gt; &amp;)' : could not deduce template argument for 'const std::auto_ptr&lt;_Ty&gt; &amp;' from 'std::tr1::shared_ptr&lt;_Ty&gt;' c:\program files\boost\boost_1_44\boost\bind\mem_fn_template.hpp    40  1   NET Report
  Error   11  error C2784: 'T *boost::get_pointer(const std::auto_ptr&lt;_Ty&gt; &amp;)' : could not deduce template argument for 'const std::auto_ptr&lt;_Ty&gt; &amp;' from 'std::tr1::shared_ptr&lt;_Ty&gt;' c:\program files\boost\boost_1_44\boost\bind\mem_fn_template.hpp    40  1   NET Report
  Error   8   error C2784: 'T *boost::get_pointer(const boost::shared_ptr&lt;X&gt; &amp;)' : could not deduce template argument for 'const boost::shared_ptr&lt;X&gt; &amp;' from 'std::tr1::shared_ptr&lt;_Ty&gt;' c:\program files\boost\boost_1_44\boost\bind\mem_fn_template.hpp    40  1   NET Report
  Error   9   error C2784: 'T *boost::get_pointer(const boost::shared_ptr&lt;X&gt; &amp;)' : could not deduce template argument for 'const boost::shared_ptr&lt;X&gt; &amp;' from 'std::tr1::shared_ptr&lt;_Ty&gt;' c:\program files\boost\boost_1_44\boost\bind\mem_fn_template.hpp    40  1   NET Report
  Error   6   error C2784: 'T *boost::get_pointer(const boost::scoped_ptr&lt;T&gt; &amp;)' : could not deduce template argument for 'const boost::scoped_ptr&lt;T&gt; &amp;' from 'std::tr1::shared_ptr&lt;_Ty&gt;' c:\program files\boost\boost_1_44\boost\bind\mem_fn_template.hpp    40  1   NET Report
  Error   7   error C2784: 'T *boost::get_pointer(const boost::scoped_ptr&lt;T&gt; &amp;)' : could not deduce template argument for 'const boost::scoped_ptr&lt;T&gt; &amp;' from 'std::tr1::shared_ptr&lt;_Ty&gt;' c:\program files\boost\boost_1_44\boost\bind\mem_fn_template.hpp    40  1   NET Report
  Error   13  error C2784: 'T *boost::get_pointer(const boost::reference_wrapper&lt;T&gt; &amp;)' : could not deduce template argument for 'const boost::reference_wrapper&lt;T&gt; &amp;' from 'std::tr1::shared_ptr&lt;_Ty&gt;'   c:\program files\boost\boost_1_44\boost\bind\mem_fn_template.hpp    40  1   NET Report
  Error   14  error C2784: 'T *boost::get_pointer(const boost::reference_wrapper&lt;T&gt; &amp;)' : could not deduce template argument for 'const boost::reference_wrapper&lt;T&gt; &amp;' from 'std::tr1::shared_ptr&lt;_Ty&gt;'   c:\program files\boost\boost_1_44\boost\bind\mem_fn_template.hpp    40  1   NET Report
  Error   2   error C2784: 'optional&lt;T&gt;::pointer_type boost::get_pointer(boost::optional&lt;T&gt; &amp;)' : could not deduce template argument for 'boost::optional&lt;T&gt; &amp;' from 'std::tr1::shared_ptr&lt;_Ty&gt;'  c:\program files\boost\boost_1_44\boost\bind\mem_fn_template.hpp    40  1   NET Report
  Error   3   error C2784: 'optional&lt;T&gt;::pointer_type boost::get_pointer(boost::optional&lt;T&gt; &amp;)' : could not deduce template argument for 'boost::optional&lt;T&gt; &amp;' from 'std::tr1::shared_ptr&lt;_Ty&gt;'  c:\program files\boost\boost_1_44\boost\bind\mem_fn_template.hpp    40  1   NET Report
  Error   4   error C2784: 'optional&lt;T&gt;::pointer_const_type boost::get_pointer(const boost::optional&lt;T&gt; &amp;)' : could not deduce template argument for 'const boost::optional&lt;T&gt; &amp;' from 'std::tr1::shared_ptr&lt;_Ty&gt;'    c:\program files\boost\boost_1_44\boost\bind\mem_fn_template.hpp    40  1   NET Report
  Error   5   error C2784: 'optional&lt;T&gt;::pointer_const_type boost::get_pointer(const boost::optional&lt;T&gt; &amp;)' : could not deduce template argument for 'const boost::optional&lt;T&gt; &amp;' from 'std::tr1::shared_ptr&lt;_Ty&gt;'    c:\program files\boost\boost_1_44\boost\bind\mem_fn_template.hpp    40  1   NET Report
  </code></pre>
  
  <p>What did I do wrong? I guessed there was a conflict between std namespace and boost namespace, but I don't know how to fix it? Any idea?  </p>
  
  <p>Thanks,<br>
  Chan </p>