common/concepts: Rename IsBaseOf to DerivedFrom
This makes it more inline with its currently unavailable standardized analogue std::derived_from. While we're at it, we can also make the template match the requirements of the standardized variant as well.
This commit is contained in:
parent
f5d538f118
commit
8e86fa7e60
3 changed files with 8 additions and 6 deletions
|
@ -57,7 +57,7 @@ public:
|
|||
ResultVal<std::shared_ptr<Kernel::ClientPort>> GetServicePort(const std::string& name);
|
||||
ResultVal<std::shared_ptr<Kernel::ClientSession>> ConnectToService(const std::string& name);
|
||||
|
||||
template <Common::IsBaseOf<Kernel::SessionRequestHandler> T>
|
||||
template <Common::DerivedFrom<Kernel::SessionRequestHandler> T>
|
||||
std::shared_ptr<T> GetService(const std::string& service_name) const {
|
||||
auto service = registered_services.find(service_name);
|
||||
if (service == registered_services.end()) {
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace Loader {
|
|||
|
||||
namespace {
|
||||
|
||||
template <Common::IsBaseOf<AppLoader> T>
|
||||
template <Common::DerivedFrom<AppLoader> T>
|
||||
std::optional<FileType> IdentifyFileLoader(FileSys::VirtualFile file) {
|
||||
const auto file_type = T::IdentifyType(file);
|
||||
if (file_type != FileType::Error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue