+12
-5
lines changedFilter options
+12
-5
lines changed Original file line number Diff line number Diff line change
@@ -25,8 +25,10 @@
25
25
26
26
#if defined(__GNUC__) && !defined(__clang__)
27
27
# define FMT_GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
28
+
# define FMT_GCC_PRAGMA(arg) _Pragma(arg)
28
29
#else
29
30
# define FMT_GCC_VERSION 0
31
+
# define FMT_GCC_PRAGMA(arg)
30
32
#endif
31
33
32
34
#if defined(__INTEL_COMPILER)
@@ -250,6 +252,10 @@
250
252
# define FMT_COMPILE_TIME_CHECKS 0
251
253
#endif
252
254
255
+
// Enable minimal optimizations for more compact code in debug mode.
256
+
FMT_GCC_PRAGMA("GCC push_options")
257
+
FMT_GCC_PRAGMA("GCC optimize(\"Og\")")
258
+
253
259
FMT_BEGIN_NAMESPACE
254
260
255
261
// Implementations of enable_if_t and other metafunctions for older systems.
@@ -387,7 +393,7 @@ template <typename Char> class basic_string_view {
387
393
#if __cplusplus >= 201703L // C++17's char_traits::length() is constexpr.
388
394
FMT_CONSTEXPR
389
395
#endif
390
-
basic_string_view(const Char* s)
396
+
FMT_INLINE basic_string_view(const Char* s)
391
397
: data_(s), size_(std::char_traits<Char>::length(s)) {}
392
398
393
399
/** Constructs a string reference from a ``std::basic_string`` object. */
@@ -475,7 +481,7 @@ template <> struct is_char<char32_t> : std::true_type {};
475
481
\endrst
476
482
*/
477
483
template <typename Char, FMT_ENABLE_IF(is_char<Char>::value)>
478
-
inline basic_string_view<Char> to_string_view(const Char* s) {
484
+
FMT_INLINE basic_string_view<Char> to_string_view(const Char* s) {
479
485
return s;
480
486
}
481
487
@@ -1570,7 +1576,7 @@ class format_arg_store
1570
1576
: 0);
1571
1577
1572
1578
public:
1573
-
FMT_CONSTEXPR format_arg_store(const Args&... args)
1579
+
FMT_CONSTEXPR FMT_INLINE format_arg_store(const Args&... args)
1574
1580
:
1575
1581
#if FMT_GCC_VERSION && FMT_GCC_VERSION < 409
1576
1582
basic_format_args<Context>(*this),
@@ -1605,8 +1611,8 @@ constexpr format_arg_store<Context, Args...> make_format_args(
1605
1611
\endrst
1606
1612
*/
1607
1613
template <typename... Args, typename S, typename Char = char_t<S>>
1608
-
inline auto make_args_checked(const S& format_str,
1609
-
const remove_reference_t<Args>&... args)
1614
+
FMT_INLINE auto make_args_checked(const S& format_str,
1615
+
const remove_reference_t<Args>&... args)
1610
1616
-> format_arg_store<buffer_context<Char>, remove_reference_t<Args>...> {
1611
1617
static_assert(
1612
1618
detail::count<(
@@ -1943,6 +1949,7 @@ inline void print(const S& format_str, Args&&... args) {
1943
1949
: detail::vprint_mojibake(stdout, to_string_view(format_str),
1944
1950
vargs);
1945
1951
}
1952
+
FMT_GCC_PRAGMA("GCC pop_options")
1946
1953
FMT_END_NAMESPACE
1947
1954
1948
1955
#endif // FMT_CORE_H_
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4