Opened 8 years ago

Closed 8 years ago

#2115 closed defect (duplicate)

a shared_ptr is a pointer

Reported by: fdupont Owned by:
Priority: low Milestone:
Component: Unclassified Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: Core Feature Depending on Ticket:
Estimated Difficulty: 2 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

If a shared_ptr is really a pointer then MSVC is right when it raises an error on this contruct
(from src/lib/datasrc/tests/zonetable_unittest.cc):
zone.find(Name("www.example.com"), RRType::A()).code
the result of zone.find() is a shared_ptr and MSVC claims a shared_ptr has no code member...
The fix is to replace by:
zone.find(Name("www.example.com"), RRType::A())->code
but my question is whether MSVC is a bit picky or is plain right and the code must be fixed?
(I put the proposed change in the attachment so with other words should I remove the #ifdef?)

Subtickets

Attachments (1)

zonetable_unittest.cc.diff (591 bytes) - added by fdupont 8 years ago.
proposed fix to zonetable_unittest.cc

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by fdupont

proposed fix to zonetable_unittest.cc

comment:1 Changed 8 years ago by jinmei

Hmm, this should be obviously ->. It's even surprising the
current code compiles with any compiler...

comment:2 Changed 8 years ago by shane

  • Milestone New Tasks deleted
  • Type changed from enhancement to defect

Yeah, this actually seems like a bug.

comment:3 Changed 8 years ago by jinmei

Actually, this should have already solved as part of other ticket.

It was a more fundamental level regression that zonetable_unittest.cc
hadn't been included in Makefile.am for a while (I guess it's a
regression as a result of introducing loadable modules).

I'm now closing this ticket.

comment:4 Changed 8 years ago by jinmei

  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.