[Bug c++/64596] Friendship not recognized and template param deduction error
daniel.kruegler at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Sun Feb 15 16:53:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64596
Daniel Krügler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler@googlemail.
| |com
--- Comment #2 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
1) Your friend declaration in line 15 is invalid, because you cannot declare an
alias template as friend. I suggest to change that to
template<typename, bool>
friend class Txn;
instead.
2) The compiler is right: The language says that the partial specialization in
line 80 can never be deduced. Your code is equivalent to attempting to
specialize:
template<typename E, bool R>
struct Glue<typename StrB<E>::template Txn<R>, int>
where this becomes more obvious.
More information about the Gcc-bugs
mailing list