@@ -685,22 +685,22 @@ Also it is suggested to refactor your headers to include thirdparty headers cond
685
685
686
686
.. code-block :: c++
687
687
688
- + #ifndef IN_MODULE_INTERFACE
688
+ #ifndef IN_MODULE_INTERFACE
689
689
#include "third_party/A/headers.h"
690
- + #endif
690
+ #endif
691
691
692
692
#include "header_x.h"
693
693
694
694
...
695
695
696
- This may be helpful to get better diagnostic messages if you forgot to update your module
696
+ This may be helpful to get better diagnostic messages if you forgot to update your module
697
697
interface unit file during maintaining.
698
698
699
699
The reasoning for the practice is that the declarations in the language linkage are considered
700
700
to be attached to the global module. So the ABI of your library in the modular version
701
701
wouldn't change.
702
702
703
- While this style looks not as convenient as the export-using style, it is easier to convert
703
+ While this style looks not as convenient as the export-using style, it is easier to convert
704
704
to other styles.
705
705
706
706
ABI breaking style
@@ -783,14 +783,14 @@ In that case, you need to convert your source files (.cpp files) to module imple
783
783
784
784
.. code-block :: c++
785
785
786
- + #ifndef IN_MODULE_INTERFACE
786
+ #ifndef IN_MODULE_INTERFACE
787
787
// List all the includes here.
788
788
#include "third_party/A/headers.h"
789
789
...
790
790
#include "header.h"
791
- + #endif
791
+ #endif
792
792
793
- + module your_library;
793
+ module your_library;
794
794
795
795
// Following off should be unchanged.
796
796
...
@@ -864,14 +864,14 @@ headers to:
864
864
.. code-block :: c++
865
865
866
866
#pragma once
867
- + #ifndef YOUR_LIBRARY_IMPORTED
867
+ #ifndef YOUR_LIBRARY_IMPORTED
868
868
...
869
- + #endif
869
+ #endif
870
870
871
871
Importing modules
872
872
~~~~~~~~~~~~~~~~~
873
873
874
- When there are dependent libraries providing modules, we suggest you to import that in
874
+ When there are dependent libraries providing modules, we suggest you to import that in
875
875
your module.
876
876
877
877
Most of the existing libraries would fall into this catagory once the std module gets available.
0 commit comments