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