mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +08:00
refs #624 Use auto function return type deduction.
This commit is contained in:
@@ -53,16 +53,16 @@ namespace BlackMisc
|
||||
//! @}
|
||||
|
||||
//! Return the value at this iterator position.
|
||||
auto value() const -> decltype(std::declval<I>().value()) { return m_iterator.value(); }
|
||||
auto value() const { return m_iterator.value(); }
|
||||
|
||||
//! Return the key at this iterator position.
|
||||
//! @{
|
||||
auto key() const -> decltype(std::declval<I>().key()) { return m_iterator.key(); }
|
||||
auto operator *() const -> decltype(std::declval<I>().key()) { return key(); }
|
||||
auto key() const { return m_iterator.key(); }
|
||||
auto operator *() const { return key(); }
|
||||
//! @}
|
||||
|
||||
//! Indirection operator: pointer to the key at this iterator position.
|
||||
auto operator ->() const -> typename std::remove_reference<decltype(std::declval<I>().key())>::type * { return &key(); }
|
||||
auto operator ->() const { return &key(); }
|
||||
|
||||
//! Equality operators.
|
||||
//! @{
|
||||
|
||||
Reference in New Issue
Block a user