Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/fusion/sequence/intrinsic/front.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children | c530137014c0 |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
1 /*============================================================================= | |
2 Copyright (c) 2001-2011 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_FRONT_09162005_0343) | |
8 #define FUSION_FRONT_09162005_0343 | |
9 | |
10 #include <boost/fusion/sequence/intrinsic_fwd.hpp> | |
11 #include <boost/fusion/sequence/intrinsic/begin.hpp> | |
12 #include <boost/fusion/iterator/deref.hpp> | |
13 #include <boost/mpl/bool.hpp> | |
14 | |
15 namespace boost { namespace fusion | |
16 { | |
17 struct fusion_sequence_tag; | |
18 | |
19 namespace result_of | |
20 { | |
21 template <typename Sequence> | |
22 struct front | |
23 : result_of::deref<typename result_of::begin<Sequence>::type> | |
24 {}; | |
25 } | |
26 | |
27 template <typename Sequence> | |
28 inline typename result_of::front<Sequence>::type | |
29 front(Sequence& seq) | |
30 { | |
31 return *fusion::begin(seq); | |
32 } | |
33 | |
34 template <typename Sequence> | |
35 inline typename result_of::front<Sequence const>::type | |
36 front(Sequence const& seq) | |
37 { | |
38 return *fusion::begin(seq); | |
39 } | |
40 }} | |
41 | |
42 #endif |