title: Internal compiler error and boost::bind
body: <p>I'm testing a C++ class with a number of functions that all have basically the same form:</p>
  
  <pre><code>ClassUnderTest t;
  
  DATATYPE data = { 0 };
  try
  {
      t.SomeFunction( &amp;data );
  }
  catch( const SomeException&amp; e )
  {
      // log known error
  }
  catch( ... )
  {
      // log unknown error
  }
  </code></pre>
  
  <p>Since there's a lot of these, I thought I'd write a function to do most of the heavy lifting:</p>
  
  <pre><code>template&lt; typename DATA, typename TestFunction &gt;
  int DoTest( TestFunction test_fcn )
  {
      DATA data = { 0 };
      try
      {
          test_fcn( &amp;data );
      }
      catch( const SomeException&amp; e )
      {
          // log known error
          return FAIL;
      }
      catch( ... )
      {
          // log unknown error
          return FAIL;
      }
      return TRUE;
  }
  
  ClassUnderTest t;
  DoTest&lt; DATATYPE &gt;( boost::bind( &amp;ClassUnderTest::SomeFunction, boost::ref( t ) ) );
  </code></pre>
  
  <p>But, the compiler doesn't seem to agree with me that this is a good idea...</p>
  
  <pre><code>Warning 1   warning C4180: qualifier applied to function type has no meaning; ignored   c:\boost\boost_1_41_0\boost\bind\bind.hpp   1657
  Warning 2   warning C4180: qualifier applied to function type has no meaning; ignored   c:\boost\boost_1_41_0\boost\bind\mem_fn.hpp 318
  Warning 3   warning C4180: qualifier applied to function type has no meaning; ignored   c:\boost\boost_1_41_0\boost\bind\mem_fn.hpp 326
  Warning 4   warning C4180: qualifier applied to function type has no meaning; ignored   c:\boost\boost_1_41_0\boost\bind\mem_fn.hpp 331
  Warning 5   warning C4180: qualifier applied to function type has no meaning; ignored   c:\boost\boost_1_41_0\boost\bind\mem_fn.hpp 345
  Warning 6   warning C4180: qualifier applied to function type has no meaning; ignored   c:\boost\boost_1_41_0\boost\bind\mem_fn.hpp 350
  Warning 7   warning C4180: qualifier applied to function type has no meaning; ignored   c:\boost\boost_1_41_0\boost\bind\mem_fn.hpp 362
  Error   8   fatal error C1001: An internal error has occurred in the compiler.  c:\boost\boost_1_41_0\boost\bind\mem_fn.hpp 328
  </code></pre>
  
  <p>I'm using Visual Studio 2008 SP1.
  If anybody can point out what I'm doing wrong, I would appreciate it.</p>
  
  <p>Thanks,
  PaulH</p>