[variant] 1.58 boost/variant/get.hpp compile errors

Hello list, I recently updated to boost 1.58 and one of my programs didn't compile any more. The reason was the <boost/variant/get.hpp> header. A simple test program and compiler output is attached below. Swapping the order of the includes or including <boost/type_traits/remove_cv.hpp> before <boost/variant/get.hpp> in the test program will get rid of the errors. It would appear that <boost/variant/detail/element_index.hpp> should include <boost/type_traits/remove_cv.hpp>. Kind regards, Maarten de Vries Test program: #include <boost/variant/get.hpp>
#include <boost/variant/variant.hpp>
int main() { return 0; }
Compiler output g++ (GCC) 4.9.2 20150304 (prerelease): In file included from /usr/include/boost/variant/get.hpp:24:0,
from test.cpp:1: /usr/include/boost/variant/detail/element_index.hpp:38:69: error: ‘remove_cv’ in namespace ‘boost’ does not name a template type variant_element_functor<boost::mpl::_1, typename boost::remove_cv<T>::type > ^ /usr/include/boost/variant/detail/element_index.hpp:38:78: error: expected template-argument before ‘<’ token variant_element_functor<boost::mpl::_1, typename boost::remove_cv<T>::type >
^ /usr/include/boost/variant/detail/element_index.hpp:38:78: error: expected ‘>’ before ‘<’ token /usr/include/boost/variant/detail/element_index.hpp:38:88: error: template argument 2 is invalid variant_element_functor<boost::mpl::_1, typename boost::remove_cv<T>::type >
^ /usr/include/boost/variant/detail/element_index.hpp:39:9: error: expected ‘::’ before ‘>’ token > ^ /usr/include/boost/variant/detail/element_index.hpp:39:9: error: expected identifier before ‘>’ token /usr/include/boost/variant/detail/element_index.hpp:39:9: error: template argument 2 is invalid /usr/include/boost/variant/detail/element_index.hpp:40:5: error: expected ‘::’ before ‘>’ token > ^ /usr/include/boost/variant/detail/element_index.hpp:40:5: error: expected identifier before ‘>’ token /usr/include/boost/variant/detail/element_index.hpp:40:5: error: template argument 2 is invalid /usr/include/boost/variant/detail/element_index.hpp:41:1: error: expected ‘::’ before ‘{’ token {}; ^ /usr/include/boost/variant/detail/element_index.hpp:41:1: error: expected class-name before ‘{’ token

On 4 May 2015 at 15:12, Maarten de Vries <maarten@de-vri.es> wrote:
I recently updated to boost 1.58 and one of my programs didn't compile any more. The reason was the <boost/variant/get.hpp> header. A simple test program and compiler output is attached below. Swapping the order of the includes or including <boost/type_traits/remove_cv.hpp> before <boost/variant/get.hpp> in the test program will get rid of the errors. It would appear that <boost/variant/detail/element_index.hpp> should include <boost/type_traits/remove_cv.hpp>.
If my assumption was correct, pull request here: https://github.com/boostorg/variant/pull/15

On Mon, May 4, 2015 at 7:43 AM, Maarten de Vries <maarten@de-vri.es> wrote:
[snip]
If my assumption was correct, pull request here: https://github.com/boostorg/variant/pull/15
I see that this has been addressed, but I noticed that your pull request was for merging into the "master" branch.
That's a non-starter; pull requests should always go into "develop", and then after the tests cycle, they can be merged to "master" -- Marshall

AMDG On 05/13/2015 08:51 PM, Marshall Clow wrote:
On Mon, May 4, 2015 at 7:43 AM, Maarten de Vries <maarten@de-vri.es> wrote:
[snip]
If my assumption was correct, pull request here: https://github.com/boostorg/variant/pull/15
I see that this has been addressed, but I noticed that your pull request was for merging into the "master" branch.
That's a non-starter; pull requests should always go into "develop", and then after the tests cycle, they can be merged to "master"
Personally, while I prefer pull requests to be against develop, I always manually merge and rebase them anyway. I don't think people should have to know the details of our processes to submit pull requests. In Christ, Steven Watanabe
participants (3)
-
Maarten de Vries
-
Marshall Clow
-
Steven Watanabe