Multiple build errors using C++17 on MSYS2 against exiv2 0.28
This is after patching w/ 06adc8fb and leaving the default -std=c++17
option.
In the MSYS2 CLANG64 environment, using Clang 16.0.4:
In file included from ../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp:21:
../gexiv2-0.14.1/gexiv2/gexiv2-stream-io.h:49:39: error: non-virtual member function marked 'override' hides virtual member function
int seek (long offset, Position pos) override;
^
D:/M/msys64/clang64/include/exiv2/basicio.hpp:165:15: note: hidden overloaded virtual function 'Exiv2::BasicIo::seek' declared here: type mismatch at 1st parameter ('int64_t' (aka 'long long') vs 'long')
virtual int seek(int64_t offset, Position pos) = 0;
^
../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp:152:71: error: non-virtual member function marked 'override' hides virtual member function
int seek(seek_offset_t offset, Exiv2::BasicIo::Position position) override {
^
D:/M/msys64/clang64/include/exiv2/basicio.hpp:165:15: note: hidden overloaded virtual function 'Exiv2::BasicIo::seek' declared here: type mismatch at 1st parameter ('int64_t' (aka 'long long') vs 'seek_offset_t' (aka 'long'))
virtual int seek(int64_t offset, Position pos) = 0;
^
../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp:533:43: error: allocating an object of abstract class type 'StreamIo'
StreamIo::ptr_type stream_ptr{new StreamIo (cb)};
^
D:/M/msys64/clang64/include/exiv2/basicio.hpp:165:15: note: unimplemented pure virtual method 'seek' in 'StreamIo'
virtual int seek(int64_t offset, Position pos) = 0;
^
../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp:552:37: error: allocating an object of abstract class type 'GioIo'
GioIo::ptr_type gio_ptr{new GioIo (stream)};
^
D:/M/msys64/clang64/include/exiv2/basicio.hpp:165:15: note: unimplemented pure virtual method 'seek' in 'GioIo'
virtual int seek(int64_t offset, Position pos) = 0;
^
../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp:744:43: error: allocating an object of abstract class type 'StreamIo'
StreamIo::ptr_type stream_ptr{new StreamIo (cb)};
^
5 errors generated.
In the MSYS2 UCRT64 env, using GCC 13.1.0:
In file included from ../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp:21:
../gexiv2-0.14.1/gexiv2/gexiv2-stream-io.h:49:13: error: 'int StreamIo::seek(long int, Exiv2::BasicIo::Position)' marked 'override', but does not override
49 | int seek (long offset, Position pos) override;
| ^~~~
../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp:152:9: error: 'int {anonymous}::GioIo::seek(seek_offset_t, Exiv2::BasicIo::Position)' marked 'override', but does not override
152 | int seek(seek_offset_t offset, Exiv2::BasicIo::Position position) override {
| ^~~~
../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp: In function 'gboolean gexiv2_metadata_open_stream(GExiv2Metadata*, ManagedStreamCallbacks*, GError**)':
../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp:533:55: error: invalid new-expression of abstract class type 'StreamIo'
533 | StreamIo::ptr_type stream_ptr{new StreamIo (cb)};
| ^
../gexiv2-0.14.1/gexiv2/gexiv2-stream-io.h:23:7: note: because the following virtual functions are pure within 'StreamIo':
23 | class StreamIo : public Exiv2::BasicIo {
| ^~~~~~~~
In file included from D:/M/msys64/ucrt64/include/exiv2/exiv2.hpp:8,
from ../gexiv2-0.14.1/gexiv2/gexiv2-metadata-private.h:14,
from ../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp:16:
D:/M/msys64/ucrt64/include/exiv2/basicio.hpp:165:15: note: 'virtual int Exiv2::BasicIo::seek(int64_t, Position)'
165 | virtual int seek(int64_t offset, Position pos) = 0;
| ^~~~
../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp:533:56: error: no matching function for call to 'std::unique_ptr<Exiv2::BasicIo>::unique_ptr(<brace-enclosed initializer list>)'
533 | StreamIo::ptr_type stream_ptr{new StreamIo (cb)};
| ^
In file included from D:/M/msys64/ucrt64/include/c++/13.1.0/memory:78,
from D:/M/msys64/ucrt64/include/exiv2/basicio.hpp:14:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:390:9: note: candidate: 'template<class _Up, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(std::auto_ptr<_Up>&&) [with <template-parameter-2-2> = _Up; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
390 | unique_ptr(auto_ptr<_Up>&& __u) noexcept;
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:390:9: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:380:9: note: candidate: 'template<class _Up, class _Ep, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Ep = _Up; <template-parameter-2-3> = _Ep; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
380 | unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:380:9: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:359:19: note: candidate: 'template<class _Del, class> constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr(std::nullptr_t) [with <template-parameter-2-2> = _Del; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
359 | constexpr unique_ptr(nullptr_t) noexcept
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:359:19: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:353:9: note: candidate: 'template<class _Del, class _DelUnref> std::unique_ptr<_Tp, _Dp>::unique_ptr(pointer, std::__enable_if_t<std::is_lvalue_reference<_Del>::value, _DelUnref&&>) [with _DelUnref = _Del; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]' (deleted)
353 | unique_ptr(pointer,
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:353:9: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:344:9: note: candidate: 'template<class _Del, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(pointer, std::__enable_if_t<(! std::is_lvalue_reference<_Del>::value), _Del&&>) [with <template-parameter-2-2> = _Del; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
344 | unique_ptr(pointer __p,
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:344:9: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:331:9: note: candidate: 'template<class _Del, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(pointer, const deleter_type&) [with <template-parameter-2-2> = _Del; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
331 | unique_ptr(pointer __p, const deleter_type& __d) noexcept
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:331:9: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:317:9: note: candidate: 'template<class _Del, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(pointer) [with <template-parameter-2-2> = _Del; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
317 | unique_ptr(pointer __p) noexcept
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:317:9: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:304:19: note: candidate: 'template<class _Del, class> constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr() [with <template-parameter-2-2> = _Del; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
304 | constexpr unique_ptr() noexcept
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:304:19: note: template argument deduction/substitution failed:
../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp:533:56: note: candidate expects 0 arguments, 1 provided
533 | StreamIo::ptr_type stream_ptr{new StreamIo (cb)};
| ^
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:366:7: note: candidate: 'std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
366 | unique_ptr(unique_ptr&&) = default;
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:366:7: note: conversion of argument 1 would be ill-formed:
../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp: In function 'gboolean gexiv2_metadata_from_stream(GExiv2Metadata*, GInputStream*, GError**)':
../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp:552:50: error: invalid new-expression of abstract class type '{anonymous}::GioIo'
552 | GioIo::ptr_type gio_ptr{new GioIo (stream)};
| ^
../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp:42:7: note: because the following virtual functions are pure within '{anonymous}::GioIo':
42 | class GioIo : public Exiv2::BasicIo {
| ^~~~~
D:/M/msys64/ucrt64/include/exiv2/basicio.hpp:165:15: note: 'virtual int Exiv2::BasicIo::seek(int64_t, Position)'
165 | virtual int seek(int64_t offset, Position pos) = 0;
| ^~~~
../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp:552:51: error: no matching function for call to 'std::unique_ptr<Exiv2::BasicIo>::unique_ptr(<brace-enclosed initializer list>)'
552 | GioIo::ptr_type gio_ptr{new GioIo (stream)};
| ^
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:390:9: note: candidate: 'template<class _Up, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(std::auto_ptr<_Up>&&) [with <template-parameter-2-2> = _Up; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
390 | unique_ptr(auto_ptr<_Up>&& __u) noexcept;
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:390:9: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:380:9: note: candidate: 'template<class _Up, class _Ep, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Ep = _Up; <template-parameter-2-3> = _Ep; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
380 | unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:380:9: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:359:19: note: candidate: 'template<class _Del, class> constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr(std::nullptr_t) [with <template-parameter-2-2> = _Del; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
359 | constexpr unique_ptr(nullptr_t) noexcept
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:359:19: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:353:9: note: candidate: 'template<class _Del, class _DelUnref> std::unique_ptr<_Tp, _Dp>::unique_ptr(pointer, std::__enable_if_t<std::is_lvalue_reference<_Del>::value, _DelUnref&&>) [with _DelUnref = _Del; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]' (deleted)
353 | unique_ptr(pointer,
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:353:9: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:344:9: note: candidate: 'template<class _Del, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(pointer, std::__enable_if_t<(! std::is_lvalue_reference<_Del>::value), _Del&&>) [with <template-parameter-2-2> = _Del; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
344 | unique_ptr(pointer __p,
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:344:9: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:331:9: note: candidate: 'template<class _Del, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(pointer, const deleter_type&) [with <template-parameter-2-2> = _Del; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
331 | unique_ptr(pointer __p, const deleter_type& __d) noexcept
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:331:9: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:317:9: note: candidate: 'template<class _Del, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(pointer) [with <template-parameter-2-2> = _Del; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
317 | unique_ptr(pointer __p) noexcept
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:317:9: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:304:19: note: candidate: 'template<class _Del, class> constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr() [with <template-parameter-2-2> = _Del; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
304 | constexpr unique_ptr() noexcept
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:304:19: note: template argument deduction/substitution failed:
../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp:552:51: note: candidate expects 0 arguments, 1 provided
552 | GioIo::ptr_type gio_ptr{new GioIo (stream)};
| ^
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:366:7: note: candidate: 'std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
366 | unique_ptr(unique_ptr&&) = default;
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:366:7: note: conversion of argument 1 would be ill-formed:
../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp: In function 'gboolean gexiv2_metadata_save_stream(GExiv2Metadata*, ManagedStreamCallbacks*, GError**)':
../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp:744:55: error: invalid new-expression of abstract class type 'StreamIo'
744 | StreamIo::ptr_type stream_ptr{new StreamIo (cb)};
| ^
../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp:744:56: error: no matching function for call to 'std::unique_ptr<Exiv2::BasicIo>::unique_ptr(<brace-enclosed initializer list>)'
744 | StreamIo::ptr_type stream_ptr{new StreamIo (cb)};
| ^
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:390:9: note: candidate: 'template<class _Up, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(std::auto_ptr<_Up>&&) [with <template-parameter-2-2> = _Up; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
390 | unique_ptr(auto_ptr<_Up>&& __u) noexcept;
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:390:9: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:380:9: note: candidate: 'template<class _Up, class _Ep, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Ep = _Up; <template-parameter-2-3> = _Ep; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
380 | unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:380:9: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:359:19: note: candidate: 'template<class _Del, class> constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr(std::nullptr_t) [with <template-parameter-2-2> = _Del; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
359 | constexpr unique_ptr(nullptr_t) noexcept
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:359:19: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:353:9: note: candidate: 'template<class _Del, class _DelUnref> std::unique_ptr<_Tp, _Dp>::unique_ptr(pointer, std::__enable_if_t<std::is_lvalue_reference<_Del>::value, _DelUnref&&>) [with _DelUnref = _Del; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]' (deleted)
353 | unique_ptr(pointer,
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:353:9: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:344:9: note: candidate: 'template<class _Del, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(pointer, std::__enable_if_t<(! std::is_lvalue_reference<_Del>::value), _Del&&>) [with <template-parameter-2-2> = _Del; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
344 | unique_ptr(pointer __p,
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:344:9: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:331:9: note: candidate: 'template<class _Del, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(pointer, const deleter_type&) [with <template-parameter-2-2> = _Del; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
331 | unique_ptr(pointer __p, const deleter_type& __d) noexcept
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:331:9: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:317:9: note: candidate: 'template<class _Del, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(pointer) [with <template-parameter-2-2> = _Del; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
317 | unique_ptr(pointer __p) noexcept
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:317:9: note: template argument deduction/substitution failed:
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:304:19: note: candidate: 'template<class _Del, class> constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr() [with <template-parameter-2-2> = _Del; _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
304 | constexpr unique_ptr() noexcept
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:304:19: note: template argument deduction/substitution failed:
../gexiv2-0.14.1/gexiv2/gexiv2-metadata.cpp:744:56: note: candidate expects 0 arguments, 1 provided
744 | StreamIo::ptr_type stream_ptr{new StreamIo (cb)};
| ^
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:366:7: note: candidate: 'std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = Exiv2::BasicIo; _Dp = std::default_delete<Exiv2::BasicIo>]'
366 | unique_ptr(unique_ptr&&) = default;
| ^~~~~~~~~~
D:/M/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:366:7: note: conversion of argument 1 would be ill-formed: