Opened 6 years ago

Last modified 6 years ago

#12331 reopened Bugs

BOOST_FUSION_ADAPT_STRUCT doesn't work with empty struct on Visual Studio

Reported by: Benoit Blanchon <benoit@…> Owned by: Joel de Guzman
Milestone: To Be Determined Component: fusion
Version: Boost 1.61.0 Severity: Problem
Keywords: Cc:

Description

The following code works fine on GCC and Clang:

#include <boost/fusion/adapted/struct/adapt_struct.hpp>

class EmptyStruct {};

BOOST_FUSION_ADAPT_STRUCT(EmptyStruct);

int main() {}

But on Visual Studio 2015 Update 3, it gives the following error:

error C2220: warning treated as error - no 'object' file generated
warning C4003: not enough actual parameters for macro 'BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY'
warning C4003: not enough actual parameters for macro 'BOOST_PP_SEQ_DETAIL_EMPTY_SIZE

Change History (7)

comment:1 by Kohei Takahashi, 6 years ago

Resolution: duplicate
Status: newclosed

dup of #6592

comment:2 by Edouard, 6 years ago

It's not a duplicate, the feature has been added, it's just not supported in VS.

comment:3 by Joel de Guzman, 6 years ago

Resolution: duplicate
Status: closedreopened

comment:4 by Joel de Guzman, 6 years ago

Reopened this one. This is specific to VS. I'm not so sure about the other one. #6592

in reply to:  2 comment:5 by Kohei Takahashi, 6 years ago

Replying to Edouard:

It's not a duplicate, the feature has been added, it's just not supported in VS.

If so, should #6592 be closed, right?

comment:6 by Joel de Guzman, 6 years ago

Yes, I think #6592 is obsolete.

comment:7 by Benoit Blanchon <benoit@…>, 6 years ago

Well, #6592 is only partially obsolete.

Even if BOOST_FUSION_ADAPT_STRUCT accepts an empty struct, BOOST_FUSION_DEFINE_STRUCT still doesn't.

Note: See TracTickets for help on using tickets.