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

Width type checks with FMT_COMPILE() #1809

Closed
OnurKader opened this issue Aug 9, 2020 · 2 comments
Closed

Width type checks with FMT_COMPILE() #1809

OnurKader opened this issue Aug 9, 2020 · 2 comments

Comments

@OnurKader
Copy link

I assume it's the same problem with #1715, so feel free to close this if it's a duplicate

	std::string str = fmt::format(FMT_COMPILE("{:>{}}"), "Whoops", 15);
	fmt::print("Wow: {}\n", str);

Results in a runtime exception

terminate called after throwing an instance of 'fmt::v7::format_error'
  what():  width is not integer
@vitaut
Copy link
Contributor

vitaut commented Aug 10, 2020

Dynamic width wasn't implemented in FMT_COMPILE but it is as of 54daa08.

@vitaut vitaut closed this as completed Aug 10, 2020
@OnurKader
Copy link
Author

Thank you <3

Have a lovely day!

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