Boost logo

Boost :

Subject: Re: [boost] unsigned long vs unsigned int vs std::size_t (32b platform)
From: Thomas Suckow (thomas.suckow_at_[hidden])
Date: 2009-09-17 11:31:27


Christoph Mathys wrote:
> void someFunc(boost::uint16_t) { }
> void someFunc(boost::uint32_t) { }
> void someFunc(std::size_t) { }
>
>
Not sure if you are optimizing for 16bit and 32bit.

Wouldn't a template function be appropriate here?

If you are optimizing, you can just specialize.

template< typename T >
void someFunc( T ) { }
void someFunc(boost::uint16_t) { }
void someFunc(boost::uint32_t) { }

--
Thomas Suckow

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk