
18 Nov
2004
18 Nov
'04
5:20 p.m.
Dave, Daniel, I have a use case which would be nice to support. I have some functions which take some number of flag arguments, akin to: void foo(const char * name, float value, bool flag1 = false, bool flag2 = false) { std::cout << name << " = " << value << "\n"; } And I can add the named arg interface, so I can use it as: foo((value = 5.2f, name = "baz", flag1 = true)); But ideally I'd like the use to look like: foo((value = 5.2f, name = "baz", flag1)); That is, the presence of the keyword is enough to set the argument to true. Possible? -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq