|
| 1 | + |
| 2 | + Information |
| 3 | + ----------- |
| 4 | + |
| 5 | +This directory contains dummy C++ standard library that contains only the |
| 6 | +declarations of the C++ standard library interface, to be used as an aid in |
| 7 | +code completion. |
| 8 | + |
| 9 | +Real standard library implementations often use complex C++ techniques in order |
| 10 | +to provide full compliance and perform optimizations. This leads to code |
| 11 | +completion implementations being unable to resolve typedef result and function |
| 12 | +return types, and thus being unable to provide code completion of class members |
| 13 | +when given instance variable. This issue becomes more and more important with |
| 14 | +widespread use of C++ 'auto' type specifier, because code completion of members |
| 15 | +of such variables depend on function return types being correctly resolved. |
| 16 | + |
| 17 | +This dummy library performs various steps to simplify the exposed interface, to |
| 18 | +make code completion more useful. In addition to that, descriptive parameter |
| 19 | +names are exposed instead of uglified identifiers used in real standard library |
| 20 | +implementations. The parameter names correspond to those provided for |
| 21 | +respective functions in the cppreference.com C++ reference. |
| 22 | + |
| 23 | + Configuration |
| 24 | + ------------- |
| 25 | + |
| 26 | +The exposed interface depends on the values of the following preprocessor |
| 27 | +macros: |
| 28 | + |
| 29 | + - CPPREFERENCE_STDVER: defines the standard version of the interface. Possible |
| 30 | + values are 1998, 2003, 2011, 2014, 2017 which correspond to the respective |
| 31 | + C++ standards. |
| 32 | + |
| 33 | + - CPPREFERENCE_SIMPLIFY_TYPEDEFS: non-zero value results in simplified |
| 34 | + typedefs being exposed. Usage of various traits is greatly reduced; the |
| 35 | + typedefs refer to types that would be resolved in most common cases. |
| 36 | + Enabling this is recommended. |
| 37 | + |
| 38 | + Usage |
| 39 | + ----- |
| 40 | + |
| 41 | +The primary target for this dummy C++ standard library is the Qt Creator IDE, |
| 42 | +though the code might be useful in other IDEs. |
| 43 | + |
| 44 | +For each Qt Creator project, perform the following steps to replace the |
| 45 | +C++ library used by code completion: |
| 46 | + |
| 47 | + - Add the path to this directory to the $PROJECT.includes file |
| 48 | + |
| 49 | + - Define CPPREFERENCE_STDVER and/or CPPREFERENCE_SIMPLIFY_TYPEDEFS to correct |
| 50 | + values in the $PROJECT.config file. |
0 commit comments