Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-12-22 21:42:43


"Giovanni Bajo" <giovannibajo_at_[hidden]> writes:

> Hartmut Kaiser wrote:
>
>> I usually use another compiler to spot the errors, returning
>> afterwards to my production compiler - the VC7.1).
>
> Same here. Comeau has the best error messages by far, imo.

Comeau is nasty! Try this on it, for example:

  # include <map>
  # include <vector>
  # include <algorithm>
  int main()
  {
      std::map<int,int> a;
      std::vector<int> v(20);
      std::copy(a.begin(), a.end(), v.begin());
      return 0;
  }

or this one:

  # include <boost/mpl/transform.hpp>
  # include <boost/mpl/vector/vector10.hpp>

  namespace mpl = boost::mpl;
  using namespace mpl::placeholders;
  template <class T>
  struct returning_ptr
  {
      typedef T* (&type)();
  };

  typedef mpl::transform<
        mpl::vector5<int&,char,long[5],bool,double>
      , returning_ptr<_1>
>::type func_pointers;

GCC + STLFilt is best, by far.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk