mirror of
https://github.com/mpusz/mp-units.git
synced 2025-07-31 19:04:27 +02:00
fix: preventing import std;
in GMF
This commit is contained in:
@@ -22,9 +22,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define MP_UNITS_IN_GMF
|
||||
|
||||
#include <mp-units/bits/hacks.h>
|
||||
#include <mp-units/compat_macros.h>
|
||||
#include <mp-units/ext/contracts.h>
|
||||
|
||||
#ifndef MP_UNITS_IMPORT_STD
|
||||
#include <array>
|
||||
#include <compare>
|
||||
#include <concepts>
|
||||
@@ -46,9 +50,11 @@
|
||||
#if __cpp_lib_text_encoding
|
||||
#include <text_encoding>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if MP_UNITS_HOSTED
|
||||
#include <mp-units/ext/format.h>
|
||||
#ifndef MP_UNITS_IMPORT_STD
|
||||
#include <cmath>
|
||||
#include <locale>
|
||||
#include <ostream>
|
||||
@@ -56,3 +62,6 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#undef MP_UNITS_IN_GMF
|
||||
|
@@ -35,12 +35,14 @@ MP_UNITS_DIAGNOSTIC_IGNORE_UNREACHABLE
|
||||
MP_UNITS_DIAGNOSTIC_IGNORE_SHADOW
|
||||
#include <fmt/format.h>
|
||||
MP_UNITS_DIAGNOSTIC_POP
|
||||
#else
|
||||
#else // MP_UNITS_USE_FMTLIB
|
||||
#ifdef MP_UNITS_IMPORT_STD
|
||||
#ifndef MP_UNITS_IN_GMF
|
||||
import std;
|
||||
#else
|
||||
#endif
|
||||
#else // MP_UNITS_IMPORT_STD
|
||||
#include <format>
|
||||
#endif
|
||||
#endif
|
||||
#endif // MP_UNITS_IMPORT_STD
|
||||
#endif // MP_UNITS_USE_FMTLIB
|
||||
|
||||
#endif
|
||||
|
@@ -22,9 +22,7 @@
|
||||
|
||||
module;
|
||||
|
||||
#ifndef MP_UNITS_IMPORT_STD
|
||||
#include <mp-units/bits/core_gmf.h>
|
||||
#endif
|
||||
|
||||
export module mp_units.core;
|
||||
|
||||
|
@@ -22,10 +22,8 @@
|
||||
|
||||
module;
|
||||
|
||||
#ifndef MP_UNITS_IMPORT_STD
|
||||
#include <mp-units/bits/core_gmf.h>
|
||||
#include <chrono>
|
||||
#endif
|
||||
|
||||
export module mp_units.systems;
|
||||
|
||||
|
Reference in New Issue
Block a user