diff --git a/doc/src/Manual.rst b/doc/src/Manual.rst
index eb630c4fe2..df18f62164 100644
--- a/doc/src/Manual.rst
+++ b/doc/src/Manual.rst
@@ -23,10 +23,23 @@ coordinated.
----------
-The content for this manual is part of the LAMMPS distribution. The
-online version always corresponds to the latest feature release version.
-If needed, you can build a local copy of the manual as HTML pages or a
-PDF file by following the steps on the :doc:`Build_manual` page. If you
+The content for this manual is part of the LAMMPS distribution in its
+doc directory.
+
+* The version of the manual on the LAMMPS website corresponds to the
+ latest LAMMPS feature release. It is available at:
+ `https://docs.lammps.org/ `_.
+* A version of the manual corresponding to the latest LAMMPS stable
+ release (state of the *stable* branch on GitHub) is available online
+ at: `https://docs.lammps.org/stable/
+ `_
+* A version of the manual with the features most recently added to
+ LAMMPS (state of the *develop* branch on GitHub) is available at:
+ `https://docs.lammps.org/latest/ `_
+
+If needed, you can build a copy on your local machine of the manual
+(HTML pages or PDF file) for the version of LAMMPS you have
+downloaded. Follow the steps on the :doc:`Build_manual` page. If you
have difficulties viewing the pages, please :ref:`see this note
`.
diff --git a/src/fmt/core.h b/src/fmt/core.h
index 23c9171fc8..9f7de781bb 100644
--- a/src/fmt/core.h
+++ b/src/fmt/core.h
@@ -1429,9 +1429,8 @@ template struct arg_mapper {
FMT_ENABLE_IF(
std::is_pointer::value || std::is_member_pointer::value ||
std::is_function::type>::value ||
- (std::is_convertible::value &&
- !std::is_convertible::value &&
- !has_formatter::value))>
+ (std::is_array::value &&
+ !std::is_convertible::value))>
FMT_CONSTEXPR auto map(const T&) -> unformattable_pointer {
return {};
}
@@ -1671,7 +1670,6 @@ template class basic_format_arg {
\endrst
*/
// DEPRECATED!
-FMT_EXPORT
template
FMT_CONSTEXPR FMT_INLINE auto visit_format_arg(
Visitor&& vis, const basic_format_arg& arg) -> decltype(vis(0)) {
diff --git a/src/fmt/format.h b/src/fmt/format.h
index e5bd8b110e..87a34b972c 100644
--- a/src/fmt/format.h
+++ b/src/fmt/format.h
@@ -83,7 +83,8 @@
# if FMT_CPLUSPLUS >= 202002L
# if FMT_HAS_CPP_ATTRIBUTE(no_unique_address)
# define FMT_NO_UNIQUE_ADDRESS [[no_unique_address]]
-# elif FMT_MSC_VERSION >= 1929 // VS2019 v16.10 and later
+// VS2019 v16.10 and later except clang-cl (https://reviews.llvm.org/D110485)
+# elif (FMT_MSC_VERSION >= 1929) && !FMT_CLANG_VERSION
# define FMT_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
# endif
# endif
@@ -368,8 +369,6 @@ class uint128_fallback {
private:
uint64_t lo_, hi_;
- friend uint128_fallback umul128(uint64_t x, uint64_t y) noexcept;
-
public:
constexpr uint128_fallback(uint64_t hi, uint64_t lo) : lo_(lo), hi_(hi) {}
constexpr uint128_fallback(uint64_t value = 0) : lo_(value), hi_(0) {}
@@ -1038,6 +1037,7 @@ namespace detail {
FMT_API bool write_console(std::FILE* f, string_view text);
FMT_API void print(std::FILE*, string_view);
} // namespace detail
+
FMT_BEGIN_EXPORT
// Suppress a misleading warning in older versions of clang.
@@ -1387,8 +1387,8 @@ FMT_CONSTEXPR auto format_uint(Char* buffer, UInt value, int num_digits,
}
template
-inline auto format_uint(It out, UInt value, int num_digits, bool upper = false)
- -> It {
+FMT_CONSTEXPR inline auto format_uint(It out, UInt value, int num_digits,
+ bool upper = false) -> It {
if (auto ptr = to_pointer(out, to_unsigned(num_digits))) {
format_uint(ptr, value, num_digits, upper);
return out;
@@ -1453,7 +1453,7 @@ template class to_utf8 {
++p;
if (p == s.end() || (c & 0xfc00) != 0xd800 || (*p & 0xfc00) != 0xdc00) {
if (policy == to_utf8_error_policy::abort) return false;
- buf.append(string_view("�"));
+ buf.append(string_view("\xEF\xBF\xBD"));
--p;
} else {
c = (c << 10) + static_cast(*p) - 0x35fdc00;
@@ -1486,9 +1486,9 @@ inline uint128_fallback umul128(uint64_t x, uint64_t y) noexcept {
auto p = static_cast(x) * static_cast(y);
return {static_cast(p >> 64), static_cast(p)};
#elif defined(_MSC_VER) && defined(_M_X64)
- auto result = uint128_fallback();
- result.lo_ = _umul128(x, y, &result.hi_);
- return result;
+ auto hi = uint64_t();
+ auto lo = _umul128(x, y, &hi);
+ return {hi, lo};
#else
const uint64_t mask = static_cast(max_value());
@@ -4287,7 +4287,8 @@ auto join(Range&& range, string_view sep)
std::string answer = fmt::to_string(42);
\endrst
*/
-template ::value)>
+template ::value &&
+ !detail::has_format_as::value)>
inline auto to_string(const T& value) -> std::string {
auto buffer = memory_buffer();
detail::write(appender(buffer), value);
@@ -4312,6 +4313,14 @@ FMT_NODISCARD auto to_string(const basic_memory_buffer& buf)
return std::basic_string(buf.data(), size);
}
+template ::value &&
+ detail::has_format_as::value)>
+inline auto to_string(const T& value) -> std::string {
+ return to_string(format_as(value));
+}
+
+FMT_END_EXPORT
+
namespace detail {
template
@@ -4383,6 +4392,8 @@ void vformat_to(buffer& buf, basic_string_view fmt,
detail::parse_format_string(fmt, format_handler(out, fmt, args, loc));
}
+FMT_BEGIN_EXPORT
+
#ifndef FMT_HEADER_ONLY
extern template FMT_API void vformat_to(buffer&, string_view,
typename vformat_args<>::type,
diff --git a/src/fmt/std.h b/src/fmt/std.h
index b0e78e10dd..b4e055c28d 100644
--- a/src/fmt/std.h
+++ b/src/fmt/std.h
@@ -8,6 +8,7 @@
#ifndef FMT_STD_H_
#define FMT_STD_H_
+#include
#include
#include
#include
@@ -435,6 +436,30 @@ struct formatter
+struct formatter, Char,
+ enable_if_t::value>>
+ : formatter {
+ template
+ auto format(const std::atomic& v, FormatContext& ctx) const
+ -> decltype(ctx.out()) {
+ return formatter::format(v.load(), ctx);
+ }
+};
+#ifdef __cpp_lib_atomic_flag_test
+FMT_EXPORT
+template
+struct formatter
+ : formatter {
+ template
+ auto format(const std::atomic_flag& v, FormatContext& ctx) const
+ -> decltype(ctx.out()) {
+ return formatter::format(v.test(), ctx);
+ }
+};
+#endif // __cpp_lib_atomic_flag_test
+
+FMT_END_NAMESPACE
#endif // FMT_STD_H_