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

Does not compile: no declaration matches ArrayToTuple #14

Open
ulidtko opened this issue Dec 27, 2019 · 0 comments
Open

Does not compile: no declaration matches ArrayToTuple #14

ulidtko opened this issue Dec 27, 2019 · 0 comments
Labels
build issue Issues related to the build system or compilation

Comments

@ulidtko
Copy link

ulidtko commented Dec 27, 2019

Hi!

I've tried building this, and got a compile error (GCC 8.2.1):

[  3%] Building CXX object source/reshaper/source/private/CMakeFiles/reshaper-impl.dir/ImageView.cpp.o
In file included from Depixelization/source/reshaper/source/private/ImageView.cpp:1:
Depixelization/source/reshaper/include/private/ImageView.h:220:6: error: no declaration matches ‘auto dpa::image::internal::ImageView<Channels, BitDepth>::ArrayToTuple(const std::array<BitDepth, channel_count_v<Channels> >&) const’
 auto ImageView<Channels, BitDepth>::ArrayToTuple(const std::array<BitDepth, channel_count_v<Channels>>& array) const noexcept
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/ImageView.h:46:10: note: candidate is: ‘template<template<class> class Channels, class BitDepth> template<class Indices> auto dpa::image::internal::ImageView<Channels, BitDepth>::ArrayToTuple(const std::array<BitDepth, channel_count_v<Channels> >&) const’
     auto ArrayToTuple(const std::array<BitDepth, channel_count_v<Channels>> & array) const noexcept;
          ^~~~~~~~~~~~
source/reshaper/include/private/ImageView.h:21:7: note: ‘class dpa::image::internal::ImageView<Channels, BitDepth>’ defined here
 class ImageView final
       ^~~~~~~~~

This error is pretty challenging to digest, even to people calling themselves C++ programmers.

If that matters: I use cmake 3.15.5. Oh, indeed, here's also an output from [relatively old] Clang 7.0.1:

In file included from Depixelization/source/reshaper/source/private/ImageView.cpp:1:
In file included from Depixelization/source/reshaper/include/private/ImageView.h:3:
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:70:22: error: template template argument has different template parameters than its
      corresponding template template parameter
struct channel_count<Y>
                     ^
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:44:1: note: too many template parameters in template template argument
template<typename BitDepth, typename = EnableIfSTBBitDepth<BitDepth>>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:59:10: note: previous template template parameter is here
template<template<typename> class Channels>
         ^~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:76:22: error: template template argument has different template parameters than its
      corresponding template template parameter
struct channel_count<YA>
                     ^
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:47:1: note: too many template parameters in template template argument
template<typename BitDepth, typename = EnableIfSTBBitDepth<BitDepth>>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:59:10: note: previous template template parameter is here
template<template<typename> class Channels>
         ^~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:82:22: error: template template argument has different template parameters than its
      corresponding template template parameter
struct channel_count<RGB>
                     ^
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:50:1: note: too many template parameters in template template argument
template<typename BitDepth, typename = EnableIfSTBBitDepth<BitDepth>>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:59:10: note: previous template template parameter is here
template<template<typename> class Channels>
         ^~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:88:22: error: template template argument has different template parameters than its
      corresponding template template parameter
struct channel_count<YCbCr>
                     ^
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:53:1: note: too many template parameters in template template argument
template<typename BitDepth, typename = EnableIfSTBBitDepth<BitDepth>>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:59:10: note: previous template template parameter is here
template<template<typename> class Channels>
         ^~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:94:22: error: template template argument has different template parameters than its
      corresponding template template parameter
struct channel_count<RGBA>
                     ^
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:56:1: note: too many template parameters in template template argument
template<typename BitDepth, typename = EnableIfSTBBitDepth<BitDepth>>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Depixelization/source/reshaper/include/private/../reshaper/Pixel.h:59:10: note: previous template template parameter is here
template<template<typename> class Channels>
         ^~~~~~~~~~~~~~~~~~
5 errors generated.

Can you fix this?

@Hoshiningen Hoshiningen added the build issue Issues related to the build system or compilation label Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build issue Issues related to the build system or compilation
Projects
None yet
Development

No branches or pull requests

2 participants