[xpressive] Compiler error on VC7.1

Hi, I'm using Boost 1.49 Xpressive on VC7.1. When I compile the following code, I get compiler errors (these do not appear on VC9): sregex const& rex = bos >> _serverName >> !as_xpr("_GWDomino") >> ".diagnostics" >> *(as_xpr(".base")|".renamed"); 'rex' is really a function parameter in my real world use case. I'm passing the entire static regex into a function that takes a 'sregex const&'. I get the compiler error below. Anyone know why this is happening? C:\Code\work\cmake-decomp\build-vc7\third_party\boost\1.49.0-stlport-5.2.1\include\boost\proto\traits.hpp(691) : error C2664: 'boost::proto::exprns_::expr<Tag,Args,Arity>::expr(const boost::proto::exprns_::expr<Tag,Args,Arity> &)' : cannot convert parameter 1 from 'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to 'const boost::proto::exprns_::expr<Tag,Args,Arity> &' with [ Tag=boost::proto::tagns_::tag::terminal, Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>, Arity=0 ] and [ T=const char [10], Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type, WantsBasicExpr=false ] and [ Tag=boost::proto::tagns_::tag::terminal, Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>, Arity=0 ] Reason: cannot convert from 'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to 'const boost::proto::exprns_::expr<Tag,Args,Arity>' with [ T=const char [10], Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type, WantsBasicExpr=false ] and [ Tag=boost::proto::tagns_::tag::terminal, Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>, Arity=0 ] No constructor could take the source type, or constructor overload resolution was ambiguous \Code\work\cmake-decomp\server\exchange\tools\uploadlog\uploader.cpp(1372) : see reference to function template instantiation 'const boost::add_const<T>::type boost::proto::functional::as_expr<>::operator ()<char,10>(const char (&)[10]) const' being compiled with [ T=boost::proto::detail::as_expr<const char [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::result_type ]

Anyone have an idea on this issue? It's currently blocking me from checking in this code to source control, since the code absolutely must work on MSVC 7.1 :-( On Thu, May 10, 2012 at 4:45 PM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
Hi,
I'm using Boost 1.49 Xpressive on VC7.1. When I compile the following code, I get compiler errors (these do not appear on VC9):
sregex const& rex = bos >> _serverName >> !as_xpr("_GWDomino") >> ".diagnostics" >> *(as_xpr(".base")|".renamed");
'rex' is really a function parameter in my real world use case. I'm passing the entire static regex into a function that takes a 'sregex const&'. I get the compiler error below. Anyone know why this is happening?
C:\Code\work\cmake-decomp\build-vc7\third_party\boost\1.49.0-stlport-5.2.1\include\boost\proto\traits.hpp(691) : error C2664: 'boost::proto::exprns_::expr<Tag,Args,Arity>::expr(const boost::proto::exprns_::expr<Tag,Args,Arity> &)' : cannot convert parameter 1 from 'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to 'const boost::proto::exprns_::expr<Tag,Args,Arity> &' with [ Tag=boost::proto::tagns_::tag::terminal,
Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>, Arity=0 ] and [ T=const char [10],
Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type, WantsBasicExpr=false ] and [ Tag=boost::proto::tagns_::tag::terminal,
Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>, Arity=0 ] Reason: cannot convert from 'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to 'const boost::proto::exprns_::expr<Tag,Args,Arity>' with [ T=const char [10],
Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type, WantsBasicExpr=false ] and [ Tag=boost::proto::tagns_::tag::terminal,
Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>, Arity=0 ] No constructor could take the source type, or constructor overload resolution was ambiguous
\Code\work\cmake-decomp\server\exchange\tools\uploadlog\uploader.cpp(1372) : see reference to function template instantiation 'const boost::add_const<T>::type boost::proto::functional::as_expr<>::operator ()<char,10>(const char (&)[10]) const' being compiled with [ T=boost::proto::detail::as_expr<const char [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::result_type ]

I just tried the below code on VC++ 2003 (7.1) and was unable to reproduce your error. (I assume _serverName is of type sregex?) I'm afraid I don't know what to tell you. Perhaps if you could give me a complete repro scenario, I might be able to help. On 5/11/2012 9:56 AM, Robert Dailey wrote:
Anyone have an idea on this issue? It's currently blocking me from checking in this code to source control, since the code absolutely must work on MSVC 7.1 :-(
On Thu, May 10, 2012 at 4:45 PM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
Hi,
I'm using Boost 1.49 Xpressive on VC7.1. When I compile the following code, I get compiler errors (these do not appear on VC9):
sregex const& rex = bos >> _serverName >> !as_xpr("_GWDomino") >> ".diagnostics" >> *(as_xpr(".base")|".renamed");
'rex' is really a function parameter in my real world use case. I'm passing the entire static regex into a function that takes a 'sregex const&'. I get the compiler error below. Anyone know why this is happening?
C:\Code\work\cmake-decomp\build-vc7\third_party\boost\1.49.0-stlport-5.2.1\include\boost\proto\traits.hpp(691) : error C2664: 'boost::proto::exprns_::expr<Tag,Args,Arity>::expr(const boost::proto::exprns_::expr<Tag,Args,Arity> &)' : cannot convert parameter 1 from 'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to 'const boost::proto::exprns_::expr<Tag,Args,Arity> &' with [ Tag=boost::proto::tagns_::tag::terminal,
Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>, Arity=0 ] and [ T=const char [10],
Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type, WantsBasicExpr=false ] and [ Tag=boost::proto::tagns_::tag::terminal,
Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>, Arity=0 ] Reason: cannot convert from 'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to 'const boost::proto::exprns_::expr<Tag,Args,Arity>' with [ T=const char [10],
Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type, WantsBasicExpr=false ] and [ Tag=boost::proto::tagns_::tag::terminal,
Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>, Arity=0 ] No constructor could take the source type, or constructor overload resolution was ambiguous
\Code\work\cmake-decomp\server\exchange\tools\uploadlog\uploader.cpp(1372) : see reference to function template instantiation 'const boost::add_const<T>::type boost::proto::functional::as_expr<>::operator ()<char,10>(const char (&)[10]) const' being compiled with [ T=boost::proto::detail::as_expr<const char [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::result_type ]
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Eric Niebler BoostPro Computing http://www.boostpro.com

_serverName is a std::string. I wish I could better understand the compiler error, I just don't know for sure if it's a problem with my own code or an incompatibility with boost & MSVC7.1 On Fri, May 11, 2012 at 1:51 PM, Eric Niebler <eric@boostpro.com> wrote:
I just tried the below code on VC++ 2003 (7.1) and was unable to reproduce your error. (I assume _serverName is of type sregex?) I'm afraid I don't know what to tell you. Perhaps if you could give me a complete repro scenario, I might be able to help.
Anyone have an idea on this issue? It's currently blocking me from checking in this code to source control, since the code absolutely must work on MSVC 7.1 :-(
On Thu, May 10, 2012 at 4:45 PM, Robert Dailey <rcdailey.lists@gmail.com wrote:
Hi,
I'm using Boost 1.49 Xpressive on VC7.1. When I compile the following code, I get compiler errors (these do not appear on VC9):
sregex const& rex = bos >> _serverName >> !as_xpr("_GWDomino") >> ".diagnostics" >> *(as_xpr(".base")|".renamed");
'rex' is really a function parameter in my real world use case. I'm passing the entire static regex into a function that takes a 'sregex const&'. I get the compiler error below. Anyone know why this is happening?
C:\Code\work\cmake-decomp\build-vc7\third_party\boost\1.49.0-stlport-5.2.1\include\boost\proto\traits.hpp(691)
: error C2664: 'boost::proto::exprns_::expr<Tag,Args,Arity>::expr(const boost::proto::exprns_::expr<Tag,Args,Arity> &)' : cannot convert
On 5/11/2012 9:56 AM, Robert Dailey wrote: parameter
1 from
'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to
'const boost::proto::exprns_::expr<Tag,Args,Arity> &' with [ Tag=boost::proto::tagns_::tag::terminal,
Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char
[10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>,
Arity=0 ] and [ T=const char [10],
Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type,
WantsBasicExpr=false ] and [ Tag=boost::proto::tagns_::tag::terminal,
Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const
char
[10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>,
Arity=0 ] Reason: cannot convert from
'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to
'const boost::proto::exprns_::expr<Tag,Args,Arity>' with [ T=const char [10],
Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type,
WantsBasicExpr=false ] and [ Tag=boost::proto::tagns_::tag::terminal,
Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const
char
[10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>,
Arity=0 ] No constructor could take the source type, or constructor
overload
resolution was ambiguous
\Code\work\cmake-decomp\server\exchange\tools\uploadlog\uploader.cpp(1372)
: see reference to function template instantiation 'const boost::add_const<T>::type boost::proto::functional::as_expr<>::operator ()<char,10>(const char (&)[10]) const' being compiled with [ T=boost::proto::detail::as_expr<const char
[10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::result_type
]
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Eric Niebler BoostPro Computing http://www.boostpro.com
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

The problem appears to be with as_xpr(). If I don't use it, it compiles fine. On Mon, May 14, 2012 at 11:38 AM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
_serverName is a std::string.
I wish I could better understand the compiler error, I just don't know for sure if it's a problem with my own code or an incompatibility with boost & MSVC7.1
On Fri, May 11, 2012 at 1:51 PM, Eric Niebler <eric@boostpro.com> wrote:
I just tried the below code on VC++ 2003 (7.1) and was unable to reproduce your error. (I assume _serverName is of type sregex?) I'm afraid I don't know what to tell you. Perhaps if you could give me a complete repro scenario, I might be able to help.
Anyone have an idea on this issue? It's currently blocking me from checking in this code to source control, since the code absolutely must work on MSVC 7.1 :-(
On Thu, May 10, 2012 at 4:45 PM, Robert Dailey < rcdailey.lists@gmail.com>wrote:
Hi,
I'm using Boost 1.49 Xpressive on VC7.1. When I compile the following code, I get compiler errors (these do not appear on VC9):
sregex const& rex = bos >> _serverName >> !as_xpr("_GWDomino") >> ".diagnostics" >> *(as_xpr(".base")|".renamed");
'rex' is really a function parameter in my real world use case. I'm passing the entire static regex into a function that takes a 'sregex const&'. I get the compiler error below. Anyone know why this is happening?
C:\Code\work\cmake-decomp\build-vc7\third_party\boost\1.49.0-stlport-5.2.1\include\boost\proto\traits.hpp(691)
: error C2664: 'boost::proto::exprns_::expr<Tag,Args,Arity>::expr(const boost::proto::exprns_::expr<Tag,Args,Arity> &)' : cannot convert
On 5/11/2012 9:56 AM, Robert Dailey wrote: parameter
1 from
'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to
'const boost::proto::exprns_::expr<Tag,Args,Arity> &' with [ Tag=boost::proto::tagns_::tag::terminal,
Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char
[10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>,
Arity=0 ] and [ T=const char [10],
Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type,
WantsBasicExpr=false ] and [ Tag=boost::proto::tagns_::tag::terminal,
Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const
char
[10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>,
Arity=0 ] Reason: cannot convert from
'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to
'const boost::proto::exprns_::expr<Tag,Args,Arity>' with [ T=const char [10],
Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type,
WantsBasicExpr=false ] and [ Tag=boost::proto::tagns_::tag::terminal,
Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const
char
[10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>,
Arity=0 ] No constructor could take the source type, or constructor
overload
resolution was ambiguous
\Code\work\cmake-decomp\server\exchange\tools\uploadlog\uploader.cpp(1372)
: see reference to function template instantiation 'const boost::add_const<T>::type boost::proto::functional::as_expr<>::operator ()<char,10>(const char (&)[10]) const' being compiled with [ T=boost::proto::detail::as_expr<const char
[10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::result_type
]
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Eric Niebler BoostPro Computing http://www.boostpro.com
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Sorry I sent my last email too soon. Let me provide a more detailed example. This fails to compile: bos >> _serverName >> (as_xpr(".pushsvcs")|".access") But this compiles just fine (if I add an as_xpr() wrapper around ".access"): bos >> _serverName >> (as_xpr(".pushsvcs")|as_xpr(".access")) This is odd... shouldn't the former work just fine? It doesn't fail to compile on MSVC v9 On Mon, May 14, 2012 at 12:05 PM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
The problem appears to be with as_xpr(). If I don't use it, it compiles fine.
On Mon, May 14, 2012 at 11:38 AM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
_serverName is a std::string.
I wish I could better understand the compiler error, I just don't know for sure if it's a problem with my own code or an incompatibility with boost & MSVC7.1
On Fri, May 11, 2012 at 1:51 PM, Eric Niebler <eric@boostpro.com> wrote:
I just tried the below code on VC++ 2003 (7.1) and was unable to reproduce your error. (I assume _serverName is of type sregex?) I'm afraid I don't know what to tell you. Perhaps if you could give me a complete repro scenario, I might be able to help.
Anyone have an idea on this issue? It's currently blocking me from checking in this code to source control, since the code absolutely must work on MSVC 7.1 :-(
On Thu, May 10, 2012 at 4:45 PM, Robert Dailey < rcdailey.lists@gmail.com>wrote:
Hi,
I'm using Boost 1.49 Xpressive on VC7.1. When I compile the following code, I get compiler errors (these do not appear on VC9):
sregex const& rex = bos >> _serverName >> !as_xpr("_GWDomino") >> ".diagnostics" >> *(as_xpr(".base")|".renamed");
'rex' is really a function parameter in my real world use case. I'm passing the entire static regex into a function that takes a 'sregex const&'. I get the compiler error below. Anyone know why this is happening?
C:\Code\work\cmake-decomp\build-vc7\third_party\boost\1.49.0-stlport-5.2.1\include\boost\proto\traits.hpp(691)
: error C2664: 'boost::proto::exprns_::expr<Tag,Args,Arity>::expr(const boost::proto::exprns_::expr<Tag,Args,Arity> &)' : cannot convert
On 5/11/2012 9:56 AM, Robert Dailey wrote: parameter
1 from
'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to
'const boost::proto::exprns_::expr<Tag,Args,Arity> &' with [ Tag=boost::proto::tagns_::tag::terminal,
Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char
[10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>,
Arity=0 ] and [ T=const char [10],
Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type,
WantsBasicExpr=false ] and [ Tag=boost::proto::tagns_::tag::terminal,
Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const
char
[10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>,
Arity=0 ] Reason: cannot convert from
'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to
'const boost::proto::exprns_::expr<Tag,Args,Arity>' with [ T=const char [10],
Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type,
WantsBasicExpr=false ] and [ Tag=boost::proto::tagns_::tag::terminal,
Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const
char
[10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>,
Arity=0 ] No constructor could take the source type, or constructor
overload
resolution was ambiguous
\Code\work\cmake-decomp\server\exchange\tools\uploadlog\uploader.cpp(1372)
: see reference to function template instantiation 'const boost::add_const<T>::type boost::proto::functional::as_expr<>::operator ()<char,10>(const char (&)[10]) const' being compiled with [ T=boost::proto::detail::as_expr<const char
[10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::result_type
]
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Eric Niebler BoostPro Computing http://www.boostpro.com
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Here is a small sample that reproduces the issue. Compile this using Visual Studio .NET 2003 and use Boost v1.49 #include <string> #include <boost/xpressive/xpressive.hpp> int test() { std::string _serverName = "MY-MACHINE"; using namespace boost::xpressive; { // This breaks sregex r = bos >> _serverName >> (as_xpr(".pushsvcs")|"a"); } { // This does NOT break sregex r = bos >> _serverName >> (as_xpr(".pushsvcs")|'a'); } { // This does NOT break sregex r = bos >> _serverName >> (as_xpr((char const*)".pushsvcs")|"a"); } } On Mon, May 14, 2012 at 12:07 PM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
Sorry I sent my last email too soon. Let me provide a more detailed example.
This fails to compile: bos >> _serverName >> (as_xpr(".pushsvcs")|".access")
But this compiles just fine (if I add an as_xpr() wrapper around ".access"): bos >> _serverName >> (as_xpr(".pushsvcs")|as_xpr(".access"))
This is odd... shouldn't the former work just fine? It doesn't fail to compile on MSVC v9
On Mon, May 14, 2012 at 12:05 PM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
The problem appears to be with as_xpr(). If I don't use it, it compiles fine.
On Mon, May 14, 2012 at 11:38 AM, Robert Dailey <rcdailey.lists@gmail.com
wrote:
_serverName is a std::string.
I wish I could better understand the compiler error, I just don't know for sure if it's a problem with my own code or an incompatibility with boost & MSVC7.1
On Fri, May 11, 2012 at 1:51 PM, Eric Niebler <eric@boostpro.com> wrote:
I just tried the below code on VC++ 2003 (7.1) and was unable to reproduce your error. (I assume _serverName is of type sregex?) I'm afraid I don't know what to tell you. Perhaps if you could give me a complete repro scenario, I might be able to help.
Anyone have an idea on this issue? It's currently blocking me from checking in this code to source control, since the code absolutely must work on MSVC 7.1 :-(
On Thu, May 10, 2012 at 4:45 PM, Robert Dailey < rcdailey.lists@gmail.com>wrote:
Hi,
I'm using Boost 1.49 Xpressive on VC7.1. When I compile the following code, I get compiler errors (these do not appear on VC9):
sregex const& rex = bos >> _serverName >> !as_xpr("_GWDomino") >> ".diagnostics" >> *(as_xpr(".base")|".renamed");
'rex' is really a function parameter in my real world use case. I'm passing the entire static regex into a function that takes a 'sregex const&'. I get the compiler error below. Anyone know why this is happening?
C:\Code\work\cmake-decomp\build-vc7\third_party\boost\1.49.0-stlport-5.2.1\include\boost\proto\traits.hpp(691)
: error C2664: 'boost::proto::exprns_::expr<Tag,Args,Arity>::expr(const boost::proto::exprns_::expr<Tag,Args,Arity> &)' : cannot convert
On 5/11/2012 9:56 AM, Robert Dailey wrote: parameter
1 from
'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to
'const boost::proto::exprns_::expr<Tag,Args,Arity> &' with [ Tag=boost::proto::tagns_::tag::terminal,
Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char
[10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>,
Arity=0 ] and [ T=const char [10],
Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type,
WantsBasicExpr=false ] and [ Tag=boost::proto::tagns_::tag::terminal,
Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const
char
[10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>,
Arity=0 ] Reason: cannot convert from
'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to
'const boost::proto::exprns_::expr<Tag,Args,Arity>' with [ T=const char [10],
Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type,
WantsBasicExpr=false ] and [ Tag=boost::proto::tagns_::tag::terminal,
Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const
char
[10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>,
Arity=0 ] No constructor could take the source type, or constructor
overload
resolution was ambiguous
\Code\work\cmake-decomp\server\exchange\tools\uploadlog\uploader.cpp(1372)
: see reference to function template instantiation 'const boost::add_const<T>::type boost::proto::functional::as_expr<>::operator ()<char,10>(const char (&)[10]) const' being compiled with [ T=boost::proto::detail::as_expr<const char
[10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::result_type
]
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Eric Niebler BoostPro Computing http://www.boostpro.com
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Has anyone been able to reproduce the issue via the sample I've provided below? Simply paste the code in a new CPP file in Visual Studio .NET 2003 and compile :) On Mon, May 14, 2012 at 4:53 PM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
Here is a small sample that reproduces the issue. Compile this using Visual Studio .NET 2003 and use Boost v1.49
#include <string> #include <boost/xpressive/xpressive.hpp>
int test() { std::string _serverName = "MY-MACHINE";
using namespace boost::xpressive;
{ // This breaks sregex r = bos >> _serverName >> (as_xpr(".pushsvcs")|"a"); }
{ // This does NOT break sregex r = bos >> _serverName >> (as_xpr(".pushsvcs")|'a'); }
{ // This does NOT break sregex r = bos >> _serverName >> (as_xpr((char const*)".pushsvcs")|"a"); } }
On Mon, May 14, 2012 at 12:07 PM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
Sorry I sent my last email too soon. Let me provide a more detailed example.
This fails to compile: bos >> _serverName >> (as_xpr(".pushsvcs")|".access")
But this compiles just fine (if I add an as_xpr() wrapper around ".access"): bos >> _serverName >> (as_xpr(".pushsvcs")|as_xpr(".access"))
This is odd... shouldn't the former work just fine? It doesn't fail to compile on MSVC v9
On Mon, May 14, 2012 at 12:05 PM, Robert Dailey <rcdailey.lists@gmail.com
wrote:
The problem appears to be with as_xpr(). If I don't use it, it compiles fine.
On Mon, May 14, 2012 at 11:38 AM, Robert Dailey < rcdailey.lists@gmail.com> wrote:
_serverName is a std::string.
I wish I could better understand the compiler error, I just don't know for sure if it's a problem with my own code or an incompatibility with boost & MSVC7.1
On Fri, May 11, 2012 at 1:51 PM, Eric Niebler <eric@boostpro.com>wrote:
I just tried the below code on VC++ 2003 (7.1) and was unable to reproduce your error. (I assume _serverName is of type sregex?) I'm afraid I don't know what to tell you. Perhaps if you could give me a complete repro scenario, I might be able to help.
Anyone have an idea on this issue? It's currently blocking me from checking in this code to source control, since the code absolutely must work on MSVC 7.1 :-(
On Thu, May 10, 2012 at 4:45 PM, Robert Dailey < rcdailey.lists@gmail.com>wrote:
> Hi, > > I'm using Boost 1.49 Xpressive on VC7.1. When I compile the following > code, I get compiler errors (these do not appear on VC9): > > sregex const& rex = bos >> _serverName >> !as_xpr("_GWDomino") >> > ".diagnostics" >> *(as_xpr(".base")|".renamed"); > > 'rex' is really a function parameter in my real world use case. I'm > passing the entire static regex into a function that takes a 'sregex > const&'. I get the compiler error below. Anyone know why this is happening? > > > C:\Code\work\cmake-decomp\build-vc7\third_party\boost\1.49.0-stlport-5.2.1\include\boost\proto\traits.hpp(691) > : error C2664: 'boost::proto::exprns_::expr<Tag,Args,Arity>::expr(const > boost::proto::exprns_::expr<Tag,Args,Arity> &)' : cannot convert
On 5/11/2012 9:56 AM, Robert Dailey wrote: parameter
> 1 from > 'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to > 'const boost::proto::exprns_::expr<Tag,Args,Arity> &' > with > [ > Tag=boost::proto::tagns_::tag::terminal, > > Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char > [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>, > Arity=0 > ] > and > [ > T=const char [10], > > Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type, > WantsBasicExpr=false > ] > and > [ > Tag=boost::proto::tagns_::tag::terminal, > > Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char > [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>, > Arity=0 > ] > Reason: cannot convert from > 'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to > 'const boost::proto::exprns_::expr<Tag,Args,Arity>' > with > [ > T=const char [10], > > Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type, > WantsBasicExpr=false > ] > and > [ > Tag=boost::proto::tagns_::tag::terminal, > > Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char > [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>, > Arity=0 > ] > No constructor could take the source type, or constructor overload > resolution was ambiguous > > \Code\work\cmake-decomp\server\exchange\tools\uploadlog\uploader.cpp(1372) > : see reference to function template instantiation 'const > boost::add_const<T>::type boost::proto::functional::as_expr<>::operator > ()<char,10>(const char (&)[10]) const' being compiled > with > [ > T=boost::proto::detail::as_expr<const char > [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::result_type > ] >
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Eric Niebler BoostPro Computing http://www.boostpro.com
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

BUMP On Tue, May 15, 2012 at 12:05 PM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
Has anyone been able to reproduce the issue via the sample I've provided below? Simply paste the code in a new CPP file in Visual Studio .NET 2003 and compile :)
On Mon, May 14, 2012 at 4:53 PM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
Here is a small sample that reproduces the issue. Compile this using Visual Studio .NET 2003 and use Boost v1.49
#include <string> #include <boost/xpressive/xpressive.hpp>
int test() { std::string _serverName = "MY-MACHINE";
using namespace boost::xpressive;
{ // This breaks sregex r = bos >> _serverName >> (as_xpr(".pushsvcs")|"a"); }
{ // This does NOT break sregex r = bos >> _serverName >> (as_xpr(".pushsvcs")|'a'); }
{ // This does NOT break sregex r = bos >> _serverName >> (as_xpr((char const*)".pushsvcs")|"a"); } }
On Mon, May 14, 2012 at 12:07 PM, Robert Dailey <rcdailey.lists@gmail.com
wrote:
Sorry I sent my last email too soon. Let me provide a more detailed example.
This fails to compile: bos >> _serverName >> (as_xpr(".pushsvcs")|".access")
But this compiles just fine (if I add an as_xpr() wrapper around ".access"): bos >> _serverName >> (as_xpr(".pushsvcs")|as_xpr(".access"))
This is odd... shouldn't the former work just fine? It doesn't fail to compile on MSVC v9
On Mon, May 14, 2012 at 12:05 PM, Robert Dailey < rcdailey.lists@gmail.com> wrote:
The problem appears to be with as_xpr(). If I don't use it, it compiles fine.
On Mon, May 14, 2012 at 11:38 AM, Robert Dailey < rcdailey.lists@gmail.com> wrote:
_serverName is a std::string.
I wish I could better understand the compiler error, I just don't know for sure if it's a problem with my own code or an incompatibility with boost & MSVC7.1
On Fri, May 11, 2012 at 1:51 PM, Eric Niebler <eric@boostpro.com>wrote:
I just tried the below code on VC++ 2003 (7.1) and was unable to reproduce your error. (I assume _serverName is of type sregex?) I'm afraid I don't know what to tell you. Perhaps if you could give me a complete repro scenario, I might be able to help.
On 5/11/2012 9:56 AM, Robert Dailey wrote: > Anyone have an idea on this issue? It's currently blocking me from checking > in this code to source control, since the code absolutely must work on MSVC > 7.1 :-( > > On Thu, May 10, 2012 at 4:45 PM, Robert Dailey < rcdailey.lists@gmail.com>wrote: > >> Hi, >> >> I'm using Boost 1.49 Xpressive on VC7.1. When I compile the following >> code, I get compiler errors (these do not appear on VC9): >> >> sregex const& rex = bos >> _serverName >> !as_xpr("_GWDomino") >> >> ".diagnostics" >> *(as_xpr(".base")|".renamed"); >> >> 'rex' is really a function parameter in my real world use case. I'm >> passing the entire static regex into a function that takes a 'sregex >> const&'. I get the compiler error below. Anyone know why this is happening? >> >> >> C:\Code\work\cmake-decomp\build-vc7\third_party\boost\1.49.0-stlport-5.2.1\include\boost\proto\traits.hpp(691) >> : error C2664: 'boost::proto::exprns_::expr<Tag,Args,Arity>::expr(const >> boost::proto::exprns_::expr<Tag,Args,Arity> &)' : cannot convert parameter >> 1 from >> 'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to >> 'const boost::proto::exprns_::expr<Tag,Args,Arity> &' >> with >> [ >> Tag=boost::proto::tagns_::tag::terminal, >> >> Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char >> [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>, >> Arity=0 >> ] >> and >> [ >> T=const char [10], >> >> Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type, >> WantsBasicExpr=false >> ] >> and >> [ >> Tag=boost::proto::tagns_::tag::terminal, >> >> Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char >> [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>, >> Arity=0 >> ] >> Reason: cannot convert from >> 'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to >> 'const boost::proto::exprns_::expr<Tag,Args,Arity>' >> with >> [ >> T=const char [10], >> >> Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type, >> WantsBasicExpr=false >> ] >> and >> [ >> Tag=boost::proto::tagns_::tag::terminal, >> >> Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char >> [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>, >> Arity=0 >> ] >> No constructor could take the source type, or constructor overload >> resolution was ambiguous >> >> \Code\work\cmake-decomp\server\exchange\tools\uploadlog\uploader.cpp(1372) >> : see reference to function template instantiation 'const >> boost::add_const<T>::type boost::proto::functional::as_expr<>::operator >> ()<char,10>(const char (&)[10]) const' being compiled >> with >> [ >> T=boost::proto::detail::as_expr<const char >> [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::result_type >> ] >> > > _______________________________________________ > Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost >
-- Eric Niebler BoostPro Computing http://www.boostpro.com
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

I provided a sample to reproduce this issue. Has anyone had a chance to try it? I'm still blocked and can't build.... On Mon, May 14, 2012 at 4:53 PM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
Here is a small sample that reproduces the issue. Compile this using Visual Studio .NET 2003 and use Boost v1.49
#include <string> #include <boost/xpressive/xpressive.hpp>
int test() { std::string _serverName = "MY-MACHINE";
using namespace boost::xpressive;
{ // This breaks sregex r = bos >> _serverName >> (as_xpr(".pushsvcs")|"a"); }
{ // This does NOT break sregex r = bos >> _serverName >> (as_xpr(".pushsvcs")|'a'); }
{ // This does NOT break sregex r = bos >> _serverName >> (as_xpr((char const*)".pushsvcs")|"a"); } }
On Mon, May 14, 2012 at 12:07 PM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
Sorry I sent my last email too soon. Let me provide a more detailed example.
This fails to compile: bos >> _serverName >> (as_xpr(".pushsvcs")|".access")
But this compiles just fine (if I add an as_xpr() wrapper around ".access"): bos >> _serverName >> (as_xpr(".pushsvcs")|as_xpr(".access"))
This is odd... shouldn't the former work just fine? It doesn't fail to compile on MSVC v9
On Mon, May 14, 2012 at 12:05 PM, Robert Dailey <rcdailey.lists@gmail.com
wrote:
The problem appears to be with as_xpr(). If I don't use it, it compiles fine.
On Mon, May 14, 2012 at 11:38 AM, Robert Dailey < rcdailey.lists@gmail.com> wrote:
_serverName is a std::string.
I wish I could better understand the compiler error, I just don't know for sure if it's a problem with my own code or an incompatibility with boost & MSVC7.1
On Fri, May 11, 2012 at 1:51 PM, Eric Niebler <eric@boostpro.com>wrote:
I just tried the below code on VC++ 2003 (7.1) and was unable to reproduce your error. (I assume _serverName is of type sregex?) I'm afraid I don't know what to tell you. Perhaps if you could give me a complete repro scenario, I might be able to help.
Anyone have an idea on this issue? It's currently blocking me from checking in this code to source control, since the code absolutely must work on MSVC 7.1 :-(
On Thu, May 10, 2012 at 4:45 PM, Robert Dailey < rcdailey.lists@gmail.com>wrote:
> Hi, > > I'm using Boost 1.49 Xpressive on VC7.1. When I compile the following > code, I get compiler errors (these do not appear on VC9): > > sregex const& rex = bos >> _serverName >> !as_xpr("_GWDomino") >> > ".diagnostics" >> *(as_xpr(".base")|".renamed"); > > 'rex' is really a function parameter in my real world use case. I'm > passing the entire static regex into a function that takes a 'sregex > const&'. I get the compiler error below. Anyone know why this is happening? > > > C:\Code\work\cmake-decomp\build-vc7\third_party\boost\1.49.0-stlport-5.2.1\include\boost\proto\traits.hpp(691) > : error C2664: 'boost::proto::exprns_::expr<Tag,Args,Arity>::expr(const > boost::proto::exprns_::expr<Tag,Args,Arity> &)' : cannot convert
On 5/11/2012 9:56 AM, Robert Dailey wrote: parameter
> 1 from > 'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to > 'const boost::proto::exprns_::expr<Tag,Args,Arity> &' > with > [ > Tag=boost::proto::tagns_::tag::terminal, > > Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char > [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>, > Arity=0 > ] > and > [ > T=const char [10], > > Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type, > WantsBasicExpr=false > ] > and > [ > Tag=boost::proto::tagns_::tag::terminal, > > Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char > [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>, > Arity=0 > ] > Reason: cannot convert from > 'boost::proto::detail::as_expr<T,Generator,WantsBasicExpr>::result_type' to > 'const boost::proto::exprns_::expr<Tag,Args,Arity>' > with > [ > T=const char [10], > > Generator=boost::proto::detail::base_generator<boost::proto::default_generator>::type, > WantsBasicExpr=false > ] > and > [ > Tag=boost::proto::tagns_::tag::terminal, > > Args=boost::proto::argsns_::term<boost::proto::detail::as_expr<const char > [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::value_type>, > Arity=0 > ] > No constructor could take the source type, or constructor overload > resolution was ambiguous > > \Code\work\cmake-decomp\server\exchange\tools\uploadlog\uploader.cpp(1372) > : see reference to function template instantiation 'const > boost::add_const<T>::type boost::proto::functional::as_expr<>::operator > ()<char,10>(const char (&)[10]) const' being compiled > with > [ > T=boost::proto::detail::as_expr<const char > [10],boost::proto::detail::base_generator<boost::proto::default_generator>::type,false>::result_type > ] >
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Eric Niebler BoostPro Computing http://www.boostpro.com
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Tue, May 22, 2012 at 9:18 AM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
I provided a sample to reproduce this issue. Has anyone had a chance to try it? I'm still blocked and can't build....
On Mon, May 14, 2012 at 4:53 PM, Robert Dailey <rcdailey.lists@gmail.com
wrote:
Here is a small sample that reproduces the issue. Compile this using Visual Studio .NET 2003 and use Boost v1.49
[...] I'm not familiar with xpressive nor do I have access to VS 2003. Indeed, you might be hard pressed to find support for VS 2003...? Have you tried the same code on a more recent version of VS and/or on another compiler series (gcc, intel, clang, ...)? - Jeff

On Tue, May 22, 2012 at 12:47 PM, Jeffrey Lee Hellrung, Jr. < jeffrey.hellrung@gmail.com> wrote:
On Tue, May 22, 2012 at 9:18 AM, Robert Dailey <rcdailey.lists@gmail.com
wrote:
I provided a sample to reproduce this issue. Has anyone had a chance to try it? I'm still blocked and can't build....
On Mon, May 14, 2012 at 4:53 PM, Robert Dailey <rcdailey.lists@gmail.com
wrote:
Here is a small sample that reproduces the issue. Compile this using Visual Studio .NET 2003 and use Boost v1.49
[...]
I'm not familiar with xpressive nor do I have access to VS 2003. Indeed, you might be hard pressed to find support for VS 2003...? Have you tried the same code on a more recent version of VS and/or on another compiler series (gcc, intel, clang, ...)?
I mentioned earlier that the same code works just fine on Visual Studio 2008. However, Boost is supposed to be portable, I think this also applies to older compilers. We don't all have the luxury of working on the latest & greatest. I was hoping the author would look at this, maybe fix any issues, and provide a patch. I've tried debugging this issue myself but I just don't understand boost's internals.

On Tue, May 22, 2012 at 11:50 AM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
On Tue, May 22, 2012 at 12:47 PM, Jeffrey Lee Hellrung, Jr. < jeffrey.hellrung@gmail.com> wrote:
On Tue, May 22, 2012 at 9:18 AM, Robert Dailey <rcdailey.lists@gmail.com
wrote:
I provided a sample to reproduce this issue. Has anyone had a chance to try it? I'm still blocked and can't build....
On Mon, May 14, 2012 at 4:53 PM, Robert Dailey < rcdailey.lists@gmail.com
wrote:
Here is a small sample that reproduces the issue. Compile this using Visual Studio .NET 2003 and use Boost v1.49
[...]
I'm not familiar with xpressive nor do I have access to VS 2003. Indeed, you might be hard pressed to find support for VS 2003...? Have you tried the same code on a more recent version of VS and/or on another compiler series (gcc, intel, clang, ...)?
I mentioned earlier that the same code works just fine on Visual Studio 2008. However, Boost is supposed to be portable, I think this also applies to older compilers. We don't all have the luxury of working on the latest & greatest. I was hoping the author would look at this, maybe fix any issues, and provide a patch. I've tried debugging this issue myself but I just don't understand boost's internals.
Older compilers may have bugs; older versions of VS especially have quite a few bugs that sometimes don't crop up except in very specific and unpredictable acrobatic template contexts. Boost does its best to work around them but it's obviously difficult to account for all compiler deficiencies. And I'm not suggesting that you must transition to the latest and greatest, but I might suggest later and greater :) It looks like Eric tried an original version of the code and had no problems, and he *did* offer that he might be able to help if you include a "complete repro scenario" (which I've unfortunately snipped...oops). So...hopefully he or someone else will get around to looking at it. You might get more attention if you create a trac ticket, attach the code to it, and reference the ticket in a mailing list message. - Jeff

On 5/22/2012 12:14 PM, Jeffrey Lee Hellrung, Jr. wrote:
On Tue, May 22, 2012 at 11:50 AM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
On Tue, May 22, 2012 at 12:47 PM, Jeffrey Lee Hellrung, Jr. < jeffrey.hellrung@gmail.com> wrote:
On Tue, May 22, 2012 at 9:18 AM, Robert Dailey <rcdailey.lists@gmail.com
wrote:
I provided a sample to reproduce this issue. Has anyone had a chance to try it? I'm still blocked and can't build....
On Mon, May 14, 2012 at 4:53 PM, Robert Dailey < rcdailey.lists@gmail.com
wrote:
Here is a small sample that reproduces the issue. Compile this using Visual Studio .NET 2003 and use Boost v1.49
[...]
I'm not familiar with xpressive nor do I have access to VS 2003. Indeed, you might be hard pressed to find support for VS 2003...? Have you tried the same code on a more recent version of VS and/or on another compiler series (gcc, intel, clang, ...)?
I mentioned earlier that the same code works just fine on Visual Studio 2008. However, Boost is supposed to be portable, I think this also applies to older compilers. We don't all have the luxury of working on the latest & greatest. I was hoping the author would look at this, maybe fix any issues, and provide a patch. I've tried debugging this issue myself but I just don't understand boost's internals.
Older compilers may have bugs; older versions of VS especially have quite a few bugs that sometimes don't crop up except in very specific and unpredictable acrobatic template contexts. Boost does its best to work around them but it's obviously difficult to account for all compiler deficiencies. And I'm not suggesting that you must transition to the latest and greatest, but I might suggest later and greater :)
It looks like Eric tried an original version of the code and had no problems, and he *did* offer that he might be able to help if you include a "complete repro scenario" (which I've unfortunately snipped...oops). So...hopefully he or someone else will get around to looking at it. You might get more attention if you create a trac ticket, attach the code to it, and reference the ticket in a mailing list message.
Apologies for the delay, I was at BoostCon. I was able to reproduce the error, but not fix it I'm afraid. A smaller repro is: #include <boost/proto/core.hpp> int main() { boost::proto::as_expr<boost::proto::default_domain>("abcd"); } This used to work on VC7.1 but stopped working many Boost releases ago due to a major refactorization in Proto. I spent a few hours trying to work around the problem, but the work-around eluded me. Note that the following actually compiles: boost::proto::as_expr("abcd"); This is exactly identical to the above. (When you don't specify a domain, it defaults to default_domain.) For whatever reason, it's different enough to cause the problem. The older VC releases are like that. :-( VC7.1 hasn't been part of the Boost test matrix in eons. There's no reasonable way to keep it working while preserving my sanity, so I'm dropping support for it in Proto and xpressive. Sorry. If you simply must stick with VC7.1, I suggest reverting to Boost 1.43. It should work there. HTH, -- Eric Niebler BoostPro Computing http://www.boostpro.com

On Tue, May 22, 2012 at 7:02 PM, Eric Niebler <eric@boostpro.com> wrote:
On Tue, May 22, 2012 at 11:50 AM, Robert Dailey < rcdailey.lists@gmail.com>wrote:
On Tue, May 22, 2012 at 12:47 PM, Jeffrey Lee Hellrung, Jr. < jeffrey.hellrung@gmail.com> wrote:
On Tue, May 22, 2012 at 9:18 AM, Robert Dailey < rcdailey.lists@gmail.com
wrote:
I provided a sample to reproduce this issue. Has anyone had a chance to try it? I'm still blocked and can't build....
On Mon, May 14, 2012 at 4:53 PM, Robert Dailey < rcdailey.lists@gmail.com
wrote:
Here is a small sample that reproduces the issue. Compile this using Visual Studio .NET 2003 and use Boost v1.49
[...]
I'm not familiar with xpressive nor do I have access to VS 2003. Indeed, you might be hard pressed to find support for VS 2003...? Have you
On 5/22/2012 12:14 PM, Jeffrey Lee Hellrung, Jr. wrote: tried
the same code on a more recent version of VS and/or on another compiler series (gcc, intel, clang, ...)?
I mentioned earlier that the same code works just fine on Visual Studio 2008. However, Boost is supposed to be portable, I think this also applies to older compilers. We don't all have the luxury of working on the latest & greatest. I was hoping the author would look at this, maybe fix any issues, and provide a patch. I've tried debugging this issue myself but I just don't understand boost's internals.
Older compilers may have bugs; older versions of VS especially have quite a few bugs that sometimes don't crop up except in very specific and unpredictable acrobatic template contexts. Boost does its best to work around them but it's obviously difficult to account for all compiler deficiencies. And I'm not suggesting that you must transition to the latest and greatest, but I might suggest later and greater :)
It looks like Eric tried an original version of the code and had no problems, and he *did* offer that he might be able to help if you include a "complete repro scenario" (which I've unfortunately snipped...oops). So...hopefully he or someone else will get around to looking at it. You might get more attention if you create a trac ticket, attach the code to it, and reference the ticket in a mailing list message.
Apologies for the delay, I was at BoostCon. I was able to reproduce the error, but not fix it I'm afraid. A smaller repro is:
#include <boost/proto/core.hpp> int main() { boost::proto::as_expr<boost::proto::default_domain>("abcd"); }
This used to work on VC7.1 but stopped working many Boost releases ago due to a major refactorization in Proto. I spent a few hours trying to work around the problem, but the work-around eluded me. Note that the following actually compiles:
boost::proto::as_expr("abcd");
This is exactly identical to the above. (When you don't specify a domain, it defaults to default_domain.) For whatever reason, it's different enough to cause the problem. The older VC releases are like that. :-(
VC7.1 hasn't been part of the Boost test matrix in eons. There's no reasonable way to keep it working while preserving my sanity, so I'm dropping support for it in Proto and xpressive. Sorry. If you simply must stick with VC7.1, I suggest reverting to Boost 1.43. It should work there.
Hey sorry for the late response, I haven't had a chance to work on this for a while. I'm finally back on it. I am using Boost 1.43 as you instructed but I still get a compiler failure: C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\expr.hpp(96) : error C2166: l-value specifies const object C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\expr.hpp(93) : error C2512: 'boost::proto::exprns_::expr<Tag,Args,Arity>' : no appropriate default constructor available with [ Tag=boost::proto::tag::terminal, Args=boost::proto::argsns_::term<const boost::proto::result_of::as_expr<const char [6],boost::proto::domainns_::default_domain,void,void>::arg0_>, Arity=0 ] C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\detail\expr0.hpp(96) : see reference to function template instantiation 'boost::proto::exprns_::expr<Tag,Args,Arity> boost::proto::detail::make_terminal<T,boost::proto::tag::terminal,const char,6>(const T (&)[6],boost::proto::exprns_::expr<Tag,Args,Arity> *)' being compiled with [ Tag=boost::proto::tag::terminal, Args=boost::proto::argsns_::term<const boost::proto::result_of::as_expr<const char [6],boost::proto::domainns_::default_domain,void,void>::arg0_>, Arity=0, T=char ] C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\traits.hpp(267) : see reference to function template instantiation 'const boost::proto::exprns_::expr<Tag,Args,Arity> boost::proto::exprns_::expr<Tag,Args,Arity>::make<const T[6]>(A0 (&))' being compiled with [ Tag=boost::proto::tag::terminal, Args=boost::proto::argsns_::term<const boost::proto::result_of::as_expr<const char [6],boost::proto::domainns_::default_domain,void,void>::arg0_>, Arity=0, T=char, A0=const char [6] ] C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\traits.hpp(839) : see reference to function template instantiation 'const boost::proto::result_of::as_expr<T,Domain,Void,Void2>::reference boost::proto::result_of::as_expr<T,Domain,Void,Void2>::call<const char[ 6]>(T2 (&))' being compiled with [ T=const char [6], Domain=boost::proto::domainns_::default_domain, Void=void, Void2=void, T2=const char [6] ] \Code\work\cmake\dpd-cmake-sandbox\server\exchange\tools\uploadlog\uploader.cpp(1413) : see reference to function template instantiation 'const boost::proto::result_of::as_expr<T,Domain,Void,Void2>::reference boost::proto::functional::as_expr<>::operator ()<char,6>(const char (&)[6]) const' being compiled with [ T=const char [6], Domain=boost::proto::domainns_::default_domain, Void=void, Void2=void

Any idea why the version you suggested isn't working Eric? Any other suggestions? On Tue, Jun 26, 2012 at 11:15 AM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
On Tue, May 22, 2012 at 7:02 PM, Eric Niebler <eric@boostpro.com> wrote:
On Tue, May 22, 2012 at 11:50 AM, Robert Dailey < rcdailey.lists@gmail.com>wrote:
On Tue, May 22, 2012 at 12:47 PM, Jeffrey Lee Hellrung, Jr. < jeffrey.hellrung@gmail.com> wrote:
On Tue, May 22, 2012 at 9:18 AM, Robert Dailey < rcdailey.lists@gmail.com
wrote:
I provided a sample to reproduce this issue. Has anyone had a chance to try it? I'm still blocked and can't build....
On Mon, May 14, 2012 at 4:53 PM, Robert Dailey < rcdailey.lists@gmail.com > wrote:
> Here is a small sample that reproduces the issue. Compile this using > Visual Studio .NET 2003 and use Boost v1.49
[...]
I'm not familiar with xpressive nor do I have access to VS 2003. Indeed, you might be hard pressed to find support for VS 2003...? Have you
On 5/22/2012 12:14 PM, Jeffrey Lee Hellrung, Jr. wrote: tried
the same code on a more recent version of VS and/or on another compiler series (gcc, intel, clang, ...)?
I mentioned earlier that the same code works just fine on Visual Studio 2008. However, Boost is supposed to be portable, I think this also applies to older compilers. We don't all have the luxury of working on the latest & greatest. I was hoping the author would look at this, maybe fix any issues, and provide a patch. I've tried debugging this issue myself but I just don't understand boost's internals.
Older compilers may have bugs; older versions of VS especially have quite a few bugs that sometimes don't crop up except in very specific and unpredictable acrobatic template contexts. Boost does its best to work around them but it's obviously difficult to account for all compiler deficiencies. And I'm not suggesting that you must transition to the latest and greatest, but I might suggest later and greater :)
It looks like Eric tried an original version of the code and had no problems, and he *did* offer that he might be able to help if you include a "complete repro scenario" (which I've unfortunately snipped...oops). So...hopefully he or someone else will get around to looking at it. You might get more attention if you create a trac ticket, attach the code to it, and reference the ticket in a mailing list message.
Apologies for the delay, I was at BoostCon. I was able to reproduce the error, but not fix it I'm afraid. A smaller repro is:
#include <boost/proto/core.hpp> int main() { boost::proto::as_expr<boost::proto::default_domain>("abcd"); }
This used to work on VC7.1 but stopped working many Boost releases ago due to a major refactorization in Proto. I spent a few hours trying to work around the problem, but the work-around eluded me. Note that the following actually compiles:
boost::proto::as_expr("abcd");
This is exactly identical to the above. (When you don't specify a domain, it defaults to default_domain.) For whatever reason, it's different enough to cause the problem. The older VC releases are like that. :-(
VC7.1 hasn't been part of the Boost test matrix in eons. There's no reasonable way to keep it working while preserving my sanity, so I'm dropping support for it in Proto and xpressive. Sorry. If you simply must stick with VC7.1, I suggest reverting to Boost 1.43. It should work there.
Hey sorry for the late response, I haven't had a chance to work on this for a while. I'm finally back on it. I am using Boost 1.43 as you instructed but I still get a compiler failure:
C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\expr.hpp(96) : error C2166: l-value specifies const object C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\expr.hpp(93) : error C2512: 'boost::proto::exprns_::expr<Tag,Args,Arity>' : no appropriate default constructor available with [ Tag=boost::proto::tag::terminal, Args=boost::proto::argsns_::term<const boost::proto::result_of::as_expr<const char [6],boost::proto::domainns_::default_domain,void,void>::arg0_>, Arity=0 ]
C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\detail\expr0.hpp(96) : see reference to function template instantiation 'boost::proto::exprns_::expr<Tag,Args,Arity> boost::proto::detail::make_terminal<T,boost::proto::tag::terminal,const char,6>(const T (&)[6],boost::proto::exprns_::expr<Tag,Args,Arity> *)' being compiled with [ Tag=boost::proto::tag::terminal, Args=boost::proto::argsns_::term<const boost::proto::result_of::as_expr<const char [6],boost::proto::domainns_::default_domain,void,void>::arg0_>, Arity=0, T=char ]
C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\traits.hpp(267) : see reference to function template instantiation 'const boost::proto::exprns_::expr<Tag,Args,Arity> boost::proto::exprns_::expr<Tag,Args,Arity>::make<const T[6]>(A0 (&))' being compiled with [ Tag=boost::proto::tag::terminal, Args=boost::proto::argsns_::term<const boost::proto::result_of::as_expr<const char [6],boost::proto::domainns_::default_domain,void,void>::arg0_>, Arity=0, T=char, A0=const char [6] ]
C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\traits.hpp(839) : see reference to function template instantiation 'const boost::proto::result_of::as_expr<T,Domain,Void,Void2>::reference boost::proto::result_of::as_expr<T,Domain,Void,Void2>::call<const char[ 6]>(T2 (&))' being compiled with [ T=const char [6], Domain=boost::proto::domainns_::default_domain, Void=void, Void2=void, T2=const char [6] ]
\Code\work\cmake\dpd-cmake-sandbox\server\exchange\tools\uploadlog\uploader.cpp(1413) : see reference to function template instantiation 'const boost::proto::result_of::as_expr<T,Domain,Void,Void2>::reference boost::proto::functional::as_expr<>::operator ()<char,6>(const char (&)[6]) const' being compiled with [ T=const char [6], Domain=boost::proto::domainns_::default_domain, Void=void, Void2=void

Sorry, I missed your response the first time. I'm really sorry to disappoint you, Robert, but I can only guess that the change I mentioned wasn't the first to break proto/xpressive on VC7.1. My only suggestion is to keep trying earlier releases until you find one that works. I'm not going to be supporting VC7.1 again. Eric On 7/10/2012 8:42 AM, Robert Dailey wrote:
Any idea why the version you suggested isn't working Eric? Any other suggestions?
On Tue, Jun 26, 2012 at 11:15 AM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
On Tue, May 22, 2012 at 7:02 PM, Eric Niebler <eric@boostpro.com> wrote:
On Tue, May 22, 2012 at 11:50 AM, Robert Dailey < rcdailey.lists@gmail.com>wrote:
On Tue, May 22, 2012 at 12:47 PM, Jeffrey Lee Hellrung, Jr. < jeffrey.hellrung@gmail.com> wrote:
On Tue, May 22, 2012 at 9:18 AM, Robert Dailey < rcdailey.lists@gmail.com > wrote:
> I provided a sample to reproduce this issue. Has anyone had a chance to try > it? I'm still blocked and can't build.... > > On Mon, May 14, 2012 at 4:53 PM, Robert Dailey < rcdailey.lists@gmail.com >> wrote: > >> Here is a small sample that reproduces the issue. Compile this using >> Visual Studio .NET 2003 and use Boost v1.49 > [...]
I'm not familiar with xpressive nor do I have access to VS 2003. Indeed, you might be hard pressed to find support for VS 2003...? Have you
On 5/22/2012 12:14 PM, Jeffrey Lee Hellrung, Jr. wrote: tried
the same code on a more recent version of VS and/or on another compiler series (gcc, intel, clang, ...)?
I mentioned earlier that the same code works just fine on Visual Studio 2008. However, Boost is supposed to be portable, I think this also applies to older compilers. We don't all have the luxury of working on the latest & greatest. I was hoping the author would look at this, maybe fix any issues, and provide a patch. I've tried debugging this issue myself but I just don't understand boost's internals.
Older compilers may have bugs; older versions of VS especially have quite a few bugs that sometimes don't crop up except in very specific and unpredictable acrobatic template contexts. Boost does its best to work around them but it's obviously difficult to account for all compiler deficiencies. And I'm not suggesting that you must transition to the latest and greatest, but I might suggest later and greater :)
It looks like Eric tried an original version of the code and had no problems, and he *did* offer that he might be able to help if you include a "complete repro scenario" (which I've unfortunately snipped...oops). So...hopefully he or someone else will get around to looking at it. You might get more attention if you create a trac ticket, attach the code to it, and reference the ticket in a mailing list message.
Apologies for the delay, I was at BoostCon. I was able to reproduce the error, but not fix it I'm afraid. A smaller repro is:
#include <boost/proto/core.hpp> int main() { boost::proto::as_expr<boost::proto::default_domain>("abcd"); }
This used to work on VC7.1 but stopped working many Boost releases ago due to a major refactorization in Proto. I spent a few hours trying to work around the problem, but the work-around eluded me. Note that the following actually compiles:
boost::proto::as_expr("abcd");
This is exactly identical to the above. (When you don't specify a domain, it defaults to default_domain.) For whatever reason, it's different enough to cause the problem. The older VC releases are like that. :-(
VC7.1 hasn't been part of the Boost test matrix in eons. There's no reasonable way to keep it working while preserving my sanity, so I'm dropping support for it in Proto and xpressive. Sorry. If you simply must stick with VC7.1, I suggest reverting to Boost 1.43. It should work there.
Hey sorry for the late response, I haven't had a chance to work on this for a while. I'm finally back on it. I am using Boost 1.43 as you instructed but I still get a compiler failure:
C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\expr.hpp(96) : error C2166: l-value specifies const object C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\expr.hpp(93) : error C2512: 'boost::proto::exprns_::expr<Tag,Args,Arity>' : no appropriate default constructor available with [ Tag=boost::proto::tag::terminal, Args=boost::proto::argsns_::term<const boost::proto::result_of::as_expr<const char [6],boost::proto::domainns_::default_domain,void,void>::arg0_>, Arity=0 ]
C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\detail\expr0.hpp(96) : see reference to function template instantiation 'boost::proto::exprns_::expr<Tag,Args,Arity> boost::proto::detail::make_terminal<T,boost::proto::tag::terminal,const char,6>(const T (&)[6],boost::proto::exprns_::expr<Tag,Args,Arity> *)' being compiled with [ Tag=boost::proto::tag::terminal, Args=boost::proto::argsns_::term<const boost::proto::result_of::as_expr<const char [6],boost::proto::domainns_::default_domain,void,void>::arg0_>, Arity=0, T=char ]
C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\traits.hpp(267) : see reference to function template instantiation 'const boost::proto::exprns_::expr<Tag,Args,Arity> boost::proto::exprns_::expr<Tag,Args,Arity>::make<const T[6]>(A0 (&))' being compiled with [ Tag=boost::proto::tag::terminal, Args=boost::proto::argsns_::term<const boost::proto::result_of::as_expr<const char [6],boost::proto::domainns_::default_domain,void,void>::arg0_>, Arity=0, T=char, A0=const char [6] ]
C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\traits.hpp(839) : see reference to function template instantiation 'const boost::proto::result_of::as_expr<T,Domain,Void,Void2>::reference boost::proto::result_of::as_expr<T,Domain,Void,Void2>::call<const char[ 6]>(T2 (&))' being compiled with [ T=const char [6], Domain=boost::proto::domainns_::default_domain, Void=void, Void2=void, T2=const char [6] ]
\Code\work\cmake\dpd-cmake-sandbox\server\exchange\tools\uploadlog\uploader.cpp(1413) : see reference to function template instantiation 'const boost::proto::result_of::as_expr<T,Domain,Void,Void2>::reference boost::proto::functional::as_expr<>::operator ()<char,6>(const char (&)[6]) const' being compiled with [ T=const char [6], Domain=boost::proto::domainns_::default_domain, Void=void, Void2=void
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Eric Niebler BoostPro Computing http://www.boostpro.com

Thanks Eric. What's disappointing is that I'm stuck on this ancient compiler, but nothing I can do about it :-( So far I've tried Boost 1.40 and 1.39, both fail the same way (no appropriate default constructor for as_expr). I'm trying 1.38 now to see if it works. What version of boost was xpressive introduced in? I am not sure how far back I can go. On Tue, Jul 10, 2012 at 12:15 PM, Eric Niebler <eric@boostpro.com> wrote:
Sorry, I missed your response the first time. I'm really sorry to disappoint you, Robert, but I can only guess that the change I mentioned wasn't the first to break proto/xpressive on VC7.1. My only suggestion is to keep trying earlier releases until you find one that works. I'm not going to be supporting VC7.1 again.
Eric
On 7/10/2012 8:42 AM, Robert Dailey wrote:
Any idea why the version you suggested isn't working Eric? Any other suggestions?
On Tue, Jun 26, 2012 at 11:15 AM, Robert Dailey < rcdailey.lists@gmail.com>wrote:
On Tue, May 22, 2012 at 7:02 PM, Eric Niebler <eric@boostpro.com> wrote:
On Tue, May 22, 2012 at 11:50 AM, Robert Dailey < rcdailey.lists@gmail.com>wrote:
On Tue, May 22, 2012 at 12:47 PM, Jeffrey Lee Hellrung, Jr. < jeffrey.hellrung@gmail.com> wrote:
> On Tue, May 22, 2012 at 9:18 AM, Robert Dailey < rcdailey.lists@gmail.com >> wrote: > >> I provided a sample to reproduce this issue. Has anyone had a chance to > try >> it? I'm still blocked and can't build.... >> >> On Mon, May 14, 2012 at 4:53 PM, Robert Dailey < rcdailey.lists@gmail.com >>> wrote: >> >>> Here is a small sample that reproduces the issue. Compile this using >>> Visual Studio .NET 2003 and use Boost v1.49 >> > [...] > > I'm not familiar with xpressive nor do I have access to VS 2003. Indeed, > you might be hard pressed to find support for VS 2003...? Have you
On 5/22/2012 12:14 PM, Jeffrey Lee Hellrung, Jr. wrote: tried
> the same code on a more recent version of VS and/or on another compiler > series (gcc, intel, clang, ...)?
I mentioned earlier that the same code works just fine on Visual Studio 2008. However, Boost is supposed to be portable, I think this also applies to older compilers. We don't all have the luxury of working on the latest & greatest. I was hoping the author would look at this, maybe fix any issues, and provide a patch. I've tried debugging this issue myself but I just don't understand boost's internals.
Older compilers may have bugs; older versions of VS especially have quite a few bugs that sometimes don't crop up except in very specific and unpredictable acrobatic template contexts. Boost does its best to work around them but it's obviously difficult to account for all compiler deficiencies. And I'm not suggesting that you must transition to the latest and greatest, but I might suggest later and greater :)
It looks like Eric tried an original version of the code and had no problems, and he *did* offer that he might be able to help if you include a "complete repro scenario" (which I've unfortunately snipped...oops). So...hopefully he or someone else will get around to looking at it. You might get more attention if you create a trac ticket, attach the code to it, and reference the ticket in a mailing list message.
Apologies for the delay, I was at BoostCon. I was able to reproduce the error, but not fix it I'm afraid. A smaller repro is:
#include <boost/proto/core.hpp> int main() { boost::proto::as_expr<boost::proto::default_domain>("abcd"); }
This used to work on VC7.1 but stopped working many Boost releases ago due to a major refactorization in Proto. I spent a few hours trying to work around the problem, but the work-around eluded me. Note that the following actually compiles:
boost::proto::as_expr("abcd");
This is exactly identical to the above. (When you don't specify a domain, it defaults to default_domain.) For whatever reason, it's different enough to cause the problem. The older VC releases are like that. :-(
VC7.1 hasn't been part of the Boost test matrix in eons. There's no reasonable way to keep it working while preserving my sanity, so I'm dropping support for it in Proto and xpressive. Sorry. If you simply must stick with VC7.1, I suggest reverting to Boost 1.43. It should work there.
Hey sorry for the late response, I haven't had a chance to work on this for a while. I'm finally back on it. I am using Boost 1.43 as you instructed but I still get a compiler failure:
C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\expr.hpp(96)
: error C2166: l-value specifies const object
C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\expr.hpp(93)
: error C2512: 'boost::proto::exprns_::expr<Tag,Args,Arity>' : no appropriate default constructor available with [ Tag=boost::proto::tag::terminal, Args=boost::proto::argsns_::term<const boost::proto::result_of::as_expr<const char [6],boost::proto::domainns_::default_domain,void,void>::arg0_>, Arity=0 ]
C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\detail\expr0.hpp(96)
: see reference to function template instantiation 'boost::proto::exprns_::expr<Tag,Args,Arity> boost::proto::detail::make_terminal<T,boost::proto::tag::terminal,const char,6>(const T (&)[6],boost::proto::exprns_::expr<Tag,Args,Arity> *)' being compiled with [ Tag=boost::proto::tag::terminal, Args=boost::proto::argsns_::term<const boost::proto::result_of::as_expr<const char [6],boost::proto::domainns_::default_domain,void,void>::arg0_>, Arity=0, T=char ]
C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\traits.hpp(267)
: see reference to function template instantiation 'const boost::proto::exprns_::expr<Tag,Args,Arity> boost::proto::exprns_::expr<Tag,Args,Arity>::make<const T[6]>(A0 (&))' being compiled with [ Tag=boost::proto::tag::terminal, Args=boost::proto::argsns_::term<const boost::proto::result_of::as_expr<const char [6],boost::proto::domainns_::default_domain,void,void>::arg0_>, Arity=0, T=char, A0=const char [6] ]
C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\traits.hpp(839)
: see reference to function template instantiation 'const boost::proto::result_of::as_expr<T,Domain,Void,Void2>::reference boost::proto::result_of::as_expr<T,Domain,Void,Void2>::call<const char[ 6]>(T2 (&))' being compiled with [ T=const char [6], Domain=boost::proto::domainns_::default_domain, Void=void, Void2=void, T2=const char [6] ]
\Code\work\cmake\dpd-cmake-sandbox\server\exchange\tools\uploadlog\uploader.cpp(1413)
: see reference to function template instantiation 'const boost::proto::result_of::as_expr<T,Domain,Void,Void2>::reference boost::proto::functional::as_expr<>::operator ()<char,6>(const char (&)[6]) const' being compiled with [ T=const char [6], Domain=boost::proto::domainns_::default_domain, Void=void, Void2=void
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Eric Niebler BoostPro Computing http://www.boostpro.com
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

I've confirmed that version 1.37 is the latest version that works with VC7.1, I am not able to reproduce this compiler error in that version. Any version above this fails. Eric, maybe if you get the time you can look at the diff between the two and perhaps discover a bug? I'm not 100% sure this is a compiler issue, could be a bug too. Worth looking into (I would do it for you if I had the domain knowledge of xpressive's internals). Thanks again for your guidance. On Tue, Jul 10, 2012 at 1:13 PM, Robert Dailey <rcdailey.lists@gmail.com>wrote:
Thanks Eric. What's disappointing is that I'm stuck on this ancient compiler, but nothing I can do about it :-(
So far I've tried Boost 1.40 and 1.39, both fail the same way (no appropriate default constructor for as_expr). I'm trying 1.38 now to see if it works. What version of boost was xpressive introduced in? I am not sure how far back I can go.
On Tue, Jul 10, 2012 at 12:15 PM, Eric Niebler <eric@boostpro.com> wrote:
Sorry, I missed your response the first time. I'm really sorry to disappoint you, Robert, but I can only guess that the change I mentioned wasn't the first to break proto/xpressive on VC7.1. My only suggestion is to keep trying earlier releases until you find one that works. I'm not going to be supporting VC7.1 again.
Eric
Any idea why the version you suggested isn't working Eric? Any other suggestions?
On Tue, Jun 26, 2012 at 11:15 AM, Robert Dailey < rcdailey.lists@gmail.com>wrote:
On Tue, May 22, 2012 at 7:02 PM, Eric Niebler <eric@boostpro.com> wrote:
On Tue, May 22, 2012 at 11:50 AM, Robert Dailey < rcdailey.lists@gmail.com>wrote:
> On Tue, May 22, 2012 at 12:47 PM, Jeffrey Lee Hellrung, Jr. < > jeffrey.hellrung@gmail.com> wrote: > >> On Tue, May 22, 2012 at 9:18 AM, Robert Dailey < rcdailey.lists@gmail.com >>> wrote: >> >>> I provided a sample to reproduce this issue. Has anyone had a chance to >> try >>> it? I'm still blocked and can't build.... >>> >>> On Mon, May 14, 2012 at 4:53 PM, Robert Dailey < > rcdailey.lists@gmail.com >>>> wrote: >>> >>>> Here is a small sample that reproduces the issue. Compile this using >>>> Visual Studio .NET 2003 and use Boost v1.49 >>> >> [...] >> >> I'm not familiar with xpressive nor do I have access to VS 2003. Indeed, >> you might be hard pressed to find support for VS 2003...? Have you
On 5/22/2012 12:14 PM, Jeffrey Lee Hellrung, Jr. wrote: tried
>> the same code on a more recent version of VS and/or on another compiler >> series (gcc, intel, clang, ...)? > > > I mentioned earlier that the same code works just fine on Visual Studio > 2008. However, Boost is supposed to be portable, I think this also applies > to older compilers. We don't all have the luxury of working on the latest & > greatest. I was hoping the author would look at this, maybe fix any issues, > and provide a patch. I've tried debugging this issue myself but I just > don't understand boost's internals. >
Older compilers may have bugs; older versions of VS especially have quite a few bugs that sometimes don't crop up except in very specific and unpredictable acrobatic template contexts. Boost does its best to work around them but it's obviously difficult to account for all compiler deficiencies. And I'm not suggesting that you must transition to the latest and greatest, but I might suggest later and greater :)
It looks like Eric tried an original version of the code and had no problems, and he *did* offer that he might be able to help if you include a "complete repro scenario" (which I've unfortunately snipped...oops). So...hopefully he or someone else will get around to looking at it. You might get more attention if you create a trac ticket, attach the code to it, and reference the ticket in a mailing list message.
Apologies for the delay, I was at BoostCon. I was able to reproduce
On 7/10/2012 8:42 AM, Robert Dailey wrote: the
error, but not fix it I'm afraid. A smaller repro is:
#include <boost/proto/core.hpp> int main() { boost::proto::as_expr<boost::proto::default_domain>("abcd"); }
This used to work on VC7.1 but stopped working many Boost releases ago due to a major refactorization in Proto. I spent a few hours trying to work around the problem, but the work-around eluded me. Note that the following actually compiles:
boost::proto::as_expr("abcd");
This is exactly identical to the above. (When you don't specify a domain, it defaults to default_domain.) For whatever reason, it's different enough to cause the problem. The older VC releases are like that. :-(
VC7.1 hasn't been part of the Boost test matrix in eons. There's no reasonable way to keep it working while preserving my sanity, so I'm dropping support for it in Proto and xpressive. Sorry. If you simply must stick with VC7.1, I suggest reverting to Boost 1.43. It should work there.
Hey sorry for the late response, I haven't had a chance to work on this for a while. I'm finally back on it. I am using Boost 1.43 as you instructed but I still get a compiler failure:
C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\expr.hpp(96)
: error C2166: l-value specifies const object
C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\expr.hpp(93)
: error C2512: 'boost::proto::exprns_::expr<Tag,Args,Arity>' : no appropriate default constructor available with [ Tag=boost::proto::tag::terminal, Args=boost::proto::argsns_::term<const boost::proto::result_of::as_expr<const char [6],boost::proto::domainns_::default_domain,void,void>::arg0_>, Arity=0 ]
C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\detail\expr0.hpp(96)
: see reference to function template instantiation 'boost::proto::exprns_::expr<Tag,Args,Arity> boost::proto::detail::make_terminal<T,boost::proto::tag::terminal,const char,6>(const T (&)[6],boost::proto::exprns_::expr<Tag,Args,Arity> *)' being compiled with [ Tag=boost::proto::tag::terminal, Args=boost::proto::argsns_::term<const boost::proto::result_of::as_expr<const char [6],boost::proto::domainns_::default_domain,void,void>::arg0_>, Arity=0, T=char ]
C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\traits.hpp(267)
: see reference to function template instantiation 'const boost::proto::exprns_::expr<Tag,Args,Arity> boost::proto::exprns_::expr<Tag,Args,Arity>::make<const T[6]>(A0 (&))' being compiled with [ Tag=boost::proto::tag::terminal, Args=boost::proto::argsns_::term<const boost::proto::result_of::as_expr<const char [6],boost::proto::domainns_::default_domain,void,void>::arg0_>, Arity=0, T=char, A0=const char [6] ]
C:\Code\work\cmake\dpd-cmake-sandbox\build-vc71\third_party\boost\1.43.0\include\boost\proto\traits.hpp(839)
: see reference to function template instantiation 'const boost::proto::result_of::as_expr<T,Domain,Void,Void2>::reference boost::proto::result_of::as_expr<T,Domain,Void,Void2>::call<const char[ 6]>(T2 (&))' being compiled with [ T=const char [6], Domain=boost::proto::domainns_::default_domain, Void=void, Void2=void, T2=const char [6] ]
\Code\work\cmake\dpd-cmake-sandbox\server\exchange\tools\uploadlog\uploader.cpp(1413)
: see reference to function template instantiation 'const boost::proto::result_of::as_expr<T,Domain,Void,Void2>::reference boost::proto::functional::as_expr<>::operator ()<char,6>(const char (&)[6]) const' being compiled with [ T=const char [6], Domain=boost::proto::domainns_::default_domain, Void=void, Void2=void
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- Eric Niebler BoostPro Computing http://www.boostpro.com
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (3)
-
Eric Niebler
-
Jeffrey Lee Hellrung, Jr.
-
Robert Dailey