Will adding / removing a function of a static variable interrupt binary compatibility?

I need to maintain binary compatibility for this C ++ library I'm working on.

I currently have something like that

class Foo
{
    void Bar()
    {
        static bool flag = true;
    }
}

Will flagbinary compatibility remove Foo?

Besides my compiler, VC7.1 is now, if that matters.

+5
source share
3 answers

The variable is staticnot part of the function interface, so it will not affect binary compatibility. You should know, however, that if the function is really so simple, it could be built-in if you do not recompile all users who will violate ODR.

: , . , , .

+2

, - , .

, , - . - , , , , . , , ( ), , , ( ).

. , , , , . , .

:

+1

No. He has no appearance.

0
source

All Articles