Boost logo

Boost Users :

From: Hossein Haeri (powerprogman_at_[hidden])
Date: 2006-05-06 13:22:23


Hi Peter,

> for_each(c.begin(), c.end(), bind(newPrint, _1,
> ref(out)));

Doesn't work either! The error file GCC (3.3.1) gives
me is in the P.S. Is GGC right?

And, BTW, thanks for letting me know about ref()! :)

TIA,
--Hossein

P.S.

Compiler: Default compiler
Building Makefile: "E:\My Documents\My
Programmes\Tests\Aarash\Makefile.win"
Executing make...
make.exe -f "E:\My Documents\My
Programmes\Tests\Aarash\Makefile.win" all
g++.exe -c Print.cpp -o Print.o -I"E:/Program
Files/Dev-Cpp/include/c++/3.3.1" -I"E:/Program
Files/Dev-Cpp/include/c++/3.3.1/mingw32"
-I"E:/Program
Files/Dev-Cpp/include/c++/3.3.1/backward"
-I"E:/Program
Files/Dev-Cpp/lib/gcc-lib/mingw32/3.3.1/include"
-I"E:/Program Files/Dev-Cpp/include"

E:/Program Files/Dev-Cpp/include/boost/bind.hpp: In
instantiation of
`boost::_bi::result_traits<boost::_bi::unspecified,
PrintAux<std::vector<int, std::allocator<int> >, 1>
>':
E:/Program
Files/Dev-Cpp/include/boost/bind/bind_template.hpp:15:
  instantiated from
`boost::_bi::bind_t<boost::_bi::unspecified,
PrintAux<std::vector<int, std::allocator<int> >, 1>,
boost::_bi::list2<boost::arg<1>,
boost::reference_wrapper<std::basic_ostream<char,
std::char_traits<char> > > > >'
E:/Program Files/Dev-Cpp/include/boost/bind.hpp:1306:
 instantiated from
`boost::_bi::bind_t<boost::_bi::unspecified, F,
typename boost::_bi::list_av_2<A1, A2>::type>
boost::bind(F, A1, A2) [with F =
PrintAux<std::vector<int, std::allocator<int> >, 1>,
A1 = boost::arg<1>, A2 =
boost::reference_wrapper<std::basic_ostream<char,
std::char_traits<char> > >]'
Print.hpp:19: instantiated from `std::ostream&
PrintAux<Container, i>::operator()(const Container&,
std::ostream&) const [with Container =
std::vector<std::vector<int, std::allocator<int> >,
std::allocator<std::vector<int, std::allocator<int> >
> >, unsigned int i = 2]'
Print.hpp:62: instantiated from `std::ostream&
Print(const T&, std::ostream&) [with T =
std::vector<std::vector<int, std::allocator<int> >,
std::allocator<std::vector<int, std::allocator<int> >
> >]'
Print.cpp:30: instantiated from here
E:/Program Files/Dev-Cpp/include/boost/bind.hpp:62:
error: no type named `
   result_type' in `struct PrintAux<std::vector<int,
std::allocator<int> >, 1>'
E:/Program
Files/Dev-Cpp/include/boost/bind/bind_template.hpp: In
instantiation of
`boost::_bi::bind_t<boost::_bi::unspecified,
PrintAux<std::vector<int, std::allocator<int> >, 1>,
boost::_bi::list2<boost::arg<1>,
boost::reference_wrapper<std::basic_ostream<char,
std::char_traits<char> > > > >':
E:/Program Files/Dev-Cpp/include/boost/bind.hpp:1306:
 instantiated from
`boost::_bi::bind_t<boost::_bi::unspecified, F,
typename boost::_bi::list_av_2<A1, A2>::type>
boost::bind(F, A1, A2) [with F =
PrintAux<std::vector<int, std::allocator<int> >, 1>,
A1 = boost::arg<1>, A2 =
boost::reference_wrapper<std::basic_ostream<char,
std::char_traits<char> > >]'
Print.hpp:19: instantiated from `std::ostream&
PrintAux<Container, i>::operator()(const Container&,
std::ostream&) const [with Container =
std::vector<std::vector<int, std::allocator<int> >,
std::allocator<std::vector<int, std::allocator<int> >
> >, unsigned int i = 2]'
Print.hpp:62: instantiated from `std::ostream&
Print(const T&, std::ostream&) [with T =
std::vector<std::vector<int, std::allocator<int> >,
std::allocator<std::vector<int, std::allocator<int> >
> >]'
Print.cpp:30: instantiated from here
E:/Program
Files/Dev-Cpp/include/boost/bind/bind_template.hpp:15:
error: no
   type named `type' in `struct
   boost::_bi::result_traits<boost::_bi::unspecified,
PrintAux<std::vector<int,
   std::allocator<int> >, 1> >'

E:/Program
Files/Dev-Cpp/include/boost/bind/bind_template.hpp:18:
error: no
   type named `type' in `struct

   boost::_bi::result_traits<boost::_bi::unspecified,
PrintAux<std::vector<int,
   std::allocator<int> >, 1> >'
E:/Program
Files/Dev-Cpp/include/boost/bind/bind_template.hpp:24:
error: no
   type named `type' in `struct
   boost::_bi::result_traits<boost::_bi::unspecified,
PrintAux<std::vector<int,
   std::allocator<int> >, 1> >'
E:/Program
Files/Dev-Cpp/include/boost/bind/bind_template.hpp:30:
error: no
   type named `type' in `struct
   boost::_bi::result_traits<boost::_bi::unspecified,
PrintAux<std::vector<int,
   std::allocator<int> >, 1> >'
E:/Program
Files/Dev-Cpp/include/boost/bind/bind_template.hpp:30:
confused by earlier errors, bailing out

make.exe: *** [Print.o] Error 1

Execution terminated

Send instant messages to your online friends http://uk.messenger.yahoo.com


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net