Boost logo

Boost :

Subject: [boost] [containers] flat_multimap compile errorin trunk
From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2010-04-22 08:22:38


Hi Ion,

The following code is making the compiler (vc9) choke:

    template<class D, class S>
    static D force_copy(S s)
    {
       value_type *vp = reinterpret_cast<value_type *>(&*s);
       return D(vp);
    }

I don't get the code either? What is it good for, and why is a
static_cast not good enough?

If it helps, I'm using flat_multimap<BitSet,BitSet>, and not a build-in
type.

-Thorsten


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk