@@ -815,19 +815,22 @@ changes to one object won't affect the others, the object's initializer will run
815
815
once per copy, etc.
816
816
817
817
Specifically, this warning fires when it detects an object which:
818
- 1. Is defined as ``inline`` in a header file (so it might get compiled into multiple libaries), and
819
- 2. Has external linkage (otherwise it's supposed to be duplicated), and
820
- 3. Has hidden visibility (posix) or lacks a dllimport/dllexport attribute (windows).
818
+
819
+ #. Is defined as ``inline`` in a header file (so it might get compiled into multiple libaries), and
820
+ #. Has external linkage (otherwise it's supposed to be duplicated), and
821
+ #. Has hidden visibility (posix) or lacks a dllimport/dllexport attribute (windows).
821
822
822
823
As well as one of the following:
823
- 1. The object is mutable, or
824
- 2. The object's initializer definitely has side effects.
824
+
825
+ #. The object is mutable, or
826
+ #. The object's initializer definitely has side effects.
825
827
826
828
The warning can be resolved by removing one of the conditions above. In rough
827
829
order of preference, this may be done by:
828
- 1. Marking the object ``const`` (if possible)
829
- 2. Moving the object's definition to a source file
830
- 3. Making the object visible using ``__attribute((visibility("default")))``,
830
+
831
+ #. Marking the object ``const`` (if possible)
832
+ #. Moving the object's definition to a source file
833
+ #. Making the object visible using ``__attribute((visibility("default")))``,
831
834
``__declspec(dllimport)``, or ``__declspec(dllexport)``.
832
835
833
836
When annotating an object with ``__declspec(dllimport)`` or ``__declspec(dllexport)``,
0 commit comments