Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can the previous problem hurt me silently? Is it possible that the compiler will silently generate the wrong code?

0
Posted

Can the previous problem hurt me silently? Is it possible that the compiler will silently generate the wrong code?

0

Yes. Since non-dependent types and non-dependent members are not found in the dependent template base-classes, the compiler will search the enclosing scope, such as the enclosing namespace. This can cause it to silently(!) do the wrong thing.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123