Boost logo

Boost :

Subject: Re: [boost] Conversion/Enums/Opaque request for interest
From: Stephan T. Lavavej (stl_at_[hidden])
Date: 2011-04-20 03:25:22


[Wouter Van Alboom]
> I've done something similar to Boost.Conversion for (un)marschalling data to
> some API.
> Rather than template functions I was using structs, the ones that were
> trivial were defined using some traits
> template <class C__> struct CastMarshal;
> template <> struct CastMarshal<char> { typedef int tyM; };
> template <> struct CastMarshal<MyEnum> { typedef int tyM; };
> template <> struct CastMarshal<int> { typedef int tyM; };

As an aside, note that _Leading_underscore_capital and DoubleUnderscoreAnywhere__ names are reserved exclusively for use by the compiler and Standard Library, everywhere. C__ contains a double underscore and is therefore reserved.

Stephan T. Lavavej
Visual C++ Libraries Developer


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