Task #2095
closed
20141029 conference call approves this Task.
Question:
ndn::shared_ptr
, ndn::function
, etc are aliases of std::
counterparts.
Is this an implementation detail, or is this part of public API?
In case the answer to previous question is "part of public API":
Should we recommend user to use ndn::
or std::
, if the application itself isn't in namespace ndn
?
Junxiao Shi wrote:
ndn::shared_ptr
, ndn::function
, etc are aliases of std::
counterparts.
Is this an implementation detail, or is this part of public API?
Implementation detail. Actually, the whole common.hpp
header is an implementation detail. The only public part is (or should be) MAX_NDN_PACKET_SIZE
, which should therefore be moved into some other header file.
From discussion in http://gerrit.named-data.net/1335:
Let's do the change ndn:: -> std:: later (whenever we touch the files).
This implies:
- Aliases such as
ndn::shared_ptr
are implementation detail. They shouldn't be used outside of ndn-cxx.
- Other projects should use identifiers in
std
, such as std::shared_ptr
.
- When an alias appears in ndn-cxx public API, caller should still use the equivalent
std
type.
Junxiao Shi wrote:
- Aliases such as
ndn::shared_ptr
are implementation detail. They shouldn't be used outside of ndn-cxx.
To enforce this, we should split the private and public parts of common.hpp
in separate files.
- Status changed from New to In Progress
- Assignee set to Junxiao Shi
- Estimated time changed from 1.00 h to 0.20 h
- Status changed from In Progress to Code review
- % Done changed from 0 to 100
- Estimated time changed from 0.20 h to 0.20 h
- Blocks Task #2110: Delete deprecated ndn::ptr_lib and ndn::func_lib added
- Status changed from Code review to Closed
- Estimated time changed from 0.20 h to 0.20 h
Also available in: Atom
PDF