@@ -19,11 +19,11 @@ FMT_BEGIN_NAMESPACE
19
19
// A compile-time string which is compiled into fast formatting code.
20
20
FMT_EXPORT class compiled_string {};
21
21
22
- namespace detail {
23
-
24
22
template <typename S>
25
23
struct is_compiled_string : std::is_base_of<compiled_string, S> {};
26
24
25
+ namespace detail {
26
+
27
27
/* *
28
28
* Converts a string literal `s` into a format string that will be parsed at
29
29
* compile time and converted into efficient formatting code. Requires C++17
@@ -425,7 +425,7 @@ constexpr auto compile_format_string(S fmt) {
425
425
}
426
426
427
427
template <typename ... Args, typename S,
428
- FMT_ENABLE_IF (detail:: is_compiled_string<S>::value)>
428
+ FMT_ENABLE_IF (is_compiled_string<S>::value)>
429
429
constexpr auto compile(S fmt) {
430
430
constexpr auto str = basic_string_view<typename S::char_type>(fmt);
431
431
if constexpr (str.size () == 0 ) {
@@ -461,7 +461,7 @@ constexpr FMT_INLINE OutputIt format_to(OutputIt out, const CompiledFormat& cf,
461
461
}
462
462
463
463
template <typename S, typename ... Args,
464
- FMT_ENABLE_IF (detail:: is_compiled_string<S>::value)>
464
+ FMT_ENABLE_IF (is_compiled_string<S>::value)>
465
465
FMT_INLINE std::basic_string<typename S::char_type> format(const S&,
466
466
Args&&... args) {
467
467
if constexpr (std::is_same<typename S::char_type, char >::value) {
@@ -488,7 +488,7 @@ FMT_INLINE std::basic_string<typename S::char_type> format(const S&,
488
488
}
489
489
490
490
template <typename OutputIt, typename S, typename ... Args,
491
- FMT_ENABLE_IF (detail:: is_compiled_string<S>::value)>
491
+ FMT_ENABLE_IF (is_compiled_string<S>::value)>
492
492
FMT_CONSTEXPR OutputIt format_to(OutputIt out, const S&, Args&&... args) {
493
493
constexpr auto compiled = detail::compile<Args...>(S ());
494
494
if constexpr (std::is_same<remove_cvref_t <decltype (compiled)>,
@@ -503,7 +503,7 @@ FMT_CONSTEXPR OutputIt format_to(OutputIt out, const S&, Args&&... args) {
503
503
#endif
504
504
505
505
template <typename OutputIt, typename S, typename ... Args,
506
- FMT_ENABLE_IF (detail:: is_compiled_string<S>::value)>
506
+ FMT_ENABLE_IF (is_compiled_string<S>::value)>
507
507
auto format_to_n(OutputIt out, size_t n, const S& fmt, Args&&... args)
508
508
-> format_to_n_result<OutputIt> {
509
509
using traits = detail::fixed_buffer_traits;
@@ -513,7 +513,7 @@ auto format_to_n(OutputIt out, size_t n, const S& fmt, Args&&... args)
513
513
}
514
514
515
515
template <typename S, typename ... Args,
516
- FMT_ENABLE_IF (detail:: is_compiled_string<S>::value)>
516
+ FMT_ENABLE_IF (is_compiled_string<S>::value)>
517
517
FMT_CONSTEXPR20 auto formatted_size(const S& fmt, const Args&... args)
518
518
-> size_t {
519
519
auto buf = detail::counting_buffer<>();
@@ -522,15 +522,15 @@ FMT_CONSTEXPR20 auto formatted_size(const S& fmt, const Args&... args)
522
522
}
523
523
524
524
template <typename S, typename ... Args,
525
- FMT_ENABLE_IF (detail:: is_compiled_string<S>::value)>
525
+ FMT_ENABLE_IF (is_compiled_string<S>::value)>
526
526
void print(std::FILE* f, const S& fmt, const Args&... args) {
527
527
auto buf = memory_buffer ();
528
528
fmt::format_to (appender (buf), fmt, args...);
529
529
detail::print (f, {buf.data (), buf.size ()});
530
530
}
531
531
532
532
template <typename S, typename ... Args,
533
- FMT_ENABLE_IF (detail:: is_compiled_string<S>::value)>
533
+ FMT_ENABLE_IF (is_compiled_string<S>::value)>
534
534
void print(const S& fmt, const Args&... args) {
535
535
print (stdout, fmt, args...);
536
536
}
0 commit comments