stlab.adobe.com Adobe Systems Incorporated
exists.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2005-2007 Adobe Systems Incorporated
3  Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
4  or a copy at http://stlab.adobe.com/licenses.html)
5 */
6 
7 /*************************************************************************************************/
8 
9 #ifndef ADOBE_ALGORITHM_EXISTS_HPP
10 #define ADOBE_ALGORITHM_EXISTS_HPP
11 
12 #include <adobe/config.hpp>
13 
14 #include <algorithm>
15 
16 /*************************************************************************************************/
17 
18 namespace adobe {
19 
20 /*************************************************************************************************/
25 /*************************************************************************************************/
33 template <typename C> // C models AssociativeContainer
34 bool exists(const C& c, const typename C::key_type& k)
35 { return c.find(k) != c.end(); }
36 
37 /*************************************************************************************************/
38 
39 } // namespace adobe
40 
41 /*************************************************************************************************/
42 
43 #endif
44 
45 /*************************************************************************************************/
bool exists(const C &c, const typename C::key_type &k)
Definition: exists.hpp:34

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google