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

unpacked make_arg should also assert on unformattable arguments #2818

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

unpacked make_arg should also assert on unformattable arguments #2818

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

Comments

@timsong-cpp
Copy link
Contributor

#include <fmt/format.h>

struct E {};

int main() {
    fmt::print(fmt::runtime(""), 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, E());
}

This compiles and produces a linker error from the undefined reference to value(unformattable) constructor. The static_asserts are only engaged when there are 15 or fewer format arguments.

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