Assigning a vector of one type to a vector of another type
I have an "Event" class. Due to the way dates are handled, we need to wrap this class in a "UIEvent" class, which holds the Event, and the date of the Event in another format. What is the best way of allowing conversion from Event to UIEvent and back? I thought overloading the assignment or copy constructor of UIEvent to accept Events (and vice versa)might be best. There are two simple options that I can think of. The first option would be the one you describe: create a constructor that takes an object of the other type: struct UIEvent { UIEvent(const Event&); }; and use std::copy to copy