Boost logo

Boost Users :

Subject: [Boost-users] Trouble with std::forward and fusion vector using clang 3.4 and older library - is there a workaround?
From: Stan Blakey (stan_at_[hidden])
Date: 2016-12-06 08:42:04


I am trying to compile using clang 3.4 and -std=c++11.

With the -std=c++11 it compiles and runs without any issue.
With -std=c++11 I get

boost_1_60_0\boost/fusion/container/vector/vector.hpp:126:20: error: no
template named 'forward' in namespace 'std'; did you mean
'advance_detail::forward'?

return std::forward<result>(*advance_c<N>(begin(seq)));
and many similar errors.

I have tried all the boost

BOOST_NO_CXX11_HDR_ macros but not found one that resolves this issue.

I don't have any choice about compiler version or library version due to
other constraints.

Any suggestions appreciated,

Stan

*#include* <boost/fusion/tuple.hpp>

*#include* <boost/fusion/algorithm.hpp>

*#include* <string>

*#include <iostream>*

*using* *namespace* boost::fusion;

*struct* print

{

*template* <*typename* *T*>

*void* *operator()*(*const* *T* &t) *const*

{

std::cout << std::boolalpha << t << '\n';

}

};

*int* *main*()

{

*typedef* tuple<*int*, std::string, *bool*, *double*> tuple_type;

tuple_type t(10,"Boost", *true*, 3.14);

for_each(t, print());

}



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net