LLNL / axom

CS infrastructure components for HPC applications
BSD 3-Clause "New" or "Revised" License
157 stars 27 forks source link

With C++17, compile error because fmt has deprecated arg_mapper<Context>::map #1169

Open agcapps opened 1 year ago

agcapps commented 1 year ago

A host code trying to compile using MSVC and C++17 ran into this error, within inlet:

Error C4996 'axom::fmt::v9::detail::arg_mapper::map': was declared deprecated d:\path\to\axom\src\thirdparty\axom\fmt\core.h 1737

Others have encountered this: https://github.com/fmtlib/fmt/issues/3183. The response from the fmt project was as follows:

You need to make EnumTest formattable via format_as or formatter specialization. Please see the docs for more details: https://fmt.dev/latest/api.html#formatting-user-defined-types.

kennyweiss commented 1 year ago

Was the enum in inlet or in the host code? In either case, I think this should be fairly easy to resolve.

We've added fmt::formatters in a few places within axom, e.g. for the primal::Point class.

See, e.g.:

agcapps commented 1 year ago

Good question. This may have been user code trying to format an Inlet object. Thanks for the links.