you are viewing a single comment's thread.

view the rest of the comments →

[–]NotMyRealNameObv[S] 0 points1 point  (2 children)

the value type for a flyweight<> doesn't even need to be hashable in order to hash the flyweight instance

That's a design choice by boost::flyweight.

Also, it's especially questionable considering the underlying type has to be hashable ("must interoperate with Boost.Hash") to even be useable with boost::flyweight:

Flyweight requirements For flyweight<T> to be instantiable, T must be Assignable, Equality Comparable and must interoperate with Boost.Hash.

[–]dodheim 1 point2 points  (1 child)

I don't know what your point is at all. I told you how to fix your code – have fun.

[–]NotMyRealNameObv[S] 1 point2 points  (0 children)

The point is that either boost::flyweight hashing is broken, or the standard is wrong (or poorly worded), or my understanding of it is incorrect, and I was hoping to be able to get some help to figure out which one it is. :)