Eric Niebler | 8 Apr 02:40

Proto v4

No library ever made it through a review unscathed and proto is no 
exception. There's a new version of proto in branches/proto/v4, and 
Spirit-2 will need some changes to work with it. This is the version 
that will be merged into trunk, eventually.

First the simple things:

* Proto lives at boost/proto/, not boost/xpressive/proto
* boost/proto/proto.hpp now includes all of proto with the
   exception of the typeof registrations. That includes the
   contexts, the transforms and the debugging utilities. If
   you just want the core of proto without the other stuff,
   there is boost/proto/core.hpp
* s/posit/unary_plus/
* s/arg/child, s/arg_c/child_c/, s/_argN/_childN
* s/bind/lazy/
* s/_visitor/_data/
* The proto::transform namespace is no more.

Some bigger changes:

The protocol for defining a primitive transform has changed. Previously, 
primitive transforms were just ternary function objects like this:

struct MyTransform : proto::callable
{
   template<class Sig>
   struct result;

   template<class This, class Expr, class State, class Data>
(Continue reading)

Larry Evans | 14 Apr 02:43

Re: Proto v4

On 04/07/08 19:43, Eric Niebler wrote:
> No library ever made it through a review unscathed and proto is no 
> exception. There's a new version of proto in branches/proto/v4,
[snip]
> These are some internal changes that probably should affect anybody:
> 
> * ref_ is no more. Children are held by plain reference, not
>    by reference wrapper.
> * s/args0/term, s/argsN/listN/
> 
I guess the removal of ref_ explains the following:
<--- cut here---
-*- mode: compilation; default-directory: 
"~/prog_dev/boost-svn/ro/branches-proto-v4/libs/proto/doc/" -*-
Compilation started at Sun Apr 13 14:44:43

bjam
warning: Graph library does not contain optional GraphML reader.
note: to enable GraphML support, set EXPAT_INCLUDE and EXPAT_LIBPATH to the
note: directories containing the Expat headers and libraries, respectively.
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
Building Boost.Regex with the optional Unicode/ICU support disabled.
Please refer to the Boost.Regex documentation for more information
(don't panic: this is a strictly optional feature).
error: Unable to find file or target named
error:     '../../../boost/proto/ref.hpp'
error: referred from project at
(Continue reading)

Eric Niebler | 14 Apr 08:33

Re: Proto v4


Larry Evans wrote:
> On 04/07/08 19:43, Eric Niebler wrote:
>> There's a new version of proto in branches/proto/v4,
> [snip]
>> These are some internal changes that probably should affect anybody:
>>
>> * ref_ is no more. Children are held by plain reference, not
>>    by reference wrapper.
>> * s/args0/term, s/argsN/listN/
>>
> I guess the removal of ref_ explains the following:
<anip>
> error: Unable to find file or target named
> error:     '../../../boost/proto/ref.hpp'
> error: referred from project at
> error:     '.'

I fixed this on the branch a day or two ago. But I had to nuke the 
branch and recreate it because svnmerge.py started acting up. You should 
probably do a clean check out.

--

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
(Continue reading)

Larry Evans | 14 Apr 11:30

Re: Proto v4

On 04/14/08 01:33, Eric Niebler wrote:
> Larry Evans wrote:
>> On 04/07/08 19:43, Eric Niebler wrote:
>>> There's a new version of proto in branches/proto/v4,
>> [snip]
>>> These are some internal changes that probably should affect anybody:
>>>
>>> * ref_ is no more. Children are held by plain reference, not
>>>    by reference wrapper.
>>> * s/args0/term, s/argsN/listN/
>>>
>> I guess the removal of ref_ explains the following:
> <anip>
>> error: Unable to find file or target named
>> error:     '../../../boost/proto/ref.hpp'
>> error: referred from project at
>> error:     '.'
> 
> I fixed this on the branch a day or two ago. But I had to nuke the 
> branch and recreate it because svnmerge.py started acting up. You should 
> probably do a clean check out.
> 
I checked out a fresh copy with:

   svn co http://svn.boost.org/svn/boost/branches/proto/v4 \
     branches-proto-v4

then tried again with:
<--- cut here ---
-*- mode: compilation; default-directory: 
(Continue reading)

Eric Niebler | 17 Apr 21:22

wave on trunk (was: Proto v4)

Larry Evans wrote:
> MkDir1 
> ../../../bin.v2/tools/wave/build/gcc-4.1/release/link-static/threading-multi
> gcc.compile.c++ 
> ../../../bin.v2/tools/wave/build/gcc-4.1/release/link-static/threading-multi/cpp.o
> ../../../boost/spirit/home/support/iterators/detail/multi_pass.hpp: In 
> function 'void boost::spirit::detail::swap(T&, T&)':
> ../../../boost/spirit/home/support/iterators/detail/multi_pass.hpp:23: 
> error: 'boost::spirit::swap' has not been declared

You should be asking Hartmut why wave doesn't build with gcc.

--

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Hartmut Kaiser | 17 Apr 22:08

Re: wave on trunk (was: Proto v4)

Larry,

> > ../../../bin.v2/tools/wave/build/gcc-4.1/release/link-
> static/threading-multi
> > gcc.compile.c++
> > ../../../bin.v2/tools/wave/build/gcc-4.1/release/link-
> static/threading-multi/cpp.o
> > ../../../boost/spirit/home/support/iterators/detail/multi_pass.hpp:
> In
> > function 'void boost::spirit::detail::swap(T&, T&)':
> >
> ../../../boost/spirit/home/support/iterators/detail/multi_pass.hpp:23:
> > error: 'boost::spirit::swap' has not been declared
> 
> You should be asking Hartmut why wave doesn't build with gcc.

We're currently are moving Spirit2 to the boost SVN and everything is just
settling down. Please have some patience, we're working on it.

Regards Hartmut

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Larry Evans | 17 Apr 22:28

Re: Proto v4

On 04/07/08 19:43, Eric Niebler wrote:
> No library ever made it through a review unscathed and proto is no 
> exception. There's a new version of proto in branches/proto/v4, and 
[snip]
The attached compiles/runs with previous version; however, with
v4 I'm getting errors.  What's wrong.  The errors follow:

-*- mode: compilation; default-directory: 
"~/prog_dev/boost-svn/ro/branches-proto-v4/libs/proto/experiments3/" -*-
Compilation started at Thu Apr 17 15:07:19

bjam pass_thru_tree_req.unit-test
warning: Graph library does not contain optional GraphML reader.
note: to enable GraphML support, set EXPAT_INCLUDE and EXPAT_LIBPATH to the
note: directories containing the Expat headers and libraries, respectively.
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
Building Boost.Regex with the optional Unicode/ICU support disabled.
Please refer to the Boost.Regex documentation for more information
(don't panic: this is a strictly optional feature).
...patience...
...found 1016 targets...
...updating 3 targets...
gcc.compile.c++ 
../../../bin.v2/libs/proto/experiments3/gcc-4.1/debug/link-static/pass_thru_tree_req.o
../../../boost/utility/result_of.hpp: In instantiation of

'boost::detail::result_of_nested_result<boost::proto::op::negate<boost::proto::op::terminal<int> 
(Continue reading)

Eric Niebler | 17 Apr 23:09

Re: Proto v4

Larry Evans wrote:
> The attached compiles/runs with previous version; however, with
> v4 I'm getting errors.  What's wrong.  The errors follow:
<snip>

It's a bug. I'll fix it. Thanks for the catch.

--

-- 
Eric Niebler
Boost Consulting
www.boost-consulting.com

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Larry Evans | 28 Apr 20:39

can't compile new transform protocol (was Re: Proto v4

On 04/07/08 19:43, Eric Niebler wrote:
[snip]
> Some bigger changes:
> 
> The protocol for defining a primitive transform has changed. Previously, 
> primitive transforms were just ternary function objects like this:
> 
> struct MyTransform : proto::callable
> {
[snip]
> };
> 
> You would now write this as:
> 
> struct MyTransform : proto::transform<MyTransform>
> {
>    template<class Expr, class State, class Data>
>    struct impl : proto::transform_impl<Expr, State, Data>
>    {
>      typedef ... result_type;
> 
>      result_type operator()(
>        typename impl::expr_param expr
>      , typename impl::state_param state
>      , typename impl::data_param data
>      ) const
>      {
>        return ...;
>      }
>    };
(Continue reading)

Larry Evans | 28 Apr 21:32

can't compile new transform protocol (was Re: Proto v4

Sorry if this is suplicate.  Tried sending to newgroup, but that
didn't show up for several minutes.

On 04/07/08 19:43, Eric Niebler wrote:
[snip]
 > Some bigger changes:
 >
 > The protocol for defining a primitive transform has changed. 
Previously, primitive transforms were just ternary function objects like 
this:
 >
 > struct MyTransform : proto::callable
 > {
[snip]
 > };
 >
 > You would now write this as:
 >
 > struct MyTransform : proto::transform<MyTransform>
 > {
 >    template<class Expr, class State, class Data>
 >    struct impl : proto::transform_impl<Expr, State, Data>
 >    {
 >      typedef ... result_type;
 >
 >      result_type operator()(
 >        typename impl::expr_param expr
 >      , typename impl::state_param state
 >      , typename impl::data_param data
 >      ) const
(Continue reading)

Eric Niebler | 28 Apr 23:24

Re: can't compile new transform protocol (was Re: Proto v4

Larry Evans wrote:
> I tried this with the attached, but I'm getting:
<snip>

The problem is here:

     struct morph_ident
     : proto::when
       < proto::nary_expr
         < proto::_
         , proto::vararg<morph_ident>
         >
     #if 0
       , proto::nary_expr
         < proto::expr_tag<>
         , proto::vararg<morph_ident>
         >
     #endif
       >
     {};

This transform is valid only for non-terminals. nary_expr doesn't match 
terminals. That's by design.

Also, your partial specializations of expr<> are going to get you into 
trouble. They don't have the required typedefs and members, they are not 
aggregates, etc., etc.. Don't do that.

--

-- 
Eric Niebler
(Continue reading)

Larry Evans | 2 May 21:25

For diff terminals, why allow op= but disallow copy CTOR? (was Re: Proto v4

On 04/07/08 19:43, Eric Niebler wrote:
> No library ever made it through a review unscathed and proto is no 
> exception. There's a new version of proto in branches/proto/v4,
[snip]
The attached compiles showing that assignment between terminals
of different types is allowed; however, when the different
type instance comes from the CTOR, compilation fails.
That seems wrong or at least counter-intuitive.
What's the rationale for that feature?
Attachment (leaf_copy_ctor.cpp): text/x-c++src, 709 bytes
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Spirit-devel mailing list
Spirit-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Eric Niebler | 2 May 22:26

Re: For diff terminals, why allow op= but disallow copy CTOR? (was Re: Proto v4

Larry Evans wrote:
> On 04/07/08 19:43, Eric Niebler wrote:
>> No library ever made it through a review unscathed and proto is no 
>> exception. There's a new version of proto in branches/proto/v4,
> [snip]
> The attached compiles showing that assignment between terminals
> of different types is allowed; however, when the different
> type instance comes from the CTOR, compilation fails.
> That seems wrong or at least counter-intuitive.
> What's the rationale for that feature?

You're really going to kick yourself when you hear the answer ... :-)

> #include <boost/proto/proto.hpp>
> struct A
> {};
> struct B
> {};
> using namespace boost::proto;
> int main(void)
> {
>     terminal<A>::type ta;
>     terminal<B>::type tb
>     #if 0
>       (ta)//fails to compile.

Correct, because they're different types.

>     #endif
>       ;
(Continue reading)

Larry Evans | 3 May 01:44

Re: For diff terminals, why allow op= but disallow copy CTOR? (was Re: Proto v4

On 05/02/08 15:26, Eric Niebler wrote:
> Larry Evans wrote:
>> On 04/07/08 19:43, Eric Niebler wrote:
>>> No library ever made it through a review unscathed and proto is no 
>>> exception. There's a new version of proto in branches/proto/v4,
>> [snip]
>> The attached compiles showing that assignment between terminals
>> of different types is allowed; however, when the different
>> type instance comes from the CTOR, compilation fails.
>> That seems wrong or at least counter-intuitive.
>> What's the rationale for that feature?
> 
> You're really going to kick yourself when you hear the answer ... :-)
Yes.
> 
[snip]
>>     tb=ta;//successfully compiles.
> 
> Hint: Proto is an expression template library. :-) Can you guess what 
> tb=ta does now?
 From line 285 of expr.hpp, it's:

expr<proto::tag::assign,...>

Sorry for noise :(

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
(Continue reading)


Gmane