bitfields - Default values?

Dmitry Olshansky dmitry.olsh at gmail.com
Tue Jun 12 06:15:29 PDT 2012


On 12.06.2012 17:05, bearophile wrote:
> Era Scarecrow:

> Are you able to support a syntax like:
>
>> struct defs {
>> mixin(bitfields!(
>> bool, "b", 1,
>> uint, "i=2", 3,
>> short, "s=5", 4));
>> }
>

Or iff bitfields is a mixin template:
struct defs {
mixin bitfields!(
	bool, "b", 1,
	uint, "i=2", 3,
	short, "s=5", 4);
}

-- 
Dmitry Olshansky


More information about the Digitalmars-d-learn mailing list