From: Bernd Martin Wollny (bm.wollny_at_[hidden])
Date: 2008-09-02 11:49:38
Steven Watanabe wrote:
> Bernd Martin Wollny wrote:
>> I Tried to build a function Map. This is working for my. But if I
>> change the function
>> Parameter to const MSVC 7.1 failed to build. I am using boost 1.35
>> With gcc 4.3.1 i can compile it.
> msvc 9.0 also compiles it.
>> Have some one a solution for me ?
>> ##### source #####
>> #include <string>
>> #include <map>
>> #include <iostream>
>> #include <boost/function.hpp>
>> typedef boost::function<unsigned int (const bool)> measure_func;
> This is (or ought to be) exactly the same as
> typedef boost::function<unsigned int (bool)> measure_func;
With (bool) it's working ....
>> class X
>> unsigned int Exec(const std::string s,const bool b);
> Similarly, these const's have no effect. (Did you mean const std::string&)
> In Christ,
> Steven Watanabe
Hi Steven Watanabe,
thanks for your replay,
you are right:
unsigned int Exec(const std::string s,const bool b); should be
unsigned int Exec(const std::string &s,const bool b);
this code is written in a very short time to illustrate my problem.
So I think I have to wait until we change to MSVC 9.0
Have a nice weak
-- Bernd Martin Wollny TRIOPTICS GmbH - www.trioptics.com bm.wollny_at_[hidden] Hafenstrasse 39, 22880 Wedel/GERMANY
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk