diff --git a/ChangeLog b/ChangeLog index e940f8b..80269fc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -46,6 +46,8 @@ Added test bug5875 - test withdrawn for further checking. CHANGELOG - DEVELOP +- patch for #10927 in test/stdlib/cmath.cpp +- patch for #11085 in test/function/function_tests.cpp - V3.2.0 diff --git a/doc/html/phoenix-doc_HTML.manifest b/doc/html/phoenix-doc_HTML.manifest index 63a9dbb..9621af5 100644 --- a/doc/html/phoenix-doc_HTML.manifest +++ b/doc/html/phoenix-doc_HTML.manifest @@ -75,6 +75,7 @@ phoenix/lazy_list/what_is_provided.html phoenix/lazy_list/tutorial_with_examples.html phoenix/lazy_list/tutorial_with_examples/arithmetic_functions.html phoenix/lazy_list/tutorial_with_examples/list_generation.html +phoenix/lazy_list/exceptions.html phoenix/lazy_list/implementation_details.html phoenix/lazy_list/testing.html phoenix/lazy_list/where_next_.html diff --git a/doc/html/phoenix/lazy_list.html b/doc/html/phoenix/lazy_list.html index 3cf0654..d00984e 100644 --- a/doc/html/phoenix/lazy_list.html +++ b/doc/html/phoenix/lazy_list.html @@ -37,6 +37,7 @@
list<int> l0; +list<int> example;A list can contain zero or more elements of the same type. It can also be declared @@ -60,6 +61,22 @@ evaluated on demand. A set of functions are defined which enable many ways of manipulating and using lists. Examples are provided for the features available.
++ Exceptions are provided to deal with certain cases and these can be turned + off if desired. There is a check on the maximum list length which has a default + of 1000 which can be changed by the user. +
++ This is an extension to Boost Phoenix which does not change the public interface + except to define new features in the namespace +
+boost::phoenix +++ It has to be explicitly included using the header +
+boost/phoenix/function/lazy_prelude.hpp +Introduction diff --git a/doc/html/phoenix/lazy_list/implementation_details.html b/doc/html/phoenix/lazy_list/implementation_details.html index 20d567b..a9a4f76 100644 --- a/doc/html/phoenix/lazy_list/implementation_details.html +++ b/doc/html/phoenix/lazy_list/implementation_details.html @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@
@@ -197,69 +197,68 @@ to the list and return the function which will add the next element. That only gets called when it is needed. -
template <class T> -struct EFH -{ - typedef typename boost::remove_reference<T> TT; - typedef typename boost::remove_const<TT>::type TTT; - mutable T x; - EFH( const T& xx) : x(xx) {} - template <typename Sig> struct result; +template <class T> + struct EFH + { + mutable T x; + EFH( const T& xx) : x(xx) {} + template <typename Sig> struct result; - template <typename This> - struct result<This(T)> - { - typedef typename boost::phoenix::UseList::template - List<T>::type LType; - typedef typename boost::phoenix::result_of:: - ListType<LType>::delay_result_type type; - }; - typename result<EFH(T)>::type operator()() const { - typedef typename UseList::template List<T>::type LType; - typedef typename result_of::ListType<LType>:: - delay_result_type result_type; - typedef boost::function0<result_type> fun1_R_TTT; - //std::cout << "EFH (" << x << ")" << std::endl; - ++x; - fun1_R_TTT efh_R_TTT = EFH<T>(x); - typedef boost::phoenix::function<fun1_R_TTT> EFH_R_T; - EFH_R_T efh_R_T(efh_R_TTT); - if (x > MAX_LIST_LENGTH) - throw lazy_exception("Running away in EFH!!"); - return cons( x-1, efh_R_T() ); - } -}; + template <typename This, class TT> + struct result<This(TT)> + { + typedef typename boost::phoenix::UseList::template + List<TT>::type LType; + typedef typename boost::phoenix::result_of:: + ListType<LType>::delay_result_type type; + }; + typename result<EFH(T)>::type operator()() const { + typedef typename UseList::template List<T>::type LType; + typedef typename result_of::ListType<LType>:: + delay_result_type result_type; + typedef boost::function0<result_type> fun1_R_TTT; + ++x; + fun1_R_TTT efh_R_TTT = EFH<T>(x); + typedef boost::phoenix::function<fun1_R_TTT> EFH_R_T; + EFH_R_T efh_R_T(efh_R_TTT); +#ifndef BOOST_PHOENIX_NO_LAZY_EXCEPTIONS + if (x > BOOST_PHOENIX_FUNCTION_MAX_LAZY_LIST_LENGTH) + throw lazy_exception("Running away in EFH!!"); +#endif + return cons( x-1, efh_R_T() ); + } + }; -struct Enum_from { - template <typename Sig> struct result; + struct Enum_from { + template <typename Sig> struct result; - template <typename This, typename T> - struct result<This(T)> - { - typedef typename boost::remove_reference<T>::type TT; - typedef typename boost::remove_const<TT>::type TTT; - typedef typename UseList::template List<TTT>::type LType; - typedef typename result_of::ListType<LType>:: - delay_result_type type; - }; + template <typename This, typename T> + struct result<This(T)> + { + typedef typename boost::remove_reference<T>::type TT; + typedef typename boost::remove_const<TT>::type TTT; + typedef typename UseList::template List<TTT>::type LType; + typedef typename result_of::ListType<LType>:: + delay_result_type type; + }; - template <class T> - typename result<Enum_from(T)>::type operator() - (const T & x) const - { - typedef typename boost::remove_reference<T>::type TT; - typedef typename boost::remove_const<TT>::type TTT; - typedef typename UseList::template List<T>::type LType; - typedef typename result_of::ListType<LType>:: - delay_result_type result_type; - typedef boost::function0<result_type> fun1_R_TTT; - fun1_R_TTT efh_R_TTT = EFH<TTT>(x); - typedef boost::phoenix::function<fun1_R_TTT> EFH_R_T; - EFH_R_T efh_R_T(efh_R_TTT); - //std::cout << "enum_from (" << x << ")" << std::endl; - return efh_R_T(); - } -}; + template <class T> + typename result<Enum_from(T)>::type operator() + (const T & x) const + { + typedef typename boost::remove_reference<T>::type TT; + typedef typename boost::remove_const<TT>::type TTT; + typedef typename UseList::template List<T>::type LType; + typedef typename result_of::ListType<LType>:: + delay_result_type result_type; + typedef boost::function0<result_type> fun1_R_TTT; + fun1_R_TTT efh_R_TTT = EFH<TTT>(x); + typedef boost::phoenix::function<fun1_R_TTT> EFH_R_T; + EFH_R_T efh_R_T(efh_R_TTT); + //std::cout << "enum_from (" << x << ")" << std::endl; + return efh_R_T(); + } + };Similar code is used in the related functors @@ -287,7 +286,7 @@