public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/108062] New: Test spdlog c++20 std::format
@ 2022-12-11 15:10 lukaszcz18 at wp dot pl
2022-12-11 18:32 ` [Bug libstdc++/108062] " pinskia at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: lukaszcz18 at wp dot pl @ 2022-12-11 15:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108062
Bug ID: 108062
Summary: Test spdlog c++20 std::format
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: lukaszcz18 at wp dot pl
Target Milestone: ---
///////////////////////////////////////////////////////////////////////////////
// Uncomment to use C++20 std::format instead of fmt.
//
// #define SPDLOG_USE_STD_FORMAT
///////////////////////////////////////////////////////////////////////////////
I use gcc 13.0.0 20221211, spdlog 1.11.0 20221211
In file included from
c:\gcc1300\x86_64-w64-mingw32\include\spdlog\fmt\fmt.h:14,
from c:\gcc1300\x86_64-w64-mingw32\include\spdlog\common.h:50,
from c:\gcc1300\x86_64-w64-mingw32\include\spdlog\spdlog.h:12,
from common.h:40,
from BMPFormat.cpp:28:
c:\gcc1300\include\c++\13.0.0\format:3350:40: error: expected identifier before
',' token
3350 | __format::__do_vformat_to(_Out_, basic_string_view<_CharT_>,
| ^
c:\gcc1300\include\c++\13.0.0\format: In instantiation of '_Out
std::__format::__do_vformat_to(_Out, std::basic_string_view<_CharT>, const
std::basic_format_args<_Context>&, const std::locale*) [with _Out =
_Sink_iter<char>; _CharT = char; _Context =
std::basic_format_context<_Sink_iter<char>, char>]':
c:\gcc1300\include\c++\13.0.0\format:3646:39: required from '_Out
std::vformat_to(_Out, string_view, format_args) [with _Out =
__format::_Sink_iter<char>; string_view = basic_string_view<char>; format_args
= basic_format_args<basic_format_context<__format::_Sink_iter<char>, char> >]'
c:\gcc1300\include\c++\13.0.0\format:3673:20: required from here
c:\gcc1300\include\c++\13.0.0\format:3614:24: error:
'std::basic_format_context<_Out,
_CharT>::basic_format_context(std::basic_format_args<std::basic_format_context<_Out,
_CharT> >, _Out) [with _Out = std::__format::_Sink_iter<char>; _CharT = char]'
is private within this context
3614 | ? _Context(__args, __sink_out)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
c:\gcc1300\include\c++\13.0.0\format:3338:7: note: declared private here
3338 | basic_format_context(basic_format_args<basic_format_context>
__args,
| ^~~~~~~~~~~~~~~~~~~~
c:\gcc1300\include\c++\13.0.0\format:3615:24: error:
'std::basic_format_context<_Out,
_CharT>::basic_format_context(std::basic_format_args<std::basic_format_context<_Out,
_CharT> >, _Out, const std::locale&) [with _Out =
std::__format::_Sink_iter<char>; _CharT = char]' is private within this context
3615 | : _Context(__args, __sink_out, *__loc);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c:\gcc1300\include\c++\13.0.0\format:3343:7: note: declared private here
3343 | basic_format_context(basic_format_args<basic_format_context>
__args,
| ^~~~~~~~~~~~~~~~~~~~
c:\gcc1300\include\c++\13.0.0\format: In instantiation of '_Out
std::__format::__do_vformat_to(_Out, std::basic_string_view<_CharT>, const
std::basic_format_args<_Context>&, const std::locale*) [with _Out =
_Sink_iter<wchar_t>; _CharT = wchar_t; _Context =
std::basic_format_context<_Sink_iter<wchar_t>, wchar_t>]':
c:\gcc1300\include\c++\13.0.0\format:3652:39: required from '_Out
std::vformat_to(_Out, wstring_view, wformat_args) [with _Out =
__format::_Sink_iter<wchar_t>; wstring_view = basic_string_view<wchar_t>;
wformat_args =
basic_format_args<basic_format_context<__format::_Sink_iter<wchar_t>, wchar_t>
>]'
c:\gcc1300\include\c++\13.0.0\format:3682:20: required from here
c:\gcc1300\include\c++\13.0.0\format:3614:24: error:
'std::basic_format_context<_Out,
_CharT>::basic_format_context(std::basic_format_args<std::basic_format_context<_Out,
_CharT> >, _Out) [with _Out = std::__format::_Sink_iter<wchar_t>; _CharT =
wchar_t]' is private within this context
3614 | ? _Context(__args, __sink_out)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/108062] Test spdlog c++20 std::format
2022-12-11 15:10 [Bug libstdc++/108062] New: Test spdlog c++20 std::format lukaszcz18 at wp dot pl
@ 2022-12-11 18:32 ` pinskia at gcc dot gnu.org
2022-12-12 11:05 ` redi at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-11 18:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108062
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I tried to test this but my cmake is not new enough:
Target "example" requires the language dialect "CXX20" , but CMake does not
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/108062] Test spdlog c++20 std::format
2022-12-11 15:10 [Bug libstdc++/108062] New: Test spdlog c++20 std::format lukaszcz18 at wp dot pl
2022-12-11 18:32 ` [Bug libstdc++/108062] " pinskia at gcc dot gnu.org
@ 2022-12-12 11:05 ` redi at gcc dot gnu.org
2022-12-12 11:11 ` redi at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2022-12-12 11:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108062
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-12-12
Status|UNCONFIRMED |WAITING
Ever confirmed|0 |1
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Not a valid bug report, please read https://gcc.gnu.org/bugs/
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/108062] Test spdlog c++20 std::format
2022-12-11 15:10 [Bug libstdc++/108062] New: Test spdlog c++20 std::format lukaszcz18 at wp dot pl
2022-12-11 18:32 ` [Bug libstdc++/108062] " pinskia at gcc dot gnu.org
2022-12-12 11:05 ` redi at gcc dot gnu.org
@ 2022-12-12 11:11 ` redi at gcc dot gnu.org
2022-12-12 11:15 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2022-12-12 11:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108062
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Why am I having to say this AGAIN?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107886#c7
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107886#c9
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104592#c3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104592#c5
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/108062] Test spdlog c++20 std::format
2022-12-11 15:10 [Bug libstdc++/108062] New: Test spdlog c++20 std::format lukaszcz18 at wp dot pl
` (2 preceding siblings ...)
2022-12-12 11:11 ` redi at gcc dot gnu.org
@ 2022-12-12 11:15 ` redi at gcc dot gnu.org
2022-12-12 14:03 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2022-12-12 11:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108062
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |redi at gcc dot gnu.org
Status|WAITING |ASSIGNED
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jamaika from comment #0)
> c:\gcc1300\include\c++\13.0.0\format:3350:40: error: expected identifier
> before ',' token
> 3350 | __format::__do_vformat_to(_Out_, basic_string_view<_CharT_>,
> | ^
This looks like you've got _Out_ defined as a macro, which causes an error in
this friend declaration.
Then because the function isn't a friend, you get access errors in the function
that's supposed to be a friend:
> c:\gcc1300\include\c++\13.0.0\format: In instantiation of '_Out
> std::__format::__do_vformat_to(_Out, std::basic_string_view<_CharT>, const
> std::basic_format_args<_Context>&, const std::locale*) [with _Out =
> _Sink_iter<char>; _CharT = char; _Context =
> std::basic_format_context<_Sink_iter<char>, char>]':
> c:\gcc1300\include\c++\13.0.0\format:3646:39: required from '_Out
> std::vformat_to(_Out, string_view, format_args) [with _Out =
> __format::_Sink_iter<char>; string_view = basic_string_view<char>;
> format_args =
> basic_format_args<basic_format_context<__format::_Sink_iter<char>, char> >]'
> c:\gcc1300\include\c++\13.0.0\format:3673:20: required from here
> c:\gcc1300\include\c++\13.0.0\format:3614:24: error:
> 'std::basic_format_context<_Out,
> _CharT>::basic_format_context(std::basic_format_args<std::
> basic_format_context<_Out, _CharT> >, _Out) [with _Out =
> std::__format::_Sink_iter<char>; _CharT = char]' is private within this
> context
> 3614 | ? _Context(__args, __sink_out)
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> c:\gcc1300\include\c++\13.0.0\format:3338:7: note: declared private here
> 3338 | basic_format_context(basic_format_args<basic_format_context>
> __args,
> | ^~~~~~~~~~~~~~~~~~~~
And I think that's because _Out_ is a Windows SAL macro:
mingw-w64-tools/widl/include/sal.h:#define _Out_
So confirmed as a bug but next time please provide a proper bug report.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/108062] Test spdlog c++20 std::format
2022-12-11 15:10 [Bug libstdc++/108062] New: Test spdlog c++20 std::format lukaszcz18 at wp dot pl
` (3 preceding siblings ...)
2022-12-12 11:15 ` redi at gcc dot gnu.org
@ 2022-12-12 14:03 ` redi at gcc dot gnu.org
2022-12-12 18:22 ` lukaszcz18 at wp dot pl
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2022-12-12 14:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108062
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Target Milestone|--- |13.0
Status|ASSIGNED |RESOLVED
Keywords| |rejects-valid
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed by r13-4613-gcb363fd9f19eb7
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/108062] Test spdlog c++20 std::format
2022-12-11 15:10 [Bug libstdc++/108062] New: Test spdlog c++20 std::format lukaszcz18 at wp dot pl
` (4 preceding siblings ...)
2022-12-12 14:03 ` redi at gcc dot gnu.org
@ 2022-12-12 18:22 ` lukaszcz18 at wp dot pl
2022-12-12 20:20 ` redi at gcc dot gnu.org
2022-12-12 21:27 ` lukaszcz18 at wp dot pl
7 siblings, 0 replies; 9+ messages in thread
From: lukaszcz18 at wp dot pl @ 2022-12-12 18:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108062
--- Comment #6 from Jamaika <lukaszcz18 at wp dot pl> ---
Thanks Jonathan
Thanks for the quick fix of the given errors. I realize that there may be other
errors not necessarily from gcc.
Test new codecs HTJPEG2000 C++20 Grok with spdlog 1.11.0 for Windows 10
In file included from
c:\gcc1300\x86_64-w64-mingw32\include\spdlog\fmt\fmt.h:14,
from c:\gcc1300\x86_64-w64-mingw32\include\spdlog\common.h:50,
from c:\gcc1300\x86_64-w64-mingw32\include\spdlog\spdlog.h:12,
from common.h:40,
from PNMFormat.cpp:29:
c:\gcc1300\include\c++\13.0.0\format: In instantiation of 'static
std::basic_format_args<_Context>::_Store<_Args>::_Element_t
std::basic_format_args<_Context>::_Store<_Args>::_S_make_elt(_Tp&) [with _Tp =
PNM_COLOUR_SPACE; _Args =
{std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::handle,
std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::handle}; _Context =
std::basic_format_context<std::__format::_Sink_iter<char>, char>; _Element_t =
std::basic_format_args<std::basic_format_context<std::__format::_Sink_iter<char>,
char>
>::_Store<std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::handle,
std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::handle>::_Element_t]':
c:\gcc1300\include\c++\13.0.0\format:3248:25: required from
'std::basic_format_args<_Context>::_Store<_Args>::_Store(_Tp& ...) [with _Tp =
{PNM_COLOUR_SPACE, PNM_COLOUR_SPACE}; _Args =
{std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::handle,
std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::handle}; _Context =
std::basic_format_context<std::__format::_Sink_iter<char>, char>]'
c:\gcc1300\include\c++\13.0.0\format:3300:14: required from 'auto
std::make_format_args(_Args&& ...) [with _Context =
basic_format_context<__format::_Sink_iter<char>, char>; _Args =
{PNM_COLOUR_SPACE&, PNM_COLOUR_SPACE&}]'
c:\gcc1300\x86_64-w64-mingw32\include\spdlog\logger.h:372:88: required from
'void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum,
spdlog::string_view_t, Args&& ...) [with Args = {PNM_COLOUR_SPACE&,
PNM_COLOUR_SPACE&}; spdlog::string_view_t = std::basic_string_view<char>]'
c:\gcc1300\x86_64-w64-mingw32\include\spdlog\logger.h:90:13: required from
'void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum,
spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {PNM_COLOUR_SPACE&,
PNM_COLOUR_SPACE&}; spdlog::format_string_t<Args ...> =
std::basic_string_view<char>]'
c:\gcc1300\x86_64-w64-mingw32\include\spdlog\logger.h:96:12: required from
'void spdlog::logger::log(spdlog::level::level_enum,
spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {PNM_COLOUR_SPACE&,
PNM_COLOUR_SPACE&}; spdlog::format_string_t<Args ...> =
std::basic_string_view<char>]'
c:\gcc1300\x86_64-w64-mingw32\include\spdlog\logger.h:164:12: required from
'void spdlog::logger::warn(spdlog::format_string_t<Args ...>, Args&& ...) [with
Args = {PNM_COLOUR_SPACE&, PNM_COLOUR_SPACE&}; spdlog::format_string_t<Args
...> = std::basic_string_view<char>]'
c:\gcc1300\x86_64-w64-mingw32\include\spdlog\spdlog.h:167:31: required from
'void spdlog::warn(format_string_t<Args ...>, Args&& ...) [with Args =
{PNM_COLOUR_SPACE&, PNM_COLOUR_SPACE&}; format_string_t<Args ...> =
std::basic_string_view<char>]'
PNMFormat.cpp:600:16: required from here
c:\gcc1300\include\c++\13.0.0\format:3237:40: error: no matching function for
call to
'std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::basic_format_arg(PNM_COLOUR_SPACE&)'
3237 | basic_format_arg<_Context> __arg(__v);
| ^~~~~
c:\gcc1300\include\c++\13.0.0\format:3005:9: note: candidate: 'template<class
_Tp> requires __formattable_with<_Tp, _Context, typename
_Context::formatter_type<typename std::remove_const<_Tp>::type>,
std::basic_format_parse_context<typename _Context::char_type> >
std::basic_format_arg<_Context>::basic_format_arg(_Tp&) [with _Context =
std::basic_format_context<std::__format::_Sink_iter<char>, char>]'
3005 | basic_format_arg(_Tp& __v) noexcept
| ^~~~~~~~~~~~~~~~
c:\gcc1300\include\c++\13.0.0\format:3005:9: note: template argument
deduction/substitution failed:
c:\gcc1300\include\c++\13.0.0\format:3005:9: note: constraints not satisfied
In file included from c:\gcc1300\include\c++\13.0.0\compare:37,
from c:\gcc1300\include\c++\13.0.0\bits\char_traits.h:48,
from c:\gcc1300\include\c++\13.0.0\string:42,
from IImageFormat.h:21,
from ImageFormat.h:20,
from PNMFormat.h:19,
from PNMFormat.cpp:26:
c:\gcc1300\include\c++\13.0.0\concepts: In substitution of 'template<class _Tp>
requires __formattable_with<_Tp, _Context, typename
_Context::formatter_type<typename std::remove_const<_Tp>::type>,
std::basic_format_parse_context<typename _Context::char_type> >
std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::basic_format_arg(_Tp&) [with _Tp =
std::basic_format_context<std::__format::_Sink_iter<char>, char>]':
c:\gcc1300\include\c++\13.0.0\format:3237:33: required from 'static
std::basic_format_args<_Context>::_Store<_Args>::_Element_t
std::basic_format_args<_Context>::_Store<_Args>::_S_make_elt(_Tp&) [with _Tp =
PNM_COLOUR_SPACE; _Args =
{std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::handle,
std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::handle}; _Context =
std::basic_format_context<std::__format::_Sink_iter<char>, char>; _Element_t =
std::basic_format_args<std::basic_format_context<std::__format::_Sink_iter<char>,
char>
>::_Store<std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::handle,
std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::handle>::_Element_t]'
c:\gcc1300\include\c++\13.0.0\format:3248:25: required from
'std::basic_format_args<_Context>::_Store<_Args>::_Store(_Tp& ...) [with _Tp =
{PNM_COLOUR_SPACE, PNM_COLOUR_SPACE}; _Args =
{std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::handle,
std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::handle}; _Context =
std::basic_format_context<std::__format::_Sink_iter<char>, char>]'
c:\gcc1300\include\c++\13.0.0\format:3300:14: required from 'auto
std::make_format_args(_Args&& ...) [with _Context =
basic_format_context<__format::_Sink_iter<char>, char>; _Args =
{PNM_COLOUR_SPACE&, PNM_COLOUR_SPACE&}]'
c:\gcc1300\x86_64-w64-mingw32\include\spdlog\logger.h:372:88: required from
'void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum,
spdlog::string_view_t, Args&& ...) [with Args = {PNM_COLOUR_SPACE&,
PNM_COLOUR_SPACE&}; spdlog::string_view_t = std::basic_string_view<char>]'
c:\gcc1300\x86_64-w64-mingw32\include\spdlog\logger.h:90:13: required from
'void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum,
spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {PNM_COLOUR_SPACE&,
PNM_COLOUR_SPACE&}; spdlog::format_string_t<Args ...> =
std::basic_string_view<char>]'
c:\gcc1300\x86_64-w64-mingw32\include\spdlog\logger.h:96:12: required from
'void spdlog::logger::log(spdlog::level::level_enum,
spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {PNM_COLOUR_SPACE&,
PNM_COLOUR_SPACE&}; spdlog::format_string_t<Args ...> =
std::basic_string_view<char>]'
c:\gcc1300\x86_64-w64-mingw32\include\spdlog\logger.h:164:12: required from
'void spdlog::logger::warn(spdlog::format_string_t<Args ...>, Args&& ...) [with
Args = {PNM_COLOUR_SPACE&, PNM_COLOUR_SPACE&}; spdlog::format_string_t<Args
...> = std::basic_string_view<char>]'
c:\gcc1300\x86_64-w64-mingw32\include\spdlog\spdlog.h:167:31: required from
'void spdlog::warn(format_string_t<Args ...>, Args&& ...) [with Args =
{PNM_COLOUR_SPACE&, PNM_COLOUR_SPACE&}; format_string_t<Args ...> =
std::basic_string_view<char>]'
PNMFormat.cpp:600:16: required from here
c:\gcc1300\include\c++\13.0.0\concepts:152:13: required for the satisfaction
of 'constructible_from<_Tp, _Tp>' [with _Tp = std::formatter<PNM_COLOUR_SPACE,
char>]
c:\gcc1300\include\c++\13.0.0\concepts:166:13: required for the satisfaction
of 'move_constructible<_Tp>' [with _Tp = std::formatter<PNM_COLOUR_SPACE,
char>]
c:\gcc1300\include\c++\13.0.0\concepts:171:13: required for the satisfaction
of 'copy_constructible<_Tp>' [with _Tp = std::formatter<PNM_COLOUR_SPACE,
char>]
c:\gcc1300\include\c++\13.0.0\concepts:267:13: required for the satisfaction
of 'copyable<_Tp>' [with _Tp = std::formatter<PNM_COLOUR_SPACE, char>]
c:\gcc1300\include\c++\13.0.0\concepts:272:13: required for the satisfaction
of 'semiregular<_Formatter>' [with _Formatter =
std::formatter<PNM_COLOUR_SPACE, char>]
c:\gcc1300\include\c++\13.0.0\format:2213:13: required for the satisfaction
of '__formattable_with<_Tp, _Context, typename
_Context::formatter_type<typename std::remove_const<_Tp>::type>,
std::basic_format_parse_context<typename _Context::char_type> >' [with _Tp =
PNM_COLOUR_SPACE; _Context =
std::basic_format_context<std::__format::_Sink_iter<char>, char>]
c:\gcc1300\include\c++\13.0.0\concepts:153:30: note: the expression
'is_constructible_v<_Tp, _Args ...> [with _Tp =
std::formatter<PNM_COLOUR_SPACE, char>; _Args =
{std::formatter<PNM_COLOUR_SPACE, char>}]' evaluated to 'false'
153 | = destructible<_Tp> && is_constructible_v<_Tp, _Args...>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
c:\gcc1300\include\c++\13.0.0\format: In instantiation of 'static
std::basic_format_args<_Context>::_Store<_Args>::_Element_t
std::basic_format_args<_Context>::_Store<_Args>::_S_make_elt(_Tp&) [with _Tp =
PNM_COLOUR_SPACE; _Args =
{std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::handle,
std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::handle}; _Context =
std::basic_format_context<std::__format::_Sink_iter<char>, char>; _Element_t =
std::basic_format_args<std::basic_format_context<std::__format::_Sink_iter<char>,
char>
>::_Store<std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::handle,
std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::handle>::_Element_t]':
c:\gcc1300\include\c++\13.0.0\format:3248:25: required from
'std::basic_format_args<_Context>::_Store<_Args>::_Store(_Tp& ...) [with _Tp =
{PNM_COLOUR_SPACE, PNM_COLOUR_SPACE}; _Args =
{std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::handle,
std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::handle}; _Context =
std::basic_format_context<std::__format::_Sink_iter<char>, char>]'
c:\gcc1300\include\c++\13.0.0\format:3300:14: required from 'auto
std::make_format_args(_Args&& ...) [with _Context =
basic_format_context<__format::_Sink_iter<char>, char>; _Args =
{PNM_COLOUR_SPACE&, PNM_COLOUR_SPACE&}]'
c:\gcc1300\x86_64-w64-mingw32\include\spdlog\logger.h:372:88: required from
'void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum,
spdlog::string_view_t, Args&& ...) [with Args = {PNM_COLOUR_SPACE&,
PNM_COLOUR_SPACE&}; spdlog::string_view_t = std::basic_string_view<char>]'
c:\gcc1300\x86_64-w64-mingw32\include\spdlog\logger.h:90:13: required from
'void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum,
spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {PNM_COLOUR_SPACE&,
PNM_COLOUR_SPACE&}; spdlog::format_string_t<Args ...> =
std::basic_string_view<char>]'
c:\gcc1300\x86_64-w64-mingw32\include\spdlog\logger.h:96:12: required from
'void spdlog::logger::log(spdlog::level::level_enum,
spdlog::format_string_t<Args ...>, Args&& ...) [with Args = {PNM_COLOUR_SPACE&,
PNM_COLOUR_SPACE&}; spdlog::format_string_t<Args ...> =
std::basic_string_view<char>]'
c:\gcc1300\x86_64-w64-mingw32\include\spdlog\logger.h:164:12: required from
'void spdlog::logger::warn(spdlog::format_string_t<Args ...>, Args&& ...) [with
Args = {PNM_COLOUR_SPACE&, PNM_COLOUR_SPACE&}; spdlog::format_string_t<Args
...> = std::basic_string_view<char>]'
c:\gcc1300\x86_64-w64-mingw32\include\spdlog\spdlog.h:167:31: required from
'void spdlog::warn(format_string_t<Args ...>, Args&& ...) [with Args =
{PNM_COLOUR_SPACE&, PNM_COLOUR_SPACE&}; format_string_t<Args ...> =
std::basic_string_view<char>]'
PNMFormat.cpp:600:16: required from here
c:\gcc1300\include\c++\13.0.0\format:2820:7: note: candidate:
'std::basic_format_arg<_Context>::basic_format_arg() [with _Context =
std::basic_format_context<std::__format::_Sink_iter<char>, char>]'
2820 | basic_format_arg() noexcept : _M_type(__format::_Arg_none) { }
| ^~~~~~~~~~~~~~~~
c:\gcc1300\include\c++\13.0.0\format:2820:7: note: candidate expects 0
arguments, 1 provided
c:\gcc1300\include\c++\13.0.0\format:2758:11: note: candidate: 'constexpr
std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >::basic_format_arg(const
std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >&)'
2758 | class basic_format_arg
| ^~~~~~~~~~~~~~~~
c:\gcc1300\include\c++\13.0.0\format:2758:11: note: no known conversion for
argument 1 from 'PNM_COLOUR_SPACE' to 'const
std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >&'
c:\gcc1300\include\c++\13.0.0\format:2758:11: note: candidate: 'constexpr
std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char>
>::basic_format_arg(std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >&&)'
c:\gcc1300\include\c++\13.0.0\format:2758:11: note: no known conversion for
argument 1 from 'PNM_COLOUR_SPACE' to
'std::basic_format_arg<std::basic_format_context<std::__format::_Sink_iter<char>,
char> >&&'
TIFFFormat.cpp: In function 'void set_resolution(double*, float, float, short
int)':
TIFFFormat.cpp:697:18: error: 'floor' was not declared in this scope; did you
mean 'std::chrono::floor'?
697 | res[i] = floor(res[i]+0.5);
| ^~~~~
| std::chrono::floor
In file included from c:\gcc1300\include\c++\13.0.0\mutex:44,
from ImageFormat.h:25,
from TIFFFormat.h:30,
from TIFFFormat.cpp:29:
c:\gcc1300\include\c++\13.0.0\bits\chrono.h:1023:7: note: 'std::chrono::floor'
declared here
1023 | floor(const time_point<_Clock, _Dur>& __tp)
| ^~~~~
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/108062] Test spdlog c++20 std::format
2022-12-11 15:10 [Bug libstdc++/108062] New: Test spdlog c++20 std::format lukaszcz18 at wp dot pl
` (5 preceding siblings ...)
2022-12-12 18:22 ` lukaszcz18 at wp dot pl
@ 2022-12-12 20:20 ` redi at gcc dot gnu.org
2022-12-12 21:27 ` lukaszcz18 at wp dot pl
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2022-12-12 20:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108062
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
You still aren't showing the code that gives this error, so I'm just not going
to bother reading your big reports in future
PNM_COLOUR_SPACE cannot be formatted because there is no
std::formatter<PNM_COLOUR_SPACE> specialization.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/108062] Test spdlog c++20 std::format
2022-12-11 15:10 [Bug libstdc++/108062] New: Test spdlog c++20 std::format lukaszcz18 at wp dot pl
` (6 preceding siblings ...)
2022-12-12 20:20 ` redi at gcc dot gnu.org
@ 2022-12-12 21:27 ` lukaszcz18 at wp dot pl
7 siblings, 0 replies; 9+ messages in thread
From: lukaszcz18 at wp dot pl @ 2022-12-12 21:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108062
--- Comment #8 from Jamaika <lukaszcz18 at wp dot pl> ---
Thanks for tips std::formatter<PNM_COLOUR_SPACE>
Something has improved. GCC notices that there isn't <cmath> for TIFFFormat.cpp
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-12-12 21:27 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-11 15:10 [Bug libstdc++/108062] New: Test spdlog c++20 std::format lukaszcz18 at wp dot pl
2022-12-11 18:32 ` [Bug libstdc++/108062] " pinskia at gcc dot gnu.org
2022-12-12 11:05 ` redi at gcc dot gnu.org
2022-12-12 11:11 ` redi at gcc dot gnu.org
2022-12-12 11:15 ` redi at gcc dot gnu.org
2022-12-12 14:03 ` redi at gcc dot gnu.org
2022-12-12 18:22 ` lukaszcz18 at wp dot pl
2022-12-12 20:20 ` redi at gcc dot gnu.org
2022-12-12 21:27 ` lukaszcz18 at wp dot pl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).