]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Boost.TypeErasure library |
2 | // | |
3 | // Copyright 2011 Steven Watanabe | |
4 | // | |
5 | // Distributed under the Boost Software License Version 1.0. (See | |
6 | // accompanying file LICENSE_1_0.txt or copy at | |
7 | // http://www.boost.org/LICENSE_1_0.txt) | |
8 | // | |
9 | // $Id$ | |
10 | ||
11 | #ifndef BOOST_TYPE_ERASURE_STATIC_BINDING_HPP_INCLUDED | |
12 | #define BOOST_TYPE_ERASURE_STATIC_BINDING_HPP_INCLUDED | |
13 | ||
14 | namespace boost { | |
15 | namespace type_erasure { | |
16 | ||
17 | /** | |
18 | * Represents a mapping from placeholders to the actual types | |
19 | * that they bind to. | |
20 | * | |
21 | * \pre @c Map must be an MPL map whose keys are placeholders. | |
22 | */ | |
23 | template<class Map> | |
11fdf7f2 | 24 | struct static_binding { typedef Map map_type; }; |
7c673cae FG |
25 | |
26 | /** | |
27 | * A convenience function to prevent constructor calls | |
28 | * from being parsed as function declarations. | |
29 | */ | |
30 | template<class Map> | |
31 | static_binding<Map> make_binding() { return static_binding<Map>(); } | |
32 | ||
33 | } | |
34 | } | |
35 | ||
36 | #endif |