mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-01 03:14:29 +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 <ostream>
|
||||
#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
|
||||
|
||||
MP_UNITS_EXPORT
|
||||
|
@@ -36,21 +36,6 @@
|
||||
#include <concepts>
|
||||
#include <limits>
|
||||
#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
|
||||
|
||||
// most of the below code is based on/copied from fmtlib
|
||||
|
@@ -84,3 +84,18 @@
|
||||
#define MP_UNITS_THROW(arg) throw arg
|
||||
|
||||
#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