feat: import std; support added

Resolves #595
This commit is contained in:
Mateusz Pusz
2024-07-16 17:36:00 +02:00
parent a4691825ee
commit b870b85c25
93 changed files with 425 additions and 9 deletions

View File

@ -25,8 +25,12 @@
// !!! renders correctly in the documentation "Examples" section. !!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <exception>
#include <iostream>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -20,7 +20,11 @@
physical_quantities
*/
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <iostream>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -17,7 +17,11 @@
#include <mp-units/compat_macros.h>
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <iostream>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -17,9 +17,13 @@
#include <mp-units/compat_macros.h>
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <concepts>
#include <iostream>
#include <string>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -21,11 +21,15 @@
// SOFTWARE.
#include <mp-units/compat_macros.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <concepts>
#include <iostream>
#include <map>
#include <string_view>
#include <utility>
#endif
#ifdef MP_UNITS_MODULES
import mp_units.core;
#else

View File

@ -22,9 +22,13 @@
#include <mp-units/compat_macros.h>
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <iostream>
#include <string>
#include <string_view>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -25,6 +25,9 @@
#include <mp-units/bits/hacks.h>
#include <mp-units/compat_macros.h>
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <array>
#include <chrono>
#include <concepts>
@ -33,6 +36,7 @@
#include <ranges>
#include <string>
#include <utility>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -22,10 +22,14 @@
#include "glide_computer_lib.h"
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <functional>
#include <iostream>
#include <numeric>
#include <string_view>
#endif
#ifdef MP_UNITS_MODULES
import mp_units.core;
#else

View File

@ -25,6 +25,9 @@
#include <mp-units/compat_macros.h>
//
#include "geographic.h"
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <algorithm>
#include <array>
#include <chrono>
@ -35,6 +38,7 @@
#include <ranges>
#include <string> // IWYU pragma: keep
#include <vector>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -27,8 +27,12 @@
#include <mp-units/compat_macros.h>
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <iomanip>
#include <iostream>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -25,10 +25,14 @@
#include "ranged_representation.h"
#include <mp-units/compat_macros.h>
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <compare>
#include <limits>
#include <numbers>
#include <ostream>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -26,9 +26,13 @@
#include <mp-units/bits/hacks.h>
#include <mp-units/compat_macros.h>
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <algorithm>
#include <concepts>
#include <type_traits>
#endif
#ifdef MP_UNITS_MODULES
import mp_units.core;
#else

View File

@ -26,9 +26,13 @@
#include <mp-units/compat_macros.h>
#include <mp-units/ext/contracts.h>
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <compare> // IWYU pragma: export
#include <ostream>
#include <utility>
#endif
#ifdef MP_UNITS_MODULES
import mp_units.core;
#else

View File

@ -24,9 +24,13 @@
#include <mp-units/compat_macros.h>
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <algorithm>
#include <locale>
#include <tuple>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -22,8 +22,12 @@
#include "kalman.h"
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <array>
#include <iostream>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -22,8 +22,12 @@
#include "kalman.h"
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <array>
#include <iostream>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -22,8 +22,12 @@
#include "kalman.h"
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <array>
#include <iostream>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -22,8 +22,12 @@
#include "kalman.h"
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <array>
#include <iostream>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -22,8 +22,12 @@
#include "kalman.h"
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <array>
#include <iostream>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -22,8 +22,12 @@
#include "kalman.h"
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <array>
#include <iostream>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -22,8 +22,12 @@
#include "kalman.h"
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <array>
#include <iostream>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -22,8 +22,12 @@
#include "kalman.h"
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <array>
#include <iostream>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -22,11 +22,15 @@
#include <mp-units/bits/hacks.h>
#include <mp-units/compat_macros.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <cmath>
#include <compare> // IWYU pragma: export
#include <exception>
#include <iostream>
#include <utility>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -27,7 +27,11 @@
#include <mp-units/compat_macros.h>
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <iostream>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -22,8 +22,12 @@
#include <mp-units/compat_macros.h>
#include <mp-units/ext/format.h>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <iostream>
#include <tuple>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -23,10 +23,14 @@
#include <mp-units/compat_macros.h>
#include <mp-units/ext/format.h>
#include <cassert>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <chrono>
#include <iostream>
#include <numbers>
#include <string>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -20,7 +20,11 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <iostream>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -20,8 +20,12 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <exception>
#include <iostream>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else

View File

@ -25,9 +25,13 @@
#include <mp-units/compat_macros.h>
#include <mp-units/ext/format.h>
#include <cassert>
#ifdef MP_UNITS_IMPORT_STD
import std;
#else
#include <cstdint>
#include <iostream>
#include <string>
#endif
#ifdef MP_UNITS_MODULES
import mp_units;
#else