Boost logo

Boost Users :

Subject: Re: [Boost-users] using uint8_t & the like on open solaris
From: Mikko Vainio (mikko.vainio_at_[hidden])
Date: 2009-11-27 01:15:53


On 11/27/2009 01:40 AM, Maróy Ákos wrote:
> Hi,
>
> I'm have a silly problem of trying to use the integer type definitions
> in boost/cstdint.hpp in the following way:
>
> #include<boost/cstdint.hpp>
> using namespace boost;
> uint8_t value;
>
>
> on other platforms I've tried, this seems to be OK, but on OpenSolaris,
> with gcc 3 I get an error that uint8_t does not name a type, with gcc 4,
> it will say that uint8_t is ambiguous, since there's a typedef also in
> /usr/include/sys/int_types.h
>
> of course the above works the following way:
>
> boost::uint8_t value;
>
>
> but I really wanted to avoid having to specify the boost namespace all
> the time.
>
>
> Akos

You could try
using boost::uint8_t;

/Mikko


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net