Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explicit specialization of 'is_string<std::FILE *>' after instantiation #1085

Closed
riccozzz opened this issue Mar 18, 2019 · 0 comments
Closed

Comments

@riccozzz
Copy link
Contributor

riccozzz commented Mar 18, 2019

Example here. I believe per commit c21c6b8

This error will happen when you include format.h, format with a std::FILE* handle, and later include color.h (ie from another translation unit).

Specialization happens here:

fmt/include/fmt/color.h

Lines 521 to 526 in 02a6f16

// The following specialization disables using std::FILE as a character type,
// which is needed because or else
// fmt::print(stderr, fmt::emphasis::bold, "");
// would take stderr (a std::FILE *) as the format string.
template <> struct is_string<std::FILE*> : std::false_type {};
template <> struct is_string<const std::FILE*> : std::false_type {};

Can these be forward declared in core.h before instantiation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants