2
0
mirror of https://github.com/boostorg/phoenix.git synced 2026-02-19 02:32:09 +00:00

Merge branch 'documents' into release-3.1.0

This commit is contained in:
John Fletcher
2014-12-30 14:50:27 +00:00
10 changed files with 44 additions and 13 deletions

View File

@@ -71,7 +71,7 @@ Additionally, there exist function call operators accepting permutations of cons
and non-const references. These operators are created for all N <=
`BOOST_PHOENIX_PERFECT_FORWARD_LIMIT` (which defaults to 3).
[def [$http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm]
[def $http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm]
[note *Forwarding Function Problem*

View File

@@ -1,6 +1,7 @@
[library Phoenix
[quickbook 1.3]
[version 3.0.5]
[quickbook 1.6]
[compatibility-mode 1.3]
[version 3.1.0]
[authors [de Guzman, Joel], [Marsden, Dan], [Heller, Thomas], [Fletcher, John] ]
[copyright 2002 2003 2004 2005 2010 2014 Joel de Guzman, Dan Marsden, Thomas Heller, John Fletcher]
[category string-text]
@@ -17,6 +18,7 @@
[/ September 2005]
[/ June 2010]
[/ February 2014]
[/ December 2014]
[/ Some links]

View File

@@ -9,19 +9,34 @@
[section What's New]
[section Phoenix 3.0.5]
[section Phoenix 3.1.0]
This is the latest in a series of updates to Phoenix to fix some bugs and
to extend the examples. Details of the changes will be found in the __changelog__
and the release number will be increased for each set of changes released.
* A start is being made on updating the documentation.
* A bug has been fixed which was causing a lot of test examples of *bind* to fail. This was particularly the case with more recent compilers which are stricter.
* TODO
There is still a lot of work to be done on fixes, documentation and examples.
[endsect]
[section Phoenix 3.0.6 (Boost 1.57.0)]
* Fixed bug in example/container_actor.cpp in end() function.
* Fixed bug4853 and 5626 - added header <utility> for std::forward.
* Fixed bug4853 - added header <iostream> for gcc 4.9 test
[endsect]
[section Phoenix 3.0.5]
* Introduction of __changelog__ and release number increments.
* Added BOOST_PHOENIX_VERSION_NUMBER using boost/predef style.
* Fixes to bugs #5714 and #5824 are particularly important as they fixed silent errors
in the processing of some compound expressions with commas. *This could cause output
from some user codes to change unexpectedly.*
* TODO
There is still a lot of work to be done on fixes, documentation and examples.
[endsect]

View File

@@ -16,7 +16,9 @@
namespace boost {
#ifdef BOOST_NO_CXX11_DECLTYPE
#if (defined (BOOST_NO_CXX11_DECLTYPE) || \
defined (BOOST_INTEL_CXX_VERSION) || \
(BOOST_GCC_VERSION < 40500) )
#define BOOST_PHOENIX_MATH_FUNCTION(name, n) \
namespace phoenix_impl { \
struct name ## _impl { \

View File

@@ -59,8 +59,10 @@ namespace
std::set<int> s(array, array + 3);
BOOST_TEST(boost::phoenix::find(arg1, 2)(s) == s.find(2));
#if !(defined(BOOST_MSVC) && (BOOST_MSVC >= 1900))
std::map<int, int> m = boost::assign::map_list_of(0, 1)(2, 3)(4, 5);
BOOST_TEST(boost::phoenix::find(arg1, 2)(m) == m.find(2));
#endif
#ifdef BOOST_PHOENIX_HAS_HASH

View File

@@ -26,7 +26,9 @@ main()
const char* world = " world";
#if !(defined(BOOST_MSVC) && (BOOST_MSVC >= 1900))
BOOST_TEST((ref(i) = ref(i))() == 5);
#endif
BOOST_TEST((ref(i) = 3)() == 3);
BOOST_TEST(i == 3);
i = 5;

View File

@@ -55,12 +55,14 @@ int range_test_complex() {
for(unsigned i = 0; i < result1.size(); ++i)
std::cout << result1[i] << "\n";
#if !(BOOST_GCC_VERSION < 40500)
boost::push_back(result2, source | transformed(phoenix::bind(&Foo::value_, *arg1)) | uniqued);
for(unsigned i = 0; i < result2.size(); ++i)
std::cout << result2[i] << "\n";
#endif
return 0;
}

View File

@@ -18,7 +18,9 @@ int main()
{
char X('x');
find(boost::as_literal("fox"), 'x')(); // works
#ifndef BOOST_NO_CXX11_DECLTYPE
#if !(defined (BOOST_NO_CXX11_DECLTYPE) || \
defined (BOOST_INTEL_CXX_VERSION) || \
(BOOST_GCC_VERSION < 40500) )
const char *Y = find(boost::as_literal("fox"), arg1)('x'); // works for C++11
#else
const char *Y = find(boost::as_literal("fox"), construct<char>(arg1))('x'); // works

View File

@@ -1,5 +1,6 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Copyright (c) 2014 John Fletcher
Distributed under 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)
@@ -148,27 +149,29 @@ main()
{
using boost::phoenix::for_each;
#if (!defined(BOOST_MSVC) || (BOOST_MSVC < 1800))
int init[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
std::vector<int> v(init, init+10);
int x = 0;
for_each(_1, lambda(_a = _2)[_a += _1])(v, x);
BOOST_TEST(x == 55);
#endif
}
{
using boost::phoenix::for_each;
using boost::phoenix::push_back;
#if (!defined(BOOST_MSVC) || (BOOST_MSVC < 1800))
int x = 10;
std::vector<std::vector<int> > v(10);
for_each(_1, lambda(_a = _2)[push_back(_1, _a)])(v, x);
int y = 0;
for_each(arg1, lambda[ref(y) += _1[0]])(v);
BOOST_TEST(y == 100);
#endif
}
{

View File

@@ -1,5 +1,6 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Copyright (c) 2014 John Fletcher
Distributed under 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)
@@ -16,7 +17,7 @@ int main()
{
double eps = 0.000001;
using namespace boost::phoenix::arg_names;
boost::function<bool(double, double)> f = fabs(_1 - _2) < eps;
boost::function<bool(double, double)> f = boost::phoenix::fabs(_1 - _2) < eps;
double x = boost::phoenix::pow(_1,_2)(2.,2.);
double y = boost::phoenix::atan2(_1,_2)(1.,1.);