Boost logo

Boost Users :

Subject: Re: [Boost-users] [MSM] Parse error in Visual Studio 2012, not in Visual Studio 2013.
From: Vince Virgilio (blueschi_at_[hidden])
Date: 2013-11-01 23:38:25


Christophe,

Thanks for the response. In fact, I did not recall correctly. The code DOES compile. But the 'parse' error remains.

I'll try the trunk when I can. Thanks for the fix.

Vince

> On Nov 1, 2013, at 2:56 PM, "Christophe Henry" <christophe.j.henry_at_[hidden]> wrote:
>
> ----- Original Message -----
> From: Vincent N. Virgilio
> Newsgroups: gmane.comp.lib.boost.user
> To: boost-users_at_[hidden]
> 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_at_[hidden]
> 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
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users



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