Fmt: error: attribute does not apply to any entity

Created on 2 Sep 2019  路  3Comments  路  Source: fmtlib/fmt

OS:win10
IDE:VS2017

when using fmtlib in my project,error occured like as:
E1866 error: attribute does not apply to any entity
core.h line:486

Most helpful comment

Simply #define FMT_DEPRECATED before #include <fmt/format.h> in the code that uses fmtlib; no need to mess with the fmtlib source.

All 3 comments

same problems here, how do you solve it? thanks.

Fixed it by commenting FMT_DEPRECATED in core.h and format.h (lines where VS pointed to an error).

Simply #define FMT_DEPRECATED before #include <fmt/format.h> in the code that uses fmtlib; no need to mess with the fmtlib source.

Was this page helpful?
0 / 5 - 0 ratings