[reSIProcate] Problem using extension parameters with Auth

Alan Stokes alan at alanstokes.org.uk
Mon Sep 19 08:41:04 CDT 2005


Because Auth adds its own overloads for param(), hiding the ones in 
ParserCategory, extension parameters don't work quite the way they should 
(as specified in 
http://warsaw.sjc.purplecomm.com/wiki/index.php?title=Use_Overview#Extension_parameters
).

In particular this doesn't compile:
static const ExtensionParameter p_foo("foo");
...
Auth auth;
auth.param(p_foo) = "bar";

A workaround is to explicitly qualify:
auth.ParserCategory::param(p_foo) = "bar";
but this is ugly and means you have to write different code for built-in and 
extension parameters.

One solution would be to just add a "using ParserCategory::param;" in the 
Auth class definition - but that would make all of the usual parameters 
available, and I'm not sure that's the intention. An alternative would be to 
add to Auth the two overloads
const Data& param(const ExtensionParameter& param) const;
Data& param(const ExtensionParameter& param);
and just make both forward to the version in the base class.

- Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20050919/0129066b/attachment.htm>


More information about the resiprocate-devel mailing list