shunsuke | 1 Apr 04:04
Picon

Re: calling function objects in a fusion vector

Sebastian Weber wrote:
> boost::transform(funcVec, bll::bind(&fusion::invoke<>, _1, args));
> 
> However, this does not work - the bind complains about unresolved
> overloaded function type. So, what is wrong here?

Extracting function pointer from function template is difficult.
In this case, it seems even impossible.
BTW, Boost.Egg: http://p-stade.sourceforge.net/boost/libs/egg/
supports "fusing", which turns function into one taking a FusionSequence.

// \f -> fuse(f)(args)
lazy(lazy(fuse)(bll::_1))(args)

Or, this might be more readable.
// \f -> apply(fuse(f), args)
lazy(apply)(lazy(fuse)(bll::_1), args)

Regards,

--

-- 
Shunsuke Sogame
Steven Woody | 1 Apr 04:40
Picon

Re: serial programs

On Mon, Mar 31, 2008 at 9:13 PM, Tim Michals <tcmichals <at> msn.com> wrote:
>
> There is a new project on sourceforge ASIO
> http://sourceforge.net/projects/rs232basedonasi/ that is serial based... it
> is coming online soon...

Thanks, I will check out the link.  Another similar question is: Can I
use boost to write TCP/UDP socked based program?  Thanks.

>
>
>
>  ________________________________
>  > Date: Mon, 31 Mar 2008 13:53:23 +0800
> > From: narkewoody <at> gmail.com
> > To: boost-users <at> lists.boost.org
> > Subject: [Boost-users] serial programs
>
>
> >
> > Hi,
> >
> > I want to write a portable program which need to read/write serial
> > ports. How can boost help this? Thank you. ( I got know basic serial
> > programming in Linux but I have no idea how that it done in Windows )
> >
> >
> > --
> > woody
> >
(Continue reading)

kokot-san | 1 Apr 06:55
Picon
Favicon

Re: Eclipse integration of bjam


Hi Sebastian (or anyone else),

I am trying to integrate bjam with Eclipse and I am able to compile my
project. The only thing is that the output of bjam is written to Eclipse's
console-window and I am not able to navigate through the errors and
warnings. I expected some option to send the output to Eclipe's
problems-window enabling me to navigate through warnings and errors. Is this
currently by any means possible (I am using Eclipse 3.2.2)?

Cheers,
Andrej

Sebastien Fortier wrote:
> 
> We use eclipse (europa) and bjam under Debian Linux "etch" and "sarge" 
> on a daily basis and it works very well, I would be happy to assist you.
> I would not think of using any other build system!
> 
> 
> Ruediger Berlich wrote:
>> Dear all,
>>
>> I am using Eclipse/CDT under Linux as my standard IDE. So far I'm
>> building
>> my projects using Eclipse's own build mechanisms. Is anybody using bjam
>> as
>> a build mechanism in Eclipse/CDT and should I expect problems when making
>> a
>> switch to bjam ?
(Continue reading)

Olaf Peter | 1 Apr 07:10
Picon
Picon

Problems on using ostringstream with boost.format and boost.xpressive

Hi,

the following code did not work as expected:

--8<---
#include <iostream>
#include <sstream>
#include <boost/format.hpp>
#include <boost/xpressive/xpressive.hpp>

using namespace boost::xpressive;

int main()
{
     std::string input(
         "the answer is\r42"
         );

     const std::string f( "[Input]\n%1%\n|\n" );
     std::ostringstream oss;

#if 0
     oss << boost::format( f )
         % input
         ;
#else
     oss << input;
#endif

     sregex re = as_xpr("\r");
(Continue reading)

Stephen Hewitt | 1 Apr 07:14
Picon

Re: Defining Macro's using bjam or

John Maddox wrote:
>> Try something like:
>> bjam msvc define=_CRT_SECURE_NO_WARNINGS=0 define=_SCL_SECURE_NO_WARNINGS=0
>> define=_SECURE_SCL=0
>> HTH, John.

 

Thanks john. I ended up using the following:

 bjam --toolset=msvc-9.0 --build-type=complete define=_CRT_SECURE_NO_WARNINGS define=_SCL_SECURE_NO_WARNINGS define=_SECURE_SCL=0 stage | tee BuildLog.txt

 

Without "--build-type=complete" only the release multi-threaded libraries were build. This wasn't the case with 1.3.3.1, and there seems to reference to this in the docs.

 

I would like the following in debug builds:

 define=_SECURE_SCL=1

And this in release builds:

 define=_SECURE_SCL=0

 

I'm not having much luck. Again, any insights would be greatly appreciated.

 

Steve

 

_______________________________________________
Boost-users mailing list
Boost-users <at> lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Kevin Scarr | 1 Apr 07:44
Picon
Picon
Favicon

Re: serial programs

Steven Woody wrote:
> On Mon, Mar 31, 2008 at 9:13 PM, Tim Michals <tcmichals <at> msn.com> wrote:
>> There is a new project on sourceforge ASIO
>> http://sourceforge.net/projects/rs232basedonasi/ that is serial based... it
>> is coming online soon...
> 

Just an update on that project:

There is some code in the SVN repository that I did as a "proof of 
concept" of using asio to control tcp/udp and serial i/o in a 
multithreaded, user configurable environment. So it is a complete hack.

We are just beginning to look at a better abstraction for the serial 
capability now, so it will be a little time before anything might be 
ready on the project.

Kevin
Vladimir Prus | 1 Apr 10:28
Picon
Favicon
Gravatar

Re: Defining Macro's using bjam or

Stephen Hewitt wrote:

> John Maddox wrote:
>>> Try something like:
>>> bjam msvc define=_CRT_SECURE_NO_WARNINGS=0
> define=_SCL_SECURE_NO_WARNINGS=0
>>> define=_SECURE_SCL=0
>>> HTH, John.
> 
> 
> 
> Thanks john. I ended up using the following:
> 
> * bjam --toolset=msvc-9.0 --build-type=complete
> define=_CRT_SECURE_NO_WARNINGS define=_SCL_SECURE_NO_WARNINGS
> define=_SECURE_SCL=0 stage | tee BuildLog.txt*
> 
> 
> 
> Without "--build-type=complete" only the release multi-threaded libraries
> were build. This wasn't the case with 1.3.3.1, and there seems to reference
> to this in the docs.
> 
> 
> 
> I would like the following in debug builds:
> 
>  *define=_SECURE_SCL=1*
> 
> And this in release builds:
> 
>  *define=_SECURE_SCL=0*
> 
> 
> 
> I'm not having much luck. Again, any insights would be greatly appreciated.

You have to explicitly request whatever variants you want, for example:

        bjam toolset=msvc-9.0 debug/define=_SECURE_SCL=1 release/define=_SECURE_SCL=0

- Volodya

> 
> 
> 
> Steve
Jean Vittor | 1 Apr 10:34
Picon
Favicon

Refactoring


Hi all,

I'm trying to write a parser which can write on the input string (mainly
insert string at the current position).

Does spirit contain any stuff that can help me in that way ?

Thanks,
Jean

	
Robin Tucker | 1 Apr 12:55
Picon

Using boost::gregorian (date_time) date with wide strings


Is it possible to use the boost date_time date class with wide strings?  ie.

        std::wstring toConvert(L"12/12/2008");
        date myDate;

        myDate = from_simple_string(toConvert);

What do I have to do to enable this?  I see the library is using std::string only.

Thanks.

(sorry, newbie post).

_________________________________________________________________
Win 100’s of Virgin Experience days with BigSnapSearch.com
http://www.bigsnapsearch.com
a a | 1 Apr 15:02
Picon

Re: boost::variant build crashes Visual C++

On Fri, Mar 28, 2008 at 10:45 PM, Yaser Zhian Tabasy <yaserzt <at> yahoo.com> wrote:
> a a wrote:
>  > I tried switch /ZmXXX with a couple of different values for XXX, this
>  > seems to have no effect on the problem and still the VC8 Release build
>  > crashes with C1060.
>  >
>  > The documentation says that /Zm "Determines the amount of memory that
>  > the compiler allocates to construct precompiled headers".  Can you
>  > give a little more detail on how you think that C1060 could be avoided
>  > in this case by changing the memory allocation for precompiled
>  > headers?
>  >
>  > The example I provided in the original post is a sole cpp file, I
>  > haven't myself created any headers, precompiled or otherwise.  The
>  > code #includes various headers from STL and boost, are you saying that
>  > those #includes are picking up precompiled headers such that the
>  > behavior of the build could be influenced by /Zm?
>  >
>
>  I'm sorry. It seems that I've been too quick to assume you used precompiled
>  headers or that "/Zm" actually does something other than setting the limit
>  for PCH files.
>
>  If it was me, I would play with the compiler optimization flags to see which
>  one was the culprit, but I'm sure you've already done than and/or you
>  probably need those optimizations.
>  Also, the MSDN page for the C1060 error code lists some workarounds. They
>  don't seem like breakthroughs or anything, but the file splitting might work
>  (if that's indeed possible to any useful extent with this simple example.)

No problem!  I appreciate the ideas.  I have tried a few tweaks with
no success, but I will continue to experiment and I'll post back if I
find a solution.  Thanks again for your help.

Regards,
Eric

Gmane