1bf215546Sopenharmony_ci/* 2bf215546Sopenharmony_ci * Copyright © 2020 Collabora, Ltd. 3bf215546Sopenharmony_ci * Author: Antonio Caggiano <antonio.caggiano@collabora.com> 4bf215546Sopenharmony_ci * 5bf215546Sopenharmony_ci * SPDX-License-Identifier: MIT 6bf215546Sopenharmony_ci */ 7bf215546Sopenharmony_ci 8bf215546Sopenharmony_ci#pragma once 9bf215546Sopenharmony_ci 10bf215546Sopenharmony_ci#include <algorithm> 11bf215546Sopenharmony_ci 12bf215546Sopenharmony_ci#define FIND_IF(c, lambda) (std::find_if(std::begin(c), std::end(c), lambda)) 13bf215546Sopenharmony_ci#define FIND(c, e) (std::find(std::begin(c), std::end(c), e)) 14bf215546Sopenharmony_ci#define CONTAINS(c, e) (FIND(c, e) != std::end(c)) 15bf215546Sopenharmony_ci#define CONTAINS_IT(c, it) (it != std::end(c)) 16bf215546Sopenharmony_ci#define APPEND(a, b) (a.insert(std::end(a), std::begin(b), std::end(b))) 17