Closed Quuxplusone closed 7 years ago
Bugzilla Link | PR33995 |
Status | RESOLVED INVALID |
Importance | P normal |
Reported by | Marcus Calhoun-Lopez (mcalhoun@macports.org) |
Reported on | 2017-07-30 11:06:36 -0700 |
Last modified on | 2017-08-12 15:22:20 -0700 |
Version | 4.0 |
Hardware | Macintosh MacOS X |
CC | dgregor@apple.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk |
Fixed by commit(s) | |
Attachments | |
Blocks | |
Blocked by | |
See also |
> template <class T, int SIZE>
> class TinyVector
> template <unsigned N, class T1, class T2>
> inline void
> gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, N> >
You have a type mismatch between the N in TinyVector<T1, N> here and the type
of the non-type template parameter SIZE of TinyVector. See
[temp.deduct.type]p18:
"If P has a form that contains <i>, and if the type of i differs from the type
of the corresponding template parameter of the template named by the enclosing
simple-template-id, deduction fails."
So Clang is correct to reject this... though it'd be better if we gave the
deduction failure message for deducing against the MultiArrayView base class
rather than the one for deducing against the derived class.
Thank you for looking into this.
The developer of Vigra is working on this problem based on the helpful
suggestions here.
See
https://mailhost.informatik.uni-hamburg.de/pipermail/vigra/2017-July/thread.html#1363
and
https://mailhost.informatik.uni-hamburg.de/pipermail/vigra/2017-August/thread.html#1367
Thanks for looking into this.
I will close this report since the code is correctly rejected.
For the sake of completeness, the developers of VIGRA seem to have fixed the
problem on their end (see
https://github.com/ukoethe/vigra/commit/b2ff44fbffcfa3f9e2862d890f43ad7cf588f565).