mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-22 13:15:39 +08:00
Use C++14 features to simplify our container base classes
Summary: Using C++14 function return type deduction we can simplify the CRTP in CContainerBase etc. Reviewers: #swift_developers, rwinklmeier Reviewed By: #swift_developers, rwinklmeier Subscribers: jenkins Tags: #swift_pilot_client Differential Revision: https://dev.swift-project.org/D65
This commit is contained in:
@@ -367,8 +367,8 @@ namespace BlackMisc
|
||||
};
|
||||
|
||||
// CContainerBase methods implemented out-of-line to avoid circular include
|
||||
template <template <class> class C, class T, class CIt>
|
||||
CStatusMessage CContainerBase<C, T, CIt>::convertFromJsonNoThrow(const QJsonObject &json, const CLogCategoryList &categories, const QString &prefix)
|
||||
template <class Derived>
|
||||
CStatusMessage CContainerBase<Derived>::convertFromJsonNoThrow(const QJsonObject &json, const CLogCategoryList &categories, const QString &prefix)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -382,8 +382,8 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
//! Call convertFromJson, catch any CJsonException that is thrown and return it as CStatusMessage.
|
||||
template <template <class> class C, class T, class CIt>
|
||||
CStatusMessage CContainerBase<C, T, CIt>::convertFromJsonNoThrow(const QString &jsonString, const CLogCategoryList &categories, const QString &prefix)
|
||||
template <class Derived>
|
||||
CStatusMessage CContainerBase<Derived>::convertFromJsonNoThrow(const QString &jsonString, const CLogCategoryList &categories, const QString &prefix)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user