Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#4109 closed Bugs (duplicate)

xpressive compile error (MingW GCC 4.5)

Reported by: Duzy Chan <duzy@…> Owned by: Eric Niebler
Milestone: Boost 1.44.0 Component: xpressive
Version: Boost 1.42.0 Severity: Problem
Keywords: is_pure template_arity Cc: duzy@…

Description

I'm using xpressive to parse my URI, but got errors as follow, I'm using MinGW GCC 4.5:

In file included from c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/xpressive/detail/static/grammar.hpp:20:0,

from c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/xpressive/detail/static/compile.hpp:27, from c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/xpressive/regex_primitives.hpp:32, from c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/xpressive/xpressive_static.hpp:24, from c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/src/http/pre/uri.h:12, from c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/src/http/uri.cpp:10:

c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/xpressive/detail/static/is_pure.hpp: In instantiation of 'boost::xpressive::detail::use_simple_repeat<boost::proto::_child_c<0>, char>': c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:85:5: instantiated from 'const int boost::mpl::aux::template_arity_impl<boost::xpressive::detail::use_simple_repeat<boost::proto::_child_c<0>, char>, 1>::value' c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:93:5: instantiated from 'const int boost::mpl::aux::template_arity<boost::xpressive::detail::use_simple_repeat<boost::proto::_child_c<0>, char> >::value' c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp:98:30: instantiated from 'boost::mpl::aux::template_arity<boost::xpressive::detail::use_simple_repeat<boost::proto::_child_c<0>, char> >' c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/proto/traits.hpp:104:9: instantiated from 'boost::proto::is_callable<boost::xpressive::detail::use_simple_repeat<boost::proto::_child_c<0>, char> >' c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/proto/transform/make.hpp:243:84: instantiated from 'boost::proto::make<boost::xpressive::detail::use_simple_repeat<boost::proto::_child_c<0>, char> >::impl<const boost::proto::exprns_::expr<boost::xpressive::detail::generic_quant_tag<2u, 2u>, boost::proto::argsns_::list1<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&>, 1l>&, boost::xpressive::detail::static_xpression<boost::xpressive::detail::alternate_end_matcher, boost::xpressive::detail::no_next>, boost::xpressive::detail::xpression_visitor<gnu_cxx::normal_iterator<const char*, std::basic_string<char> >, mpl_::bool_<false>, boost::xpressive::cpp_regex_traits<char> >&>' c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/proto/matches.hpp:692:21: [ skipping 21 instantiation contexts ] c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/xpressive/detail/static/compile.hpp:50:9: instantiated from 'void boost::xpressive::detail::static_compile_impl2(const Xpr&, const boost::shared_ptr<boost::xpressive::detail::regex_impl<BidiIter> >&, const Traits&) [with Xpr = boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::range_placeholder<char> >, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&>, 2l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<char>, 0l>&, const boost::proto::exprns_::expr<boost::xpressive::detail::generic_quant_tag<2u, 2u>, boost::proto::argsns_::list1<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&>, 1l>&>, 2l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<char>, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::range_placeholder<char> >, 0l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&>, 2l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<char [3]>, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::range_placeholder<char> >, 0l>&>, 2l>&>, 2l>, BidiIter = gnu_cxx::normal_iterator<const char*, std::basic_string<char> >, Traits = boost::xpressive::cpp_regex_traits<char>]' c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/xpressive/detail/static/compile.hpp:79:9: instantiated from 'typename boost::disable_if<boost::proto::result_of::matches<Xpr, boost::xpressive::detail::XpressiveLocaleModifier> >::type boost::xpressive::detail::static_compile_impl1(const Xpr&, const boost::shared_ptr<boost::xpressive::detail::regex_impl<BidiIter> >&) [with Xpr = boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::range_placeholder<char> >, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&>, 2l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<char>, 0l>&, const boost::proto::exprns_::expr<boost::xpressive::detail::generic_quant_tag<2u, 2u>, boost::proto::argsns_::list1<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&>, 1l>&>, 2l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<char>, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::range_placeholder<char> >, 0l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&>, 2l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<char [3]>, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::range_placeholder<char> >, 0l>&>, 2l>&>, 2l>, BidiIter = gnu_cxx::normal_iterator<const char*, std::basic_string<char> >, typename boost::disable_if<boost::proto::result_of::matches<Xpr, boost::xpressive::detail::XpressiveLocaleModifier> >::type = void]' c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/xpressive/detail/static/compile.hpp:99:9: instantiated from 'void boost::xpressive::detail::static_compile(const Xpr&, const boost::shared_ptr<boost::xpressive::detail::regex_impl<BidiIter> >&) [with Xpr = boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::range_placeholder<char> >, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&>, 2l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<char>, 0l>&, const boost::proto::exprns_::expr<boost::xpressive::detail::generic_quant_tag<2u, 2u>, boost::proto::argsns_::list1<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&>, 1l>&>, 2l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<char>, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::range_placeholder<char> >, 0l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&>, 2l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<char [3]>, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::range_placeholder<char> >, 0l>&>, 2l>&>, 2l>, BidiIter = gnu_cxx::normal_iterator<const char*, std::basic_string<char> >]' c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/xpressive/basic_regex.hpp:252:9: instantiated from 'void boost::xpressive::basic_regex<BidiIter>::compile_(const Expr&, mpl_::true_) [with Expr = boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::range_placeholder<char> >, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&>, 2l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<char>, 0l>&, const boost::proto::exprns_::expr<boost::xpressive::detail::generic_quant_tag<2u, 2u>, boost::proto::argsns_::list1<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&>, 1l>&>, 2l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<char>, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::range_placeholder<char> >, 0l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&>, 2l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<char [3]>, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::range_placeholder<char> >, 0l>&>, 2l>&>, 2l>, BidiIter = gnu_cxx::normal_iterator<const char*, std::basic_string<char> >, mpl_::true_ = mpl_::bool_<true>]' c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/xpressive/basic_regex.hpp:133:9: instantiated from 'boost::xpressive::basic_regex<BidiIter>& boost::xpressive::basic_regex<BidiIter>::operator=(const Expr&) [with Expr = boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::bitwise_or, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::range_placeholder<char> >, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&>, 2l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<char>, 0l>&, const boost::proto::exprns_::expr<boost::xpressive::detail::generic_quant_tag<2u, 2u>, boost::proto::argsns_::list1<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&>, 1l>&>, 2l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<char>, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::range_placeholder<char> >, 0l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::posix_charset_placeholder>, 0l>&>, 2l>&>, 2l>&, const boost::proto::exprns_::expr<boost::proto::tag::shift_right, boost::proto::argsns_::list2<const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<char [3]>, 0l>&, const boost::proto::exprns_::expr<boost::proto::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::range_placeholder<char> >, 0l>&>, 2l>&>, 2l>, BidiIter = gnu_cxx::normal_iterator<const char*, std::basic_string<char> >]' c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/src/http/uri.cpp:109:58: instantiated from here c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/xpressive/detail/static/is_pure.hpp:201:5: error: no type named 'proto_tag' in 'struct boost::proto::_child_c<0>' c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/xpressive/detail/static/is_pure.hpp:203:9: error: no type named 'proto_tag' in 'struct boost::proto::_child_c<0>' c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/xpressive/detail/static/is_pure.hpp:203:9: error: no type named 'proto_tag' in 'struct boost::proto::_child_c<0>' c:/tools/msys/1.0/home/duzy/dev/ds/apps/MailerPro/../../../../open/boost_1_42_0/boost/xpressive/detail/static/is_pure.hpp:203:9: error: creating pointer to member of non-class type '<type error>'

Attachments (2)

untitled.JPG (26.9 KB ) - added by Duzy Chan <duzy@…> 13 years ago.
Compilation tells error at line #109 of my code
errors.txt (17.7 KB ) - added by Duzy Chan <duzy@…> 13 years ago.
the error message reported by mingw gcc 4.5

Download all attachments as: .zip

Change History (12)

by Duzy Chan <duzy@…>, 13 years ago

Attachment: untitled.JPG added

Compilation tells error at line #109 of my code

by Duzy Chan <duzy@…>, 13 years ago

Attachment: errors.txt added

the error message reported by mingw gcc 4.5

comment:1 by Duzy Chan <duzy@…>, 13 years ago

Cc: duzy@… added

comment:2 by Duzy Chan <duzy@…>, 13 years ago

Summary: xpressive compile errorxpressive compile error (MingW GCC 4.5)

comment:3 by anonymous, 13 years ago

I can confirm the problem for g++-4.5 in Debian Sid as well as cross-compilers to sparc-sun-solaris2.8, i386-portbld-freebsd7.2 and x86_64-portbld-freebsd7.2 built from unpatched gcc-4.5.0 sources.

This seems to be related to optional subexpressions; at least I can make it show up with that. The simplest case I can come up with is

#include <boost/xpressive/xpressive.hpp>

int main() {
  using namespace boost::xpressive;

  // This compiles if rex is given as
  // sregex rex = _w;
  sregex rex = !_w;
}

comment:4 by anonymous, 13 years ago

I mean g++-4.5 from Debian experimental (4.5.0-1), sorry.

comment:5 by Eric Niebler, 13 years ago

Status: newassigned

Yup, looks like xpressive is broken on gcc-4.5. Earlier versions of gcc are fine.

comment:6 by Eric Niebler, 13 years ago

Milestone: Boost 1.43.0Boost 1.44.0

changed milestone to 1.44. Too late for 1.43.

comment:7 by Eric Niebler, 13 years ago

Keywords: template_arity added

After a bit of digging, it seems the problem is actually in MPL (and by admission, in xpressive's reliance on an implementation detail of MPL). The following program, which compiles on gcc-4.4 but not on gcc-4.5, demonstrates the problem:

  #include <boost/mpl/aux_/template_arity.hpp>
  #include <boost/mpl/aux_/lambda_arity_param.hpp>

  template<class A>
  struct T : A::x
  {};

  template<
    class T
    BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(
      int Arity = boost::mpl::aux::template_arity<T>::value
    )
  >
  struct S
  {};

  template<template<class A> class P, class X>
  struct S<P<X> BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(1)>
  {};

  int main()
  {
    S<T<int> > s0;
  }

comment:8 by anonymous, 13 years ago

Oh boy. There's a deep pool of template magic behind that one.

It could be that I'm missing arcane properties of half-instantiated templates, but it looks to me like the problem is using an invalid type in the first place (T<int>). I'm actually a bit surprised that it doesn't complain about S<T<int>, 1>.

In any case, if the tag only has to be there and isn't actually used, that offers a quick and rather dirty workaround, namely

--- arg.hpp~	2010-03-02 04:19:57.000000000 +0100
+++ arg.hpp	2010-04-20 10:08:28.000000000 +0200
@@ -142,6 +142,9 @@
     template<int N>
     struct _child_c : transform<_child_c<N> >
     {
+        // Just to have one
+        typedef tag::comma proto_tag;
+
         template<typename Expr, typename State, typename Data>
         struct impl : transform_impl<Expr, State, Data>
         {

where boost::proto::tag::comma is chosen arbitrarily from a number of proto tags that allow boost::xpressive::detail::width_of to be instantiated without making any deeper inquiries about Expr.

comment:9 by Eric Niebler, 13 years ago

Resolution: duplicate
Status: assignedclosed

This is a duplicate of #4061. I can confirm that the patch attached to that ticket fixes this problem. It's too late for 1.43, but hopefully we can get it in for 1.44.

comment:10 by Duzy Chan <duzy@…>, 13 years ago

So great to see post. Thanks, eric.

Note: See TracTickets for help on using tickets.