~ubuntu-branches/ubuntu/breezy/aqsis/breezy

« back to all changes in this revision

Viewing changes to boost/boost/mpl/aux_/size_impl.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Will Newton
  • Date: 2004-12-07 20:06:49 UTC
  • Revision ID: james.westby@ubuntu.com-20041207200649-fccswkrvp4oc8lmn
Tags: upstream-0.9.3
ImportĀ upstreamĀ versionĀ 0.9.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//-----------------------------------------------------------------------------
 
2
// boost mpl/aux_/size_impl.hpp header file
 
3
// See http://www.boost.org for updates, documentation, and revision history.
 
4
//-----------------------------------------------------------------------------
 
5
//
 
6
// Copyright (c) 2000-02
 
7
// Aleksey Gurtovoy
 
8
//
 
9
// Permission to use, copy, modify, distribute and sell this software
 
10
// and its documentation for any purpose is hereby granted without fee, 
 
11
// provided that the above copyright notice appears in all copies and 
 
12
// that both the copyright notice and this permission notice appear in 
 
13
// supporting documentation. No representations are made about the 
 
14
// suitability of this software for any purpose. It is provided "as is" 
 
15
// without express or implied warranty.
 
16
 
 
17
#ifndef BOOST_MPL_AUX_SIZE_IMPL_HPP_INCLUDED
 
18
#define BOOST_MPL_AUX_SIZE_IMPL_HPP_INCLUDED
 
19
 
 
20
#include "boost/mpl/size_fwd.hpp"
 
21
#include "boost/mpl/begin_end.hpp"
 
22
#include "boost/mpl/distance.hpp"
 
23
#include "boost/mpl/aux_/traits_lambda_spec.hpp"
 
24
#include "boost/config.hpp"
 
25
 
 
26
namespace boost {
 
27
namespace mpl {
 
28
 
 
29
// default implementation; conrete sequences might override it by 
 
30
// specializing either the 'size_traits' or the primary 'size' template
 
31
 
 
32
template< typename Tag >
 
33
struct size_traits
 
34
{
 
35
    template< typename Sequence > struct algorithm
 
36
#if !defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG))
 
37
        : distance<
 
38
              typename begin<Sequence>::type
 
39
            , typename end<Sequence>::type
 
40
            >
 
41
    {
 
42
#else
 
43
    {
 
44
        typedef typename distance<
 
45
              typename begin<Sequence>::type
 
46
            , typename end<Sequence>::type
 
47
            >::type type;
 
48
#endif
 
49
    };
 
50
};
 
51
 
 
52
BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,size_traits)
 
53
 
 
54
} // namespace mpl
 
55
} // namespace boost
 
56
 
 
57
#endif // BOOST_MPL_AUX_SIZE_IMPL_HPP_INCLUDED