Moving KDots to KDE Review
iandw.au at gmail.com
Thu Apr 9 10:25:27 BST 2015
On 06/04/2015, at 11:30 PM, Minh Ngo wrote:
> Here is the patch. Checked with clang 3.5.0, qt 4.8.6, KDE Development Platform 4.14.6
Thanks very much for the patch, Minh. I tried it, but unfortunately
the same errors persisted.
> In file included from /kdedev/kde4m/kdesrc/kde/kdegames/kdots/point.cpp:26:
> /kdedev/kde4m/kdesrc/kde/kdegames/kdots/point.hpp:78:10: error: explicit
> specialization of non-template struct 'hash'
> struct hash<KDots::Point>
> ^ ~~~~~~~~~~~~~~
> /kdedev/kde4m/kdesrc/kde/kdegames/kdots/point.cpp:123:19: error: expected ';'
> after top level declarator
> std::size_t hash<KDots::Point>::operator()(const KDots::Point& s) const
> 2 errors generated.
I have not had time to investigate further in the last two days. Maybe tomorrow.
Possibly the Clang compiler is picking up the wrong stdlib from somewhere or
maybe Clang does not like the mix of namespace and template features in this
particular code. Can it be paraphrased and simplified in some way?
It is similar to the final coding example in http://en.cppreference.com/w/cpp/utility/hash,
so it ought to compile OK, but it is not exactly the same. I might try modifying point.hpp
to be textually and syntactically more like the example, without changing semantics.
Another possibility is for me to try MacPorts' (Open Source) Clang, rather than Apple's,
but I use Apple's Clang successfully for all other code. Or I might be able to revert to
Cheers, Ian W.
kde-games-devel mailing list
kde-games-devel at kde.org
More information about the kde-core-devel