PageRenderTime 29ms CodeModel.GetById 24ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/fusion/container/set/convert.hpp

http://hadesmem.googlecode.com/
C++ Header | 47 lines | 36 code | 5 blank | 6 comment | 0 complexity | 599ec8d3afb539c2645cefe8af70e393 MD5 | raw file
 1/*=============================================================================
 2    Copyright (c) 2001-2006 Joel de Guzman
 3
 4    Distributed under the Boost Software License, Version 1.0. (See accompanying
 5    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 6==============================================================================*/
 7#if !defined(FUSION_CONVERT_09232005_1341)
 8#define FUSION_CONVERT_09232005_1341
 9
10#include <boost/fusion/container/set/detail/as_set.hpp>
11#include <boost/fusion/container/set/detail/convert_impl.hpp>
12#include <boost/fusion/container/set/set.hpp>
13#include <boost/fusion/sequence/intrinsic/begin.hpp>
14#include <boost/fusion/sequence/intrinsic/size.hpp>
15
16namespace boost { namespace fusion
17{
18    namespace result_of
19    {
20        template <typename Sequence>
21        struct as_set
22        {
23            typedef typename detail::as_set<result_of::size<Sequence>::value> gen;
24            typedef typename gen::
25                template apply<typename result_of::begin<Sequence>::type>::type
26            type;
27        };
28    }
29
30    template <typename Sequence>
31    inline typename result_of::as_set<Sequence>::type
32    as_set(Sequence& seq)
33    {
34        typedef typename result_of::as_set<Sequence>::gen gen;
35        return gen::call(fusion::begin(seq));
36    }
37
38    template <typename Sequence>
39    inline typename result_of::as_set<Sequence const>::type
40    as_set(Sequence const& seq)
41    {
42        typedef typename result_of::as_set<Sequence const>::gen gen;
43        return gen::call(fusion::begin(seq));
44    }
45}}
46
47#endif