From 8bd4765b401e2d61ddb328b3e8fa39ff3bbcc600 Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Sat, 27 Aug 2016 16:36:28 +0900 Subject: [PATCH] Fix result type deduction failure. In some cases, result type deduction is failed due to specialization restricts to const cv-ref even though doesn't change it. ``` const char X = 'x'; phx::find(boost::as_literal("fox"), arg1)(X); // works char X = 'x'; phx::find(boost::as_literal("fox"), arg1)(X); // should be accepted, but... ``` --- include/boost/phoenix/stl/algorithm/querying.hpp | 16 ++++++++-------- .../phoenix/stl/algorithm/transformation.hpp | 6 +++--- .../boost/phoenix/stl/container/container.hpp | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/boost/phoenix/stl/algorithm/querying.hpp b/include/boost/phoenix/stl/algorithm/querying.hpp index 12a3bb7..36d1a14 100644 --- a/include/boost/phoenix/stl/algorithm/querying.hpp +++ b/include/boost/phoenix/stl/algorithm/querying.hpp @@ -40,7 +40,7 @@ namespace boost { namespace phoenix { struct result; template - struct result + struct result : range_iterator {}; @@ -202,7 +202,7 @@ namespace boost { namespace phoenix { struct result; template - struct result + struct result : range_difference {}; @@ -314,12 +314,12 @@ namespace boost { namespace phoenix { struct result; template - struct result + struct result : range_iterator {}; template - struct result + struct result : range_iterator {}; @@ -358,12 +358,12 @@ namespace boost { namespace phoenix { struct result; template - struct result + struct result : range_iterator {}; template - struct result + struct result : range_iterator {}; @@ -414,12 +414,12 @@ namespace boost { namespace phoenix { struct result; template - struct result + struct result : result_of::equal_range {}; template - struct result + struct result : result_of::equal_range {}; diff --git a/include/boost/phoenix/stl/algorithm/transformation.hpp b/include/boost/phoenix/stl/algorithm/transformation.hpp index ee23232..37fd967 100644 --- a/include/boost/phoenix/stl/algorithm/transformation.hpp +++ b/include/boost/phoenix/stl/algorithm/transformation.hpp @@ -158,7 +158,7 @@ namespace boost { namespace phoenix { namespace impl struct result; template - struct result + struct result : detail::decay_array {}; @@ -176,7 +176,7 @@ namespace boost { namespace phoenix { namespace impl struct result; template - struct result + struct result : detail::decay_array {}; @@ -238,7 +238,7 @@ namespace boost { namespace phoenix { namespace impl struct result; template - struct result + struct result : range_iterator { }; diff --git a/include/boost/phoenix/stl/container/container.hpp b/include/boost/phoenix/stl/container/container.hpp index 941d449..f9dbbdb 100644 --- a/include/boost/phoenix/stl/container/container.hpp +++ b/include/boost/phoenix/stl/container/container.hpp @@ -94,7 +94,7 @@ namespace boost { namespace phoenix , typename C , typename Arg1 > - struct result + struct result { typedef typename add_reference::type type; };