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

possible API break upgrading form 6.1.2 to 6.2.1 #1730

Closed
prince-chrismc opened this issue Jun 15, 2020 · 1 comment
Closed

possible API break upgrading form 6.1.2 to 6.2.1 #1730

prince-chrismc opened this issue Jun 15, 2020 · 1 comment

Comments

@prince-chrismc
Copy link

I am using many third_party libraries, one of which is this string_view implementation.

My code in question looks like the following...

const nonstd::string_view path = "path/to/file";
const auto err_msg = fmt::format(FMT_STRING("Endpoint - {:s}"), path);

...which compiled with v6.1.2

However, with upgrading to v6.2.1 I need to call path.to_string() for an std::string in order for it to compile. There is no runtime error if I remove the compile time check.

compile error
1>C:\Users\cmcarthu\.conan\data\fmt\6.2.1\_\_\package\8cf01e2f50fcd6b63525e70584df0326550364e1\include\fmt/format.h(2705): error C2131: expression did not evaluate to a constant
1>C:\Users\cmcarthu\.conan\data\fmt\6.2.1\_\_\package\8cf01e2f50fcd6b63525e70584df0326550364e1\include\fmt/format.h(2638): note: failure was caused by call of undefined function or one not declared 'constexpr'
1>C:\Users\cmcarthu\.conan\data\fmt\6.2.1\_\_\package\8cf01e2f50fcd6b63525e70584df0326550364e1\include\fmt/format.h(2638): note: see usage of 'fmt::v6::internal::fallback_formatter<T,Char,void>::parse'
1>        with
1>        [
1>            T=nonstd::sv_lite::basic_string_view<char,std::char_traits<char>>,
1>            Char=char
1>        ]
1>c:\users\cmcarthu\.conan\data\fmt\6.2.1\_\_\package\8cf01e2f50fcd6b63525e70584df0326550364e1\include\fmt\core.h(1655): note: see reference to function template instantiation 'void fmt::v6::internal::check_format_string<const restinio::string_view_t&,S,0>(S)' being compiled
1>        with
1>        [
1>            S=verifyRequest::<lambda_354ff5390c6b7230341c10874149fa5c>::()::FMT_COMPILE_STRING
1>        ]
1>c:\users\cmcarthu\.conan\data\fmt\6.2.1\_\_\package\8cf01e2f50fcd6b63525e70584df0326550364e1\include\fmt\core.h(1747): note: see reference to function template instantiation 'fmt::v6::format_arg_store<fmt::v6::basic_format_context<std::back_insert_iterator<fmt::v6::internal::buffer<char>>,char>,const nonstd::sv_lite::basic_string_view<char,std::char_traits<char>>> fmt::v6::internal::make_args_checked<const restinio::string_view_t&,S,char>(const S &,const nonstd::sv_lite::basic_string_view<char,std::char_traits<char>> &)' being compiled
1>        with
1>        [
1>            S=verifyRequest::<lambda_354ff5390c6b7230341c10874149fa5c>::()::FMT_COMPILE_STRING
1>        ]
1>Y:\repository\file.cpp(848): note: see reference to function template instantiation 'std::basic_string<char,std::char_traits<char>,std::allocator<char>> fmt::v6::format<verifyRequest::<lambda_354ff5390c6b7230341c10874149fa5c>::()::FMT_COMPILE_STRING,const nonstd::string_view&,char>(const S &,const nonstd::string_view &)' being compiled
1>        with
1>        [
1>            S=verifyRequest::<lambda_354ff5390c6b7230341c10874149fa5c>::()::FMT_COMPILE_STRING
1>        ]
1>C:\Users\cmcarthu\.conan\data\string-view-lite\1.3.0\_\_\package\5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9\include\nonstd/string_view.hpp(1183): note: see reference to class template instantiation 'nonstd::sv_lite::basic_string_view<char,std::char_traits<char>>' being compiled

Reading the release notes, there were improvements to this area. Perhaps there's a bug? Or is there something with the library I am using?

@vitaut
Copy link
Contributor

vitaut commented Jun 17, 2020

Looks like the same issue as #1692 which has been already fixed in master.

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

No branches or pull requests

2 participants