Opened 12 years ago

Closed 12 years ago

#4175 closed Bugs (fixed)

[Proto] possible loss of expression wrappers in pass-through transforms

Reported by: Robert Valkenburg <rj.valkenburg@…> Owned by: Eric Niebler
Milestone: Boost 1.43.0 Component: proto
Version: Boost 1.42.0 Severity: Problem
Keywords: proto pass through transforms Cc:

Description

extended expressions seem to be getting unwrapped in proto pass through transforms.

Others have not observed this effect so it may be a compiler/platform issue (or programmer of course)

I've attached a smallish (~160 lines) file that only depends on "boost/proto/proto.hpp"

The results are as follows (gcc 4.4.1 linux FC 11, x86_64 platform)

g++ -Wall -I/home/users/robert/linux_x86_64/src/boost_1_42_0 test_boost_proto.cpp -o test_boost_proto

test_boost_proto.cpp: In function ‘void clifford::evaluate(Res&, const clifford::ga_expr<Expr>&) [with Res = clifford::multivector<clifford::cga3::rotator_basis, clifford::cga3::cga3>, Expr = boost::proto::exprns_::expr<clifford::tag::reverse_, boost::proto::argsns_::list1<clifford::ga_expr<boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<const clifford::multivector<clifford::cga3::ebivector_basis, clifford::cga3::cga3>&>, 0l> > >, 1l>]’:

test_boost_proto.cpp:126: instantiated from ‘clifford::multivector<B, A>& clifford::multivector<B, A>::operator=(const clifford::ga_expr<T>&) [with T = boost::proto::exprns_::expr<clifford::tag::reverse_, boost::proto::argsns_::list1<clifford::ga_expr<boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<const clifford::multivector<clifford::cga3::ebivector_basis, clifford::cga3::cga3>&>, 0l> > >, 1l>, B = clifford::cga3::rotator_basis, A = clifford::cga3::cga3]’

test_boost_proto.cpp:164: instantiated from here

test_boost_proto.cpp:103: error: no matching function for call to ‘evaluate_expr(clifford::multivector<clifford::cga3::rotator_basis, clifford::cga3::cga3>&, boost::proto::exprns_::expr<clifford::tag::reverse_, boost::proto::argsns_::list1<const clifford::ga_expr<boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<const clifford::multivector<clifford::cga3::ebivector_basis, clifford::cga3::cga3>&>, 0l> >&>, 1l>)’

The clifford::ga_expr<> got removed so it was unable to find evaluate_expr()

Attachments (1)

test_boost_proto.cpp (4.5 KB ) - added by Robert Valkenburg <rj.valkenburg@…> 12 years ago.
self contained program which shows expression unwrapping

Download all attachments as: .zip

Change History (2)

by Robert Valkenburg <rj.valkenburg@…>, 12 years ago

Attachment: test_boost_proto.cpp added

self contained program which shows expression unwrapping

comment:1 by Eric Niebler, 12 years ago

Resolution: fixed
Status: newclosed

(In [61782]) pass_through transform doesn't strip expression wrappers, fixes #4175

Note: See TracTickets for help on using tickets.