KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
l_stl_transform.h
Go to the documentation of this file.
1 /* $Id: l_stl_transform.h 10621 2011-09-29 19:50:52Z predoehl $ */
2 /* {{{=========================================================================== *
3  |
4  | Copyright (c) 1994-2010 by Kobus Barnard (author)
5  |
6  | Personal and educational use of this code is granted, provided that this
7  | header is kept intact, and that the authorship is not misrepresented, that
8  | its use is acknowledged in publications, and relevant papers are cited.
9  |
10  | For other use contact the author (kobus AT cs DOT arizona DOT edu).
11  |
12  | Please note that the code in this file has not necessarily been adequately
13  | tested. Naturally, there is no guarantee of performance, support, or fitness
14  | for any particular task. Nonetheless, I am interested in hearing about
15  | problems that you encounter.
16  |
17  | Author: Kyle Simek
18  * =========================================================================== }}}*/
19 
20 // vim: tabstop=4 shiftwidth=4 foldmethod=marker
21 
25 #ifndef KJB_CPP_L_STL_TRANSFORM
26 #define KJB_CPP_L_STL_TRANSFORM
27 
28 namespace kjb
29 {
30 
32 struct to_ptr
33 {
34 template <class T>
35 T* operator()(T& in) { return &in; }
36 };
37 
38 } // namespace kjb
39 #endif
T * operator()(T &in)
Definition: l_stl_transform.h:35
Convert to a pointer.
Definition: l_stl_transform.h:32