Boost logo

Boost :

From: Hendrik Schober (SpamTrap_at_[hidden])
Date: 2004-01-16 08:56:17


David Abrahams <dave_at_[hidden]> wrote:
> [...]
> > > 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;
> > > }
> [...]
> > Comeau C/C++ 4.3.3 (Aug 6 2003 15:13:37) for ONLINE_EVALUATION_BETA1
> > Copyright 1988-2003 Comeau Computing. All rights reserved.
> > BD Software STL Message Decryptor (Release 1.24 for Comeau C++)
> > MODE:strict errors C++
> >
> > stl_algobase.h(144): error: no suitable conversion function from
> > "pair<int,int>" to "vector<int>::value_type" exists
> > *__result = *__first;
> > ^
> > detected during:
>
> [...]
>
> You got lucky [...]
> Try comeau online:

  I did. (See the first line Comeau emitted.)
  You have to switch on the "Use STLFilt" option,
  though.

> [...]
> /usr/include/c++/3.3.1/bits/stl_algobase.h: In function `_OutputIter
> std::__copy(_InputIter, _InputIter, _OutputIter, std::input_iterator_tag)
> [with _InputIter = std::_Rb_tree_iterator<std::pair<const int, int>,
> std::pair<const int, int>&, std::pair<const int, int>*>, _OutputIter = int*]
> ':
>
> ...
> /usr/include/c++/3.3.1/bits/stl_algobase.h:228: error: cannot convert `
> std::pair<const int, int>' to `int' in assignment
>
>
> Too bad about the "...", but STLFilt can help.

  Same with Comeau.

  Schobi

-- 
SpamTrap_at_[hidden] is never read
I'm Schobi at suespammers dot org
"Sometimes compilers are so much more reasonable than people."
  Scott Meyers

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