api2/type_list.h

mediapipe · mediapipe/framework/api2/type_list.h · c · Apache-2.0
ai, tag:knn-classified

ifndef MEDIAPIPE_FRAMEWORK_API2_TYPE_LIST_H_ define MEDIAPIPE_FRAMEWORK_API2_TYPE_LIST_H_ include <string> include <type_traits> include <utility>

// Source: https://github.com/google-ai-edge/mediapipe | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
#ifndef MEDIAPIPE_FRAMEWORK_API2_TYPE_LIST_H_
#define MEDIAPIPE_FRAMEWORK_API2_TYPE_LIST_H_

#include <string>
#include <type_traits>
#include <utility>

namespace mediapipe {
namespace api2 {
namespace types {

// A list of types. This allows us to store a template parameter pack.
template <typename... Args>
struct List {};

// Concatenate two lists.
template <typename... As, typename... Bs>
auto concat(List<As...>, List<Bs...>) -> List<As..., Bs...> {
  return {};
}

// Filter a list using a predicate.
template <template <typename> class Pred, typename... Args>
auto filter(List

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key