----- Original Message -----
From: Vincent N. Virgilio
Newsgroups: gmane.comp.lib.boost.user
To: boost-users@lists.boost.org
Sent: Monday, October 28, 2013 2:30 PM
Subject: [MSM] Parse error in Visual Studio 2012, not in Visual Studio 2013.

Hello,

In the code below, VS 2012 (target v110) underlines the macro name BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES in the last line with a wavy red line. Hovering a mouse over it shows a tooltip with error report:

    "Error: not a class or struct name"

And if I recall correctly, the code does not compile.


The error disappears in VS 2013 (v120). Though in VS 2013 (target v120), if I remove line "namespace msm = boost::msm;", the last line triggers an error again. This time with a different tooltip error report: "Error: name followed by '::' must be a class or namespace name."

Am I using MSM incorrectly?

Thanks,

Vince



// BEGIN euml.h

#include <boost/msm/back/state_machine.hpp>
#include <boost/msm/front/state_machine_def.hpp>
#include <boost/msm/front/euml/euml.hpp>

using namespace boost::msm::front::euml;
namespace msm = boost::msm;

BOOST_MSM_EUML_DECLARE_ATTRIBUTE(char*, charp_attr)


BOOST_MSM_EUML_ATTRIBUTES((attributes_ << charp_attr), found_attrS)

// next line gives error in VS 2012 (target v110), "Error: not a class or struct name". Not in VS 2013 (targ. v12).
BOOST_MSM_EUML_EVENT_WITH_ATTRIBUTES(found, found_attrS)

// END euml.h


_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Hi,
I don't have VS 2012 so I can't tell you about the red line. However there was a bug (some missing boost:: in names) which I just fixed in trunk (rev. 86539)
so that it should now work (it does with VS 2010). Could you give it a try?
 
Thanks for the report,
Christophe