mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-02 20:04:27 +02:00
build: formatting headers moved back to compat_macros.h
but this time they are included conditionally
This commit is contained in:
@@ -34,17 +34,6 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
|
||||||
#if MP_UNITS_USE_FMTLIB
|
|
||||||
MP_UNITS_DIAGNOSTIC_PUSH
|
|
||||||
MP_UNITS_DIAGNOSTIC_IGNORE_UNREACHABLE
|
|
||||||
MP_UNITS_DIAGNOSTIC_IGNORE_SHADOW
|
|
||||||
#include <fmt/format.h>
|
|
||||||
MP_UNITS_DIAGNOSTIC_POP
|
|
||||||
#else
|
|
||||||
#include <format>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
MP_UNITS_EXPORT
|
MP_UNITS_EXPORT
|
||||||
|
@@ -36,21 +36,6 @@
|
|||||||
#include <concepts>
|
#include <concepts>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
|
||||||
#if MP_UNITS_USE_FMTLIB
|
|
||||||
MP_UNITS_DIAGNOSTIC_PUSH
|
|
||||||
MP_UNITS_DIAGNOSTIC_IGNORE_UNREACHABLE
|
|
||||||
MP_UNITS_DIAGNOSTIC_IGNORE_SHADOW
|
|
||||||
#include <fmt/format.h>
|
|
||||||
MP_UNITS_DIAGNOSTIC_POP
|
|
||||||
#else
|
|
||||||
#include <format>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MP_UNITS_IN_MODULE_INTERFACE
|
|
||||||
#include <cstdint>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// most of the below code is based on/copied from fmtlib
|
// most of the below code is based on/copied from fmtlib
|
||||||
|
@@ -84,3 +84,18 @@
|
|||||||
#define MP_UNITS_THROW(arg) throw arg
|
#define MP_UNITS_THROW(arg) throw arg
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef MP_UNITS_IN_MODULE_INTERFACE
|
||||||
|
|
||||||
|
#if MP_UNITS_USE_FMTLIB
|
||||||
|
MP_UNITS_DIAGNOSTIC_PUSH
|
||||||
|
MP_UNITS_DIAGNOSTIC_IGNORE_UNREACHABLE
|
||||||
|
MP_UNITS_DIAGNOSTIC_IGNORE_SHADOW
|
||||||
|
#include <fmt/format.h>
|
||||||
|
MP_UNITS_DIAGNOSTIC_POP
|
||||||
|
#else
|
||||||
|
#include <format>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
Reference in New Issue
Block a user