Re: [Boost-bugs] [Boost C++ Libraries] #11267: Nested boost::fusion::make_list fails to compile under boost 1.58.0

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11267: Nested boost::fusion::make_list fails to compile under boost 1.58.0
From: Damien Buhl (damien.buhl_at_[hidden])
Date: 2015-05-05 06:11:52


Hi Joel,

I looked into the container:

> clang++ --std=c++11 -DBOOST_CONSTEXPR= boostFusion_ticket11267_nestedMakeList.cpp -I ~/workspace/boost/
> clang++ --std=c++11 boostFusion_ticket11267_nestedMakeList.cpp -I ~/workspace/boost/

And both don't compile so it is not related to any constexpr I think,
but I can be wrong.

What happens for me is :
> In file included from boostFusion_ticket11267_nestedMakeList.cpp:1:
> In file included from /home/daminetreg/workspace/boost/boost/fusion/container/generation/make_list.hpp:16:
> In file included from /home/daminetreg/workspace/boost/boost/fusion/container/list/list.hpp:12:
> In file included from /home/daminetreg/workspace/boost/boost/fusion/container/list/detail/list_to_cons.hpp:11:
> /home/daminetreg/workspace/boost/boost/fusion/container/list/cons.hpp:69:15: error: no viable conversion from 'const car_type' (aka 'const boost::fusion::list<double, std::basic_string<char>, boost::fusion::void_, boost::fusion::void_,
> boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_>') to 'car_type' (aka 'double')
> : car(rhs.car), cdr(rhs.cdr) {}

Didn't you want to CC Flast also ?

I'll try to look into it this week, but Flast may know this part quite
better than me.

Cheers,

--
Damien Buhl
On 05/05/2015 02:20, Joel de Guzman wrote:
> Hey guys, are all these related?
> 
> -------- Forwarded Message --------
> Subject: [Boost C++ Libraries] #11267: Nested boost::fusion::make_list
> fails to compile under boost 1.58.0
> Date: Tue, 05 May 2015 00:16:52 -0000
> From: Boost C++ Libraries <noreply_at_[hidden]>
> CC: boost-bugs_at_[hidden]
> 
> #11267: Nested boost::fusion::make_list fails to compile under boost 1.58.0
> --------------------------------------+------------------------
>  Reporter:  Andrew King <eurokang@…>  |      Owner:  djowel
>      Type:  Bugs                      |     Status:  new
> Milestone:  To Be Determined          |  Component:  fusion
>   Version:  Boost 1.58.0              |   Severity:  Regression
>  Keywords:                            |
> --------------------------------------+------------------------
>  The following code compiles just fine under boost 1.56.0 (std=c++11), but
>  fails to compile under boost-1.58.0 with either clang++-3.6 or g++-4.9.2
> 
>  {{{
>  #include <boost/fusion/container/generation/make_list.hpp>
>  #include <boost/fusion/algorithm/iteration/for_each.hpp>
>  #include <iostream>
> 
>  template <typename T>
>  void Handle(const T& t);
> 
>  template <typename ... T>
>  void Handle(const boost::fusion::list<T...>& x);
> 
>  struct CallFunctor
>  {
>      template <typename T>
>      void operator()(const T& t) const
>      {
>          Handle(t);
>      }
>  };
> 
>  template <typename T>
>  void Handle(const T& t)
>  {
>      std::cout << t << std::endl;
>  }
> 
>  template <typename ... T>
>  void Handle(const boost::fusion::list<T...>& x)
>  {
>      boost::fusion::for_each(x, CallFunctor{});
>  }
> 
>  template <typename List>
>  void PrintList(const List& list)
>  {
>      boost::fusion::for_each(list, CallFunctor{});
>  }
> 
>  int main()
>  {
>      PrintList(
>          boost::fusion::make_list(
>              std::string("x"),
>              4,
>              6,
>              boost::fusion::make_list(23.0, std::string("rar"))));
> 
>      return 0;
>  }
>  }}}
> 
>  There appears to be a compile error with the use of boost::is_convertible
>  inside boost::enable_if in boost/fusion/container/list/cons.hpp:79
> 

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC