Skip to content

Conversation

@daminetreg
Copy link
Contributor

Relates to : https://svn.boost.org/trac/boost/ticket/11211

This removes the BOOST_CONSTEXPR macro from constructors generated by DEFINE_STRUCT_INLINE as they were generating the same error.

I also added some test cases for this. It runs under

  • clang v3.5.1 with std=c++11 & std=c++14
  • g++ v4.9.2 with std=c++11 & std=c++14

While I was doing the changes, I noticed that we may get more errors with BOOST_CONSTEXPR, as this was added in alot of place, and I'm not sure if we won't get more surprises as those in #11211.

@Flast did you make an auto-replace where BOOST_FUSION_GPU_ENABLED appeared or did you put them individually ? If it was made with auto-replace I think we have to take a tour on each place where it appears and determine if it makes sense, as GPU_ENABLED is not the same use case I think.

@Flast
Copy link
Collaborator

Flast commented Apr 29, 2015

@Flast did you make an auto-replace where BOOST_FUSION_GPU_ENABLED appeared or did you put them individually ?

I inserted the macros by hand; i.e. no auto generated.

GPU_ENABLED is not the same use case I think.

Yes, I think so.

djowel added a commit that referenced this pull request Apr 29, 2015
Further test cases and fixes for #11211
@djowel djowel merged commit 2153df5 into boostorg:master Apr 29, 2015
@daminetreg
Copy link
Contributor Author

Ok nice @Flast, this means we don't have to fear more problems. 👍

Thanks @djowel for merging. 😄

@djowel
Copy link
Collaborator

djowel commented Apr 29, 2015

No need to thank me. I should be the one to thank you guys!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daminetreg I got a error under C++98 mode with trailing comma.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes you are right. It's in else case when no variadics support, then this way of writing doesn't work, actually it should never compile when BOOST_PP_VARIADICS is disabled. I tested with BOOST_PP_VARIADICS enabled all the time for this PR.

I'll make myself a script to avoid forgetting such combinations. I'll make a PR to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants