|
Boost Users : |
Subject: [Boost-users] [MSM] Parse error in Visual Studio 2012, not in Visual Studio 2013.
From: Vincent N. Virgilio (virgilio_at_[hidden])
Date: 2013-10-28 09:30:45
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 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