BIND 10 #1574: Add support for loading NSEC3 RRsets to in memory data source
BIND 10 Development
do-not-reply at isc.org
Tue Jan 31 08:50:30 UTC 2012
#1574: Add support for loading NSEC3 RRsets to in memory data source
-------------------------------------+-------------------------------------
Reporter: | Owner: jinmei
jinmei | Status: reviewing
Type: task | Milestone:
Priority: | Sprint-20120207
critical | Resolution:
Component: data | Sensitive: 0
source | Sub-Project: DNS
Keywords: | Estimated Difficulty: 7
Defect Severity: N/A | Total Hours: 0
Feature Depending on Ticket: NSEC3 |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Changes (by vorner):
* owner: vorner => jinmei
Comment:
Hello
Replying to [comment:13 jinmei]:
> Replying to [comment:12 vorner]:
>
> > Reading throuh it, I find just one problem (provided the tmp method
will be replaced by a real one in a future ticket). Why do you create the
ToUpper class? It doesn't hold any state or like that. Shouldn't transform
be able to take toupper directly?
>
> Unfortunately not, because the signature doesn't fully match.
> transform expects char(*)(char), but toupper's type is int(*)(int).
> But it doesn't necessarily have to be a functor, but an ordinary
> wrapper function
The signature doesn't matter, because transform uses a template parameter
for the function/functor. That's why you can pass a functor inside anyway.
The only thing needed is for the parameter/return value to be convertible
automatically, which, as demonstrated by the functor, is possible.
I tried it and there's a different problem. There's one good old C toupper
and another C++ std::toupper. And we have `using namespace std` at the top
of the file, which means it can't resolve between these two (the template
parameter of transform is deduced from the signature of the function and
there are several). However, this seems to work, because it uniquely
selects one toupper (the C one):
{{{#!c++
transform(fst_label.begin(), fst_label.end(),
fst_label.begin(), ::toupper);
}}}
But if it wouldn't work on some compiler, I'd prefer having a function
wrapper than functor, a functor is an overkill.
Thank you (I'll return the ticket once I get through the second part).
--
Ticket URL: <http://bind10.isc.org/ticket/1574#comment:16>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list