Ticket #4919: selfassign.patch

File selfassign.patch, 770 bytes (added by gromer@…, 12 years ago)

Partial fix for the bug

  • boost/gil/gil_concept.hpp

    a b namespace detail {  
    456456    template <typename T>
    457457    struct ChannelIsMutableConcept {
    458458        void constraints() {
    459             c=c;
     459            c1=c2;
    460460            using std::swap;
    461             swap(c,c);
     461            swap(c1,c2);
    462462        }
    463         T c;
     463        T c1;
     464        T c2;
    464465    };
    465466}
    466467
    struct MutableHomogeneousPixelConcept {  
    951952    void constraints() {
    952953        gil_function_requires<HomogeneousPixelConcept<P> >();
    953954        gil_function_requires<MutableHomogeneousColorBaseConcept<P> >();
    954         p[0]=p[0];
     955        p[0]=v;
    955956    }
    956957    P p;
     958    typename P::template element_type<P>::type v;
    957959};
    958960
    959961/// \brief Pixel concept that is a Regular type