Boost logo

Boost :

Subject: Re: [boost] [scope_exit] trunk tests fail on sun compiler
From: lcaminiti (lorcaminiti_at_[hidden])
Date: 2012-04-04 17:27:39

Vicente Botet wrote
> <toolset>sun:<define>BOOST_TYPEOF_EMULATION

Actually adding this to the Jamfile:


is a better workaround because having __typeof__ defined will prevent
Boost.Config from defining it to "typeof":

# ifndef __typeof__
# define __typeof__ typeof // boost/config/platform/linux.hpp:103
# endif

So Boost.Typeof will be able to use Sun's native __typeof__ :)

We still should fix the actual issue in Boost.Config -- but I'm not sure
how... maybe replacing __GNUC__:

// boost/config/platform/linux.hpp
#ifndef __GNUC__
// if the compiler is not gcc we still need to be able to parse
// the GNU system headers, some of which (mainly <stdint.h>)
// use GNU specific extensions:
# ifndef __typeof__
# define __typeof__ typeof // boost/config/platform/linux.hpp:103
# endif


#if !defined(__GNUC__) && (!defined(__SUNPRO_CC) || __SUNPRO_CC < 0x590)

Note that Sun has __typeof__ since version 5.9.

But I'm not familiar enough with the Boost.Config platform stuff to make any
change to it... any taker?


View this message in context:
Sent from the Boost - Dev mailing list archive at

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