forked from boostorg/range
Compare commits
6 Commits
svn-branch
...
svn-branch
Author | SHA1 | Date | |
---|---|---|---|
b029bf0e3c | |||
52b9581e4f | |||
bcc0ea30cf | |||
837bf05867 | |||
5e7948667e | |||
a65512ed5c |
22
CMakeLists.txt
Normal file
22
CMakeLists.txt
Normal file
@ -0,0 +1,22 @@
|
||||
#----------------------------------------------------------------------------
|
||||
# This file was automatically generated from the original CMakeLists.txt file
|
||||
# Add a variable to hold the headers for the library
|
||||
set (lib_headers
|
||||
range.hpp
|
||||
range
|
||||
)
|
||||
|
||||
# Add a library target to the build system
|
||||
boost_library_project(
|
||||
range
|
||||
# SRCDIRS
|
||||
TESTDIRS test
|
||||
HEADERS ${lib_headers}
|
||||
DOCDIRS doc
|
||||
DESCRIPTION "A new infrastructure for generic algorithms that builds on top of the new iterator concepts."
|
||||
MODULARIZED
|
||||
AUTHORS "Thorsten Ottosen <nesotto -at- cs.auc.dk>"
|
||||
# MAINTAINERS
|
||||
)
|
||||
|
||||
|
1
doc/CMakeLists.txt
Normal file
1
doc/CMakeLists.txt
Normal file
@ -0,0 +1 @@
|
||||
boost_add_documentation(boost_range.qbk)
|
@ -28,5 +28,6 @@ boostbook standalone
|
||||
# <xsl:param>generate.section.toc.level=4
|
||||
# <xsl:param>chunk.first.sections=7
|
||||
# <xsl:param>toc.section.depth=10
|
||||
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
|
||||
;
|
||||
|
||||
|
@ -291,7 +291,7 @@ ul.auto-toc {
|
||||
</head>
|
||||
<body>
|
||||
<div class="document" id="boost-range-mfc-atl-extension">
|
||||
<h1 class="title"><img alt="Boost" src="http://www.boost.org/libs/ptr_container/doc/boost.png" /> Range MFC/ATL Extension</h1>
|
||||
<h1 class="title"><img alt="Boost" src="../../ptr_container/doc/boost.png" /> Range MFC/ATL Extension</h1>
|
||||
<table class="docinfo" frame="void" rules="none">
|
||||
<col class="docinfo-name" />
|
||||
<col class="docinfo-content" />
|
||||
|
@ -26,7 +26,8 @@
|
||||
the new function <a
|
||||
href="boost_range.html#as_literal">as_literal()</a>.</li>
|
||||
<li><a
|
||||
href="boost_range.html#size">boost::size()</a> now requires a Random Access Range. The old behavior is provided as <a
|
||||
href="boost_range.html#size">boost::size()</a> now requires a Random
|
||||
Access Range. The old behavior is provided as <a
|
||||
href="boost_range.html#distance">boost::distance()</a> </li>
|
||||
<li> <code>range_size<T>::type</code> has been completely removed
|
||||
in favor of <code>range_difference<T>::type</code>
|
||||
|
@ -38,7 +38,7 @@ namespace boost
|
||||
return strlen( s );
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#ifndef BOOST_NO_CWCHAR
|
||||
inline std::size_t length( const wchar_t* s )
|
||||
{
|
||||
return wcslen( s );
|
||||
@ -61,7 +61,7 @@ namespace boost
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#ifndef BOOST_NO_CWCHAR
|
||||
inline bool is_char_ptr( wchar_t* )
|
||||
{
|
||||
return true;
|
||||
|
@ -1,97 +0,0 @@
|
||||
// Boost.Range library
|
||||
//
|
||||
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
|
||||
// distribution is subject to the Boost Software License, Version
|
||||
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// For more information, see http://www.boost.org/libs/range/
|
||||
//
|
||||
|
||||
#if !defined( BOOST_RANGE_DETAIL_MFC_CARRAY_HPP ) && defined( BOOST_RANGE_ENABLE_MCF_CARRAY )
|
||||
#define BOOST_RANGE_DETAIL_MFC_CARRAY_HPP
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <afxtempl.h> // for CArray
|
||||
#include <boost/range/config.hpp>
|
||||
#include <boost/range/metafunctions.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
template< class T, class U >
|
||||
struct range_iterator< CArray<T,U> >
|
||||
{
|
||||
typedef T* type;
|
||||
};
|
||||
|
||||
//
|
||||
// Why is this needed?!?
|
||||
//
|
||||
template< class T, class U >
|
||||
struct range_iterator< const CArray<T,U> >
|
||||
{
|
||||
typedef T* type;
|
||||
};
|
||||
|
||||
template< class T, class U >
|
||||
struct range_const_iterator< CArray<T,U> >
|
||||
{
|
||||
typedef const T* type;
|
||||
};
|
||||
|
||||
template< class T, class U >
|
||||
struct range_difference< CArray<T,U> >
|
||||
{
|
||||
typedef std::ptrdiff_t type;
|
||||
};
|
||||
|
||||
template< class T, class U >
|
||||
struct range_size< CArray<T,U> >
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
|
||||
template< class T, class U >
|
||||
struct range_value< CArray<T,U> >
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template< class T, class U >
|
||||
T* boost_range_begin( CArray<T,U>& r )
|
||||
{
|
||||
return r.GetData();
|
||||
}
|
||||
|
||||
template< class T, class U >
|
||||
const T* boost_range_begin( const CArray<T,U>& r )
|
||||
{
|
||||
return r.GetData();
|
||||
}
|
||||
|
||||
template< class T, class U >
|
||||
int boost_range_size( const CArray<T,U>& r )
|
||||
{
|
||||
return r.GetSize();
|
||||
}
|
||||
|
||||
template< class T, class U >
|
||||
T* boost_range_end( CArray<T,U>& r )
|
||||
{
|
||||
return boost_range_begin( r ) + boost_range_size( r );
|
||||
}
|
||||
|
||||
template< class T, class U >
|
||||
const T* boost_range_end( const CArray<T,U>& r )
|
||||
{
|
||||
return boost_range_begin( r ) + boost_range_size( r );
|
||||
}
|
||||
|
||||
// default 'empty()' ok
|
||||
|
||||
} // namespace 'boost'
|
||||
|
||||
#endif
|
@ -1,92 +0,0 @@
|
||||
// Boost.Range library
|
||||
//
|
||||
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
|
||||
// distribution is subject to the Boost Software License, Version
|
||||
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// For more information, see http://www.boost.org/libs/range/
|
||||
//
|
||||
|
||||
#if !defined(BOOST_RANGE_DETAIL_MFC_CSTRING_HPP) && defined(BOOST_RANGE_ENABLE_MFC)
|
||||
#define BOOST_RANGE_DETAIL_MFC_CSTRING_HPP
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <afx.h> // for CString
|
||||
#include <boost/range/config.hpp>
|
||||
#include <boost/range/metafunctions.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
template<>
|
||||
struct range_iterator< CString >
|
||||
{
|
||||
typedef TCHAR* type;
|
||||
};
|
||||
|
||||
//
|
||||
// Why is this needed?!?
|
||||
//
|
||||
template<>
|
||||
struct range_iterator< const CString >
|
||||
{
|
||||
typedef TCHAR* type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_const_iterator< CString >
|
||||
{
|
||||
typedef const TCHAR* type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_difference< CString >
|
||||
{
|
||||
typedef std::ptrdiff_t type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_size< CString >
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct range_value< CString >
|
||||
{
|
||||
typedef TCHAR type;
|
||||
};
|
||||
|
||||
TCHAR* boost_range_begin( CString& r )
|
||||
{
|
||||
return r.GetBuffer(0);
|
||||
}
|
||||
|
||||
const TCHAR* boost_range_begin( const CString& r )
|
||||
{
|
||||
return (LPCTSTR)r;
|
||||
}
|
||||
|
||||
int boost_range_size( const CString& r )
|
||||
{
|
||||
return r.GetLength();
|
||||
}
|
||||
|
||||
TCHAR* boost_range_end( CString& r )
|
||||
{
|
||||
return boost_range_begin( r ) + boost_range_size( r );
|
||||
}
|
||||
|
||||
const TCHAR* range_adl_end( const CString& r )
|
||||
{
|
||||
return boost_range_begin( r ) + boost_range_size( r );
|
||||
}
|
||||
|
||||
// default 'empty()' ok
|
||||
|
||||
} // namespace 'boost'
|
||||
|
||||
#endif
|
1
module.cmake
Normal file
1
module.cmake
Normal file
@ -0,0 +1 @@
|
||||
boost_module(range DEPENDS algorithm)
|
19
test/CMakeLists.txt
Normal file
19
test/CMakeLists.txt
Normal file
@ -0,0 +1,19 @@
|
||||
boost_additional_test_dependencies(range BOOST_DEPENDS test)
|
||||
|
||||
message(STATUS "libs/range/test: need -Wall -Wunused here when under gcc")
|
||||
set( test_compile_flags "")
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(test_compile_flags "-Wall -Wunused")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
||||
boost_test_run(array DEPENDS boost_unit_test_framework COMPILE_FLAGS ${test_compile_flags})
|
||||
boost_test_run(iterator_pair DEPENDS boost_unit_test_framework COMPILE_FLAGS ${test_compile_flags})
|
||||
boost_test_run(std_container DEPENDS boost_unit_test_framework COMPILE_FLAGS ${test_compile_flags})
|
||||
boost_test_run(string DEPENDS boost_unit_test_framework COMPILE_FLAGS ${test_compile_flags})
|
||||
boost_test_run(iterator_range DEPENDS boost_unit_test_framework COMPILE_FLAGS ${test_compile_flags})
|
||||
boost_test_run(sub_range DEPENDS boost_unit_test_framework COMPILE_FLAGS ${test_compile_flags})
|
||||
boost_test_run(partial_workaround DEPENDS boost_unit_test_framework COMPILE_FLAGS ${test_compile_flags})
|
||||
boost_test_run(algorithm_example DEPENDS boost_unit_test_framework COMPILE_FLAGS ${test_compile_flags})
|
||||
boost_test_run(reversible_range DEPENDS boost_unit_test_framework COMPILE_FLAGS ${test_compile_flags})
|
||||
boost_test_run(const_ranges DEPENDS boost_unit_test_framework COMPILE_FLAGS ${test_compile_flags})
|
||||
boost_test_run(extension_mechanism DEPENDS boost_unit_test_framework COMPILE_FLAGS ${test_compile_flags})
|
Reference in New Issue
Block a user