Hi all.<br>I'm still playing with aspect C++ and I've found something weird: i can't slicing an object created  with a template class (like a std::vector<int> )<br>Have a look:<br>================================<br>
// a.ah<br><br>#ifndef A_AF<br>#define A_AF<br>class Slice<br>{<br>int i; //all is fine<br>// std::vector<int> vec; //error<br>};<br><br>aspect Foo<br>{<br>pointcut what() = "A";<br>advice what(): slice Slice; <br>
};<br><br>#endif<br>================================<br>//a.cpp<br>class A<br>{<br>//...<br>};<br><br>int main()<br>{<br>return 0;<br>}<br>================================<br>With this simple code, I've got the following error:<br>
asp.ah:23: error: cannot declare `std::vector' within `Compte'<br>error: "ac++" --config "/tmp/agxx_pcfg1s6c0a" -p. -c "essai2.cpp" -o "/tmp/essai2.cpp_agxx_SliceCMTBo"<br><br>
And if I try with my own template class like:<br>================================ <br>template <class T> TMP {}; <br>class Slice<br>{<br>TMP<int> vec; //error<br>}; <br>================================<br>I've got:<br>
asp.ah:22: error: invalid member declaration near token `<'<br>asp.ah:22: located in the following non-file unit:<br>  private:<br>  typedef A Slice;<br><br>#line 22 "asp.ah"<br> TMP< int > vec<br><br>
Does anyone know why ? I know there are some problems with template and aspect C++, but I think it is not this sort of problems.<br><br>Thanks. <br>David Côme.<br><br>