summaryrefslogtreecommitdiffstats
path: root/Source/ThirdParty/ANGLE/src/compiler/preprocessor/new/stl_utils.h
blob: 0d1ce50488313d84cea04c7d949ab328ecbd9873 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//
// Copyright (c) 2011 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//

// stl_utils.h: Common STL utilities.

#ifndef COMMON_STLUTILS_H_
#define COMMON_STLUTILS_H_

namespace pp
{

struct Delete
{
    template<class T>
    void operator() (T x) { delete x; }
};

struct DeleteSecond
{
    template<class A, class B>
    void operator() (std::pair<A, B>& x) { delete x.second; }
};

} // namespace pp
#endif // COMMON_STLUTILS_H_