epoc32/include/stdapis/boost/mpl/empty.hpp
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/boost/mpl/empty.hpp	Wed Mar 31 12:27:01 2010 +0100
     1.3 @@ -0,0 +1,67 @@
     1.4 +// Boost.Range library
     1.5 +//
     1.6 +//  Copyright Thorsten Ottosen 2003-2004. Use, modification and
     1.7 +//  distribution is subject to the Boost Software License, Version
     1.8 +//  1.0. (See accompanying file LICENSE_1_0.txt or copy at
     1.9 +//  http://www.boost.org/LICENSE_1_0.txt)
    1.10 +//
    1.11 +// For more information, see http://www.boost.org/libs/range/
    1.12 +//
    1.13 +
    1.14 +#ifndef BOOST_RANGE_EMPTY_HPP
    1.15 +#define BOOST_RANGE_EMPTY_HPP
    1.16 +
    1.17 +#if defined(_MSC_VER) && (_MSC_VER >= 1200)
    1.18 +# pragma once
    1.19 +#endif
    1.20 +
    1.21 +#include <boost/range/config.hpp>
    1.22 +//#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
    1.23 +//#include <boost/range/detail/empty.hpp>
    1.24 +//#else
    1.25 +
    1.26 +#include <boost/range/begin.hpp>
    1.27 +#include <boost/range/end.hpp>
    1.28 +
    1.29 +namespace boost 
    1.30 +{ 
    1.31 +namespace range_detail 
    1.32 +{
    1.33 +
    1.34 +        //////////////////////////////////////////////////////////////////////
    1.35 +        // primary template
    1.36 +        //////////////////////////////////////////////////////////////////////
    1.37 +
    1.38 +        template< typename C >
    1.39 +        inline bool empty( const C& c )
    1.40 +        {
    1.41 +            return boost::begin( c ) == boost::end( c );
    1.42 +        }
    1.43 +
    1.44 +        //////////////////////////////////////////////////////////////////////
    1.45 +        // string
    1.46 +        //////////////////////////////////////////////////////////////////////
    1.47 +
    1.48 +        inline bool empty( const char* const& s )
    1.49 +        {
    1.50 +            return s == 0 || s[0] == 0;
    1.51 +        }
    1.52 +
    1.53 +        inline bool empty( const wchar_t* const& s )
    1.54 +        {
    1.55 +            return s == 0 || s[0] == 0;
    1.56 +        }
    1.57 +        
    1.58 +} // namespace 'range_detail'
    1.59 +
    1.60 +template< class T >
    1.61 +inline bool empty( const T& r )
    1.62 +{
    1.63 +    return range_detail::empty( r );
    1.64 +}
    1.65 +
    1.66 +} // namepace 'boost'
    1.67 +
    1.68 +//#endif //  BOOST_NO_FUNCTION_TEMPLATE_ORDERING
    1.69 +
    1.70 +#endif