Modify

Ticket #4175 (closed Bugs: fixed)

Opened 4 years ago

Last modified 4 years ago

[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

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

Change History

Changed 4 years ago by Robert Valkenburg <rj.valkenburg@…>

self contained program which shows expression unwrapping

comment:1 Changed 4 years ago by eric_niebler

  • Status changed from new to closed
  • Resolution set to fixed

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

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.