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

std::ostream support for fmt::printf is broken since f72a905 #1631

Closed
375gnu opened this issue Apr 12, 2020 · 1 comment
Closed

std::ostream support for fmt::printf is broken since f72a905 #1631

375gnu opened this issue Apr 12, 2020 · 1 comment

Comments

@375gnu
Copy link

375gnu commented Apr 12, 2020

Consider the following example:

#include <fmt/printf.h>
#include <filesystem>
int main()
{
        fmt::printf("%s\n", std::filesystem::path("/dev/null"));
}

Since f72a905 it's not possible to compile it:

include/fmt/format.h:2680:53: error: ‘class fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>’ has no member named ‘error_handler’
                                                 ctx.error_handler());
                                                 ~~~~^~~~~~~~~~~~~
include/fmt/format.h:2683:48: error: no matching function for call to ‘fmt::v6::basic_printf_context<std::back_insert_iterator<fmt::v6::internal::buffer<char> >, char>::arg(fmt::v6::basic_string_view<char>&)’
     value = internal::get_dynamic_spec<Handler>(ctx.arg(ref.val.name),
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
                                                 ctx.error_handler());
                                                 ~~~~~~~~~~~~~~~~~~~~

Full g++ error.log

I tested with gcc 7 & 8 and clang 9 but with gcc 7 lib.

@vitaut
Copy link
Contributor

vitaut commented Apr 12, 2020

Fixed in e99809f. Thanks for reporting!

@vitaut vitaut closed this as completed Apr 12, 2020
375gnu added a commit to CelestiaProject/Celestia that referenced this issue Apr 13, 2020
levinli303 pushed a commit to CelestiaProject/Celestia that referenced this issue Apr 13, 2020
vitaut added a commit that referenced this issue May 9, 2020
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