Boost logo

Boost Users :

From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2007-01-23 13:10:50


On 1/23/07, pwm <pwmiller_at_[hidden]> wrote:
>
> I am unable to find it now, but I thought I saw that there is a boost
> way to define a typedef using a unique class that cannot be implicitly
> converted to another type. Thus,
>
> typedef int Foo;
> void bar( Foo a );
>
> would compile only with bar( Foo(3) ) not bar(3)
>
> Is this capability in Boost 1.33 or am I hallucinating?
>
> Thanks,
> Phil

strong_typedef.hpp? (http://www.boost.org/boost/strong_typedef.hpp)

Tony



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