Boost logo

Boost Users :

Subject: Re: [Boost-users] Trouble with templating of adjacency_list
From: Eric Fowler (eric.fowler_at_[hidden])
Date: 2010-05-08 02:34:58


I did attempt a template typedef. I think. But I can't figure out that
syntax either.

On Fri, May 7, 2010 at 6:24 AM, Jeremiah Willcock <jewillco_at_[hidden]>wrote:

> On Thu, 6 May 2010, Eric Fowler wrote:
>
> Perhaps this should go to a g++ group but I have a feeling the answer is
>> Out There:
>> Why is g++ having trouble with this?
>>
>> Error is ../main.cpp:19: error: template declaration of
>> ‘boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS,
>> POS<T>,
>> boost::no_property, boost::no_property, boost::listS> DG’
>>
>> template<typename T = int>
>> struct POS
>> {
>> T x, y;
>> };
>>
>> template<typename T>
>> adjacency_list<vecS, vecS, bidirectionalS, POS<T> > DG;
>>
>
> You are not allowed to have a templated variable declaration. Did you
> intend to do a template typedef? Those are C++0x only and have a different
> syntax.
>
> -- Jeremiah Willcock
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net