문제

What if i want to set breakpoint into constructor with condition if I == 10?

template < typename T, int I >
class C 
{
public:

    C<T, I>() { cout << I << endl; }
};
도움이 되었습니까?

해결책

If conditional break point does not work try

template < typename T, int I >
class C 
{
public:

    C() 
    {
       if(I == 10)
       {
*         int a= 0; //or try __debugbreak();
       }
       cout << I << endl;
    }
};

EDIT To break on specific class you may use std::is_same<T, U>::value(or boost analogue) in condition

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top