Boost logo

Boost :

From: John Torjo (john.lists_at_[hidden])
Date: 2003-10-10 01:25:04

Hi Joel,

A little bit late, please send me the latest code on


----- Original Message -----
From: "Joel de Guzman" <djowel_at_[hidden]>
To: "Boost" <boost_at_[hidden]>
Sent: Wednesday, September 24, 2003 1:40 PM
Subject: [boost] limited form of type deduction

> << cross-posted to clc++m in reply to >>
> Hi,
> Problem: Without typeof, what is the result type of the expressions
> (x + y), (x += y), (c ? x : y), (++x), (x++), etc. ?
> Jaakko Jarvi and I are working on the Boost Lambda Library
> ( and Phoenix
> merger (
> Hopefully that will happen sometime in the near future. In an attempt
> to do a better type deduction mechanism than what's provided in LL
> (and Phoenix), I experimented with this idea:
> (see [ ] )
> In many cases, the result type of a binary expression is related to one of
> its operands. The limited form of type deduction presented can detect
> common relations if the result of a binary or unary operation, given
> x and y with types X and Y (respectively), is X, Y, X&, Y&, X*, Y*, X
> const*, Y const*, bool, int, unsigned, double, container and iterator
> elements (e.g the T, where X is: T[N], T*, vector<T>, map<T>,
> vector<T>::iterator). More arguments/return type relationships can be
> established if needed.
> The (fully commented) code is just a prototype. The final version is
> different (some tweaks and bug-fixes here and there). Email me if you wish
> to see the latest code.
> Regards,
> --
> Joel de Guzman
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at