Permalink
Browse files

Merge branch 'pristine-trunk' into cmake-trunk

  • Loading branch information...
2 parents 481d6c9 + 0c24d7f commit 256eb5b0d6ece8df5acfe5ca3d838769388a0fe6 @denisarnaud denisarnaud committed Jan 11, 2013
Showing 4,275 changed files with 273,251 additions and 88,348 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
View
@@ -130,7 +130,7 @@ import set ;
import path ;
path-constant BOOST_ROOT : . ;
-constant BOOST_VERSION : 1.52.0 ;
+constant BOOST_VERSION : 1.53.0 ;
constant BOOST_JAMROOT_MODULE : $(__name__) ;
boostcpp.set-version $(BOOST_VERSION) ;
@@ -11,6 +11,8 @@
#include <boost/version.hpp>
#include <boost/mpl/end.hpp>
#include <boost/mpl/map.hpp>
+#include <boost/mpl/set.hpp>
+#include <boost/mpl/copy.hpp>
#include <boost/mpl/fold.hpp>
#include <boost/mpl/size.hpp>
#include <boost/mpl/sort.hpp>
@@ -26,6 +28,7 @@
#include <boost/mpl/is_sequence.hpp>
#include <boost/mpl/placeholders.hpp>
#include <boost/mpl/insert_range.hpp>
+#include <boost/mpl/back_inserter.hpp>
#include <boost/mpl/transform_view.hpp>
#include <boost/mpl/inherit_linearly.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>
@@ -94,15 +97,49 @@ namespace boost { namespace accumulators
template<typename A, typename B>
struct is_dependent_on
: is_base_and_derived<
- typename undroppable<B>::type
+ typename feature_of<typename undroppable<B>::type>::type
, typename undroppable<A>::type
>
{};
+ template<typename Feature>
+ struct dependencies_of
+ {
+ typedef typename Feature::dependencies type;
+ };
+
+ // Should use mpl::insert_range, but doesn't seem to work with mpl sets
+ template<typename Set, typename Range>
+ struct set_insert_range
+ : mpl::fold<
+ Range
+ , Set
+ , mpl::insert<mpl::_1, mpl::_2>
+ >
+ {};
+
+ template<typename Features>
+ struct collect_abstract_features
+ : mpl::fold<
+ Features
+ , mpl::set0<>
+ , set_insert_range<
+ mpl::insert<mpl::_1, feature_of<mpl::_2> >
+ , collect_abstract_features<dependencies_of<mpl::_2> >
+ >
+ >
+ {};
+
template<typename Features>
struct depends_on_base
: mpl::inherit_linearly<
- typename mpl::sort<Features, is_dependent_on<mpl::_1, mpl::_2> >::type
+ typename mpl::sort<
+ typename mpl::copy<
+ typename collect_abstract_features<Features>::type
+ , mpl::back_inserter<mpl::vector0<> >
+ >::type
+ , is_dependent_on<mpl::_1, mpl::_2>
+ >::type
// Don't inherit multiply from a feature
, mpl::if_<
is_dependent_on<mpl::_1, mpl::_2>
@@ -319,7 +356,7 @@ namespace boost { namespace accumulators
type;
};
- // BUGBUG work around a MPL bug wrt map insertion
+ // BUGBUG work around an MPL bug wrt map insertion
template<typename FeatureMap, typename Feature>
struct insert_feature
: mpl::eval_if<
@@ -95,7 +95,7 @@ namespace impl
}
// Once cache_size samples have been accumulated, create num_bins bins of same size between
- // the minimum and maximum of the cached samples as well as an under- and and an overflow bin.
+ // the minimum and maximum of the cached samples as well as under and overflow bins.
// Store their lower bounds (bin_positions) and fill the bins with the cached samples (samples_in_bin).
if (cnt == this->cache_size)
{
@@ -39,7 +39,7 @@ OutputIterator copy_if ( InputIterator first, InputIterator last, OutputIterator
{
for ( ; first != last; ++first )
if (p(*first))
- *result++ = first;
+ *result++ = *first;
return result;
}
#endif
@@ -75,7 +75,7 @@ OutputIterator copy_while ( InputIterator first, InputIterator last,
OutputIterator result, Predicate p )
{
for ( ; first != last && p(*first); ++first )
- *result++ = first;
+ *result++ = *first;
return result;
}
@@ -109,7 +109,7 @@ template<typename InputIterator, typename OutputIterator, typename Predicate>
OutputIterator copy_until ( InputIterator first, InputIterator last, OutputIterator result, Predicate p )
{
for ( ; first != last && !p(*first); ++first )
- *result++ = first;
+ *result++ = *first;
return result;
}
@@ -46,7 +46,7 @@ namespace detail {
/// \fn is_permutation ( ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 first2, BinaryPredicate p )
-/// \brief Tests to see if a the sequence [first,last) is a permutation of the sequence starting at first2
+/// \brief Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2
///
/// \param first The start of the input sequence
/// \param last One past the end of the input sequence
@@ -88,7 +88,7 @@ bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1,
}
/// \fn is_permutation ( ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 first2 )
-/// \brief Tests to see if a the sequence [first,last) is a permutation of the sequence starting at first2
+/// \brief Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2
///
/// \param first The start of the input sequence
/// \param last One past the end of the input sequence
@@ -108,7 +108,7 @@ bool is_permutation ( ForwardIterator1 first, ForwardIterator1 last, ForwardIter
#endif
/// \fn is_permutation ( const Range &r, ForwardIterator first2 )
-/// \brief Tests to see if a the sequence [first,last) is a permutation of the sequence starting at first2
+/// \brief Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2
///
/// \param r The input range
/// \param first2 The start of the second sequence
@@ -119,7 +119,7 @@ bool is_permutation ( const Range &r, ForwardIterator first2 )
}
/// \fn is_permutation ( const Range &r, ForwardIterator first2, BinaryPredicate pred )
-/// \brief Tests to see if a the sequence [first,last) is a permutation of the sequence starting at first2
+/// \brief Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2
///
/// \param r The input range
/// \param first2 The start of the second sequence
View
@@ -69,14 +69,18 @@ namespace detail {
return std::copy ( res, res + num_hex_digits, out );
}
+// this needs to be in an un-named namespace because it is not a template
+// and might get included in several compilation units. This could cause
+// multiple definition errors at link time.
+ namespace {
unsigned hex_char_to_int ( char c ) {
if ( c >= '0' && c <= '9' ) return c - '0';
if ( c >= 'A' && c <= 'F' ) return c - 'A' + 10;
if ( c >= 'a' && c <= 'f' ) return c - 'a' + 10;
BOOST_THROW_EXCEPTION (non_hex_input() << bad_char (c));
- return 0; // keep dumb compilers happy
+ return 0; // keep dumb compilers happy
}
-
+ }
// My own iterator_traits class.
// It is here so that I can "reach inside" some kinds of output iterators
@@ -105,17 +109,17 @@ namespace detail {
// The first one is the output type, the second one is the character type of
// the underlying stream, the third is the character traits.
// We only care about the first one.
- template<typename T, typename charType, typename traits>
- struct hex_iterator_traits< std::ostream_iterator<T, charType, traits> > {
- typedef T value_type;
- };
-
- template <typename Iterator>
- bool iter_end ( Iterator current, Iterator last ) { return current == last; }
-
- template <typename T>
- bool ptr_end ( const T* ptr, const T* /*end*/ ) { return *ptr == '\0'; }
-
+ template<typename T, typename charType, typename traits>
+ struct hex_iterator_traits< std::ostream_iterator<T, charType, traits> > {
+ typedef T value_type;
+ };
+
+ template <typename Iterator>
+ bool iter_end ( Iterator current, Iterator last ) { return current == last; }
+
+ template <typename T>
+ bool ptr_end ( const T* ptr, const T* /*end*/ ) { return *ptr == '\0'; }
+
// What can we assume here about the inputs?
// is std::iterator_traits<InputIterator>::value_type always 'char' ?
// Could it be wchar_t, say? Does it matter?
@@ -99,8 +99,10 @@ namespace boost {
// if odd number of elements, treat last element
if (first != last) { // odd number of elements
- if (comp(first, min_result))
- min_result = first, potential_min_result = last;
+ if (comp(first, min_result)) {
+ min_result = first;
+ potential_min_result = last;
+ }
else if (comp(max_result, first))
max_result = first;
}
@@ -33,8 +33,8 @@ namespace boost { namespace algorithm {
http://www.cs.utexas.edu/users/moore/best-ideas/string-searching/
http://www.cs.utexas.edu/~moore/publications/fstrpos.pdf
-Explanations: boostinspect:noascii (test tool complains)
- http://en.wikipedia.org/wiki/Boyer–Moore_string_search_algorithm
+Explanations:
+ http://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_search_algorithm
http://www.movsd.com/bm.htm
http://www.cs.ucdavis.edu/~gusfield/cs224f09/bnotes.pdf
@@ -14,6 +14,11 @@
#include <boost/assert.hpp>
#include <boost/static_assert.hpp>
+
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+
+#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/algorithm/searching/detail/bm_traits.hpp>
@@ -15,6 +15,11 @@
#include <boost/assert.hpp>
#include <boost/static_assert.hpp>
+
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+
+#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/algorithm/searching/detail/debugging.hpp>
@@ -118,11 +118,11 @@ namespace boost {
InputT Output;
// Copy the beginning of the sequence
- insert( Output, ::boost::end(Output), ::boost::begin(Input), M.begin() );
+ boost::algorithm::detail::insert( Output, ::boost::end(Output), ::boost::begin(Input), M.begin() );
// Copy formated result
- insert( Output, ::boost::end(Output), M.format_result() );
+ boost::algorithm::detail::insert( Output, ::boost::end(Output), M.format_result() );
// Copy the rest of the sequence
- insert( Output, ::boost::end(Output), M.end(), ::boost::end(Input) );
+ boost::algorithm::detail::insert( Output, ::boost::end(Output), M.end(), ::boost::end(Input) );
return Output;
}
@@ -134,9 +134,9 @@ namespace boost {
while( M )
{
// Copy the beginning of the sequence
- insert( Output, ::boost::end(Output), LastMatch, M.begin() );
+ boost::algorithm::detail::insert( Output, ::boost::end(Output), LastMatch, M.begin() );
// Copy formated result
- insert( Output, ::boost::end(Output), M.format_result() );
+ boost::algorithm::detail::insert( Output, ::boost::end(Output), M.format_result() );
// Proceed to the next match
LastMatch=M.end();
@@ -132,7 +132,10 @@ namespace boost {
// increment
void increment()
{
- m_Match=this->do_find(m_Match.end(),m_End);
+ if(m_Match.begin() == m_Match.end())
+ m_Match=this->do_find(m_Match.end(),m_End);
+ else
+ m_Match=this->do_find(m_Match.begin()+1,m_End);
}
// comparison
@@ -43,6 +43,8 @@ namespace archive {
class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) archive_exception :
public virtual std::exception
{
+protected:
+ char m_buffer[128];
public:
typedef enum {
no_exception, // initialized without code
@@ -74,18 +76,18 @@ class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) archive_exception :
// type has been instantiated in more than one module.
output_stream_error // error on input stream
} exception_code;
-protected:
- std::string m_msg;
public:
exception_code code;
archive_exception(
exception_code c,
const char * e1 = NULL,
const char * e2 = NULL
);
- ~archive_exception() throw ();
- virtual const char *what( ) const throw();
+ virtual ~archive_exception() throw();
+ virtual const char *what() const throw();
protected:
+ unsigned int
+ append(unsigned int l, const char * a);
archive_exception();
};
@@ -86,23 +86,21 @@ basic_text_iprimitive<IStream>::load_binary(
,CharType
>
binary;
-
- binary ti_begin = binary(
+
+ binary i = binary(
BOOST_MAKE_PFTO_WRAPPER(
iterators::istream_iterator<CharType>(is)
)
);
-
+
char * caddr = static_cast<char *>(address);
// take care that we don't increment anymore than necessary
- while(--count > 0){
- *caddr++ = static_cast<char>(*ti_begin);
- ++ti_begin;
+ while(count-- > 0){
+ *caddr++ = static_cast<char>(*i++);
}
- *caddr++ = static_cast<char>(*ti_begin);
-
- iterators::istream_iterator<CharType> i;
+
+ // skip over any excess input
for(;;){
BOOST_DEDUCED_TYPENAME IStream::int_type r;
r = is.get();
@@ -112,7 +110,7 @@ basic_text_iprimitive<IStream>::load_binary(
break;
}
}
-
+
template<class IStream>
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_text_iprimitive<IStream>::basic_text_iprimitive(
@@ -51,7 +51,7 @@ basic_text_oprimitive<OStream>::save_binary(
8
>
>
- ,72
+ ,76
,const char // cwpro8 needs this
>
base64_text;
@@ -43,7 +43,7 @@ struct to_6_bit {
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,
- 52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,
+ 52,53,54,55,56,57,58,59,60,61,-1,-1,-1, 0,-1,-1, // render '=' as 0
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,
15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,
-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,
Oops, something went wrong.

0 comments on commit 256eb5b

Please sign in to comment.