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

fmt::print for ostreams does no compile time checking #2817

Closed
timsong-cpp opened this issue Mar 18, 2022 · 0 comments
Closed

fmt::print for ostreams does no compile time checking #2817

timsong-cpp opened this issue Mar 18, 2022 · 0 comments

Comments

@timsong-cpp
Copy link
Contributor

#include <fmt/format.h>
#include <fmt/ostream.h>
#include <iostream>

int main() {
    fmt::print(std::cout, "{:d}", "not a number");
}

Simply throws format_error at runtime even when compiled with -std=c++2a or FMT_STRING is used.

timsong-cpp added a commit to timsong-cpp/fmt that referenced this issue Mar 18, 2022
timsong-cpp added a commit to timsong-cpp/fmt that referenced this issue Mar 18, 2022
@vitaut vitaut closed this as completed in 17ba99c Mar 18, 2022
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

1 participant