Ticket #4686: bimap_assignment_ops.patch

File bimap_assignment_ops.patch, 2.6 KB (added by Stefan van Kessel <van_kessel@…>, 12 years ago)

patch declaring operator= for classes for which it can't be generated

  • container_adaptor/detail/functor_bag.hpp

     
    8484    {
    8585        return *(static_cast<Functor const *>(this));
    8686    }
     87private:
     88        // suppress C4512 (assignment operator could not be generated) on msvc with /W4
     89    data_with_functor_bag<Data, FunctorList>& operator=(const data_with_functor_bag<Data, FunctorList>&);
    8790};
    8891
    8992} // namespace detail
  • relation/structured_pair.hpp

     
    8080    const BOOST_DEDUCED_TYPENAME base_:: left_value_type &  get_left()const { return first;  }
    8181          BOOST_DEDUCED_TYPENAME base_::right_value_type & get_right()      { return second; }
    8282    const BOOST_DEDUCED_TYPENAME base_::right_value_type & get_right()const { return second; }
     83private:
     84    // suppress C4512 (assignment operator could not be generated) on msvc with /W4
     85    normal_storage<FirstType, SecondType>&
     86        operator=(const normal_storage<FirstType, SecondType>&);
    8387};
    8488
    8589/// \brief Storage definition of the right view of a mutant relation.
     
    115119    const BOOST_DEDUCED_TYPENAME base_:: left_value_type &  get_left()const { return second; }
    116120          BOOST_DEDUCED_TYPENAME base_::right_value_type & get_right()      { return first;  }
    117121    const BOOST_DEDUCED_TYPENAME base_::right_value_type & get_right()const { return first;  }
     122private:
     123        // suppress C4512 (assignment operator could not be generated) on msvc with /W4
     124        mirror_storage<FirstType, SecondType>&
     125                operator=(const mirror_storage<FirstType, SecondType>&);
    118126};
    119127
    120128/** \struct boost::bimaps::relation::storage_finder
  • relation/mutant_relation.hpp

     
    8888    const BOOST_DEDUCED_TYPENAME base_:: left_value_type &  get_left()const { return left;  }
    8989          BOOST_DEDUCED_TYPENAME base_::right_value_type & get_right()      { return right; }
    9090    const BOOST_DEDUCED_TYPENAME base_::right_value_type & get_right()const { return right; }
     91private:
     92    // suppress C4512 (assignment operator could not be generated) on msvc with /W4
     93    relation_storage<LeftType, RightType, force_mutable>
     94        operator=(const relation_storage<LeftType, RightType, force_mutable>&);
    9195};
    9296
    9397