Indirect call not allowed

Indirect call not allowed


When trying to compile a code like this:


The compiler says: error: indirect call is not allowed inside [[transaction_safe]] routine.

Whereas if a variable is used to hold the results of the first function call:

Class2 class2 = Class1::getInstance()->getClass2();

The compiler will not give any error. Why does the compiler work this way? Is there any way of overriding this behavior?

Thanks a lot, and greetings,


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Need to see code for Class1 and Class2. Working with author in a private mail

Leave a Comment

Please sign in to add a comment. Not a member? Join today