Boost logo

Boost :

From: Hendrik Schober (SpamTrap_at_[hidden])
Date: 2004-01-15 08:18:37


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;
> }

  I did:

     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:
         instantiation of "vector<int>::value_type * __copy(map<int,int>::iterator,
        map<int,int>::iterator, vector<int>::value_type *, input_iterator_tag,
        iterator_traits<map<int,int>::iterator>::difference_type *)" at line 175
         instantiation of "vector<int>::value_type * __copy_aux2(map<int,int>::iter,
        map<int,int>::iter, vector<int>::value_type *, __false_type)" at line 208
         instantiation of "vector<int>::value_type * __copy_aux(map<int,
       int>::iterator, map<int,int>::iterator, vector<int>::value_type *,
        iterator_traits<map<int,int>::iterator>::value_type *)" at line 216
         instantiation of "vector<int>::value_type * copy(map<int,int>::iter,
        map<int,int>::iter, vector<int>::value_type *)" at line 8 of "ComeauTest.c"

     1 error detected in the compilation of "ComeauTest.c".

  Seems reasonable to me.

> [...]

  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