Adobe Source Libraries
1.49.0
A collection of C++ libraries.
Loading...
Searching...
No Matches
exists.hpp
Go to the documentation of this file.
1
/*
2
Copyright 2013 Adobe
3
Distributed under the Boost Software License, Version 1.0.
4
(See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
*/
6
/**************************************************************************************************/
7
8
#ifndef ADOBE_ALGORITHM_EXISTS_HPP
9
#define ADOBE_ALGORITHM_EXISTS_HPP
10
11
#include <
adobe/config.hpp
>
12
13
#include <algorithm>
14
15
/**************************************************************************************************/
16
17
namespace
adobe
{
18
19
/**************************************************************************************************/
24
/**************************************************************************************************/
31
32
template
<
typename
C>
// C models AssociativeContainer
33
bool
exists
(
const
C& c,
const
typename
C::key_type& k) {
34
return
c.find(k) != c.end();
35
}
36
37
/**************************************************************************************************/
38
39
}
// namespace adobe
40
41
/**************************************************************************************************/
42
43
#endif
44
45
/**************************************************************************************************/
config.hpp
adobe::exists
bool exists(const C &c, const typename C::key_type &k)
Definition
exists.hpp:33
adobe
Definition
class_template.hpp:7
adobe
algorithm
exists.hpp
Generated by
1.14.0