[aspectc-user] bug in trunk: iterators in .h
Leandro Costa
leandro.costa at gmail.com
Fri Nov 28 03:07:55 CET 2008
If I declare an iterator in a .h file like:
*list<char>::iterator it;*
it happens:
#> ag++ -c C.cc -a Tester.ah
<typeinfo>:2: error: invalid member declaration near token `<'
<typeinfo>:2: located in the following non-file unit:
public:
typedef AC::TL<int,AC::TL<std::vector< int >,AC::TL<std::_List_iterator<
_Tp,_Tp,_Tp * >,AC::TL<std::list< char >,AC::TLE > > > > __AttrTypes;
const char *__attr_name (unsigned i) const {
static const char *names[] = { "i", "iVec", "it", "it" }; return
names[i];
}
void *__attr (unsigned __i) const {
switch (__i) { case 0: return (void*)&i; case 2: return (void*)&iVec;
case 4: return (void*)⁢ case 6: return (void*)⁢ default: return 0; }
}
error: Execution failed: "ac++" --config "/tmp/agxx_pcfgwwUXeq" -a
"Tester.ah" -p. -c "C.cc" -o "/tmp/C.cc_agxx_KuDXwb"
Use types is a workaround:
*typedef list<char> cList;
typedef cList::iterator cListIt;
cListIt it;*
It doesn't happen in ac-1.0pre3 version.
[]'s
--
_____________________________________________
Leandro Souza Costa
"A vitória se encastela em jardins encantadores,
mas para se chegar a ela não há caminho de flores"
_____________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20081128/3a696ac9/attachment.html>
More information about the aspectc-user
mailing list