MXL : Media eXchange Layer
MXL
Loading...
Searching...
No Matches
FabricInfoHelpers.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Contributors to the Media eXchange Layer project.
2//
3// SPDX-License-Identifier: Apache-2.0
4
6#include "Exception.hpp"
7
9{
10 void requireCapability(FabricInfoView info, std::uint64_t cap, std::string_view message)
11 {
12 if ((info->caps & cap) != cap)
13 {
14 throw Exception::unsupportedOperation("{}", message);
15 }
16 }
17}
static Exception unsupportedOperation(fmt::format_string< T... > fmt, T &&... args)
Definition Exception.hpp:89
Non-owning view of a FabricInfo. Returned when iterating over a FabricInfoList.
void requireCapability(FabricInfoView info, std::uint64_t cap, std::string_view message)