Article ID: 136594
Article Last Modified on 7/5/2005
/* Compile options needed: /Ob1 or /Ob2 for the workaround function
/* to be inline
*/
template <class type>
class myclass
{
public:
void good_fun();
void bad_fun() {
_asm {int 3} // This generates a compiler error.
}
};
template <class type>
inline void myclass<type>::good_fun() {
_asm {int 3} // This doesn't generate an error.
}
void main(void) {
myclass<int> mytest;
}
In this code, the good_fun() compiles without any error.
Additional query words: 2.00 2.10 2.20 9.00 9.10
Keywords: kbbug kbfix kbcpponly kbcompiler KB136594