Opened 7 years ago
Closed 7 years ago
#11267 closed Bugs (fixed)
Nested boost::fusion::make_list fails to compile under boost 1.58.0
| Reported by: | Owned by: | Joel de Guzman | |
|---|---|---|---|
| Milestone: | Boost 1.59.0 | Component: | fusion |
| Version: | Boost 1.58.0 | Severity: | Regression |
| Keywords: | Cc: |
Description
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
Change History (3)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
| Milestone: | To Be Determined → Boost 1.59.0 |
|---|
comment:3 by , 7 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

Reduced.
and it relates to constexpr ctor since compiles with -DBOOST_NO_CXX11_CONSTEXPR.