It's widely held that most people ARE doing it wrong.
I don't have it in my resume, I just spread the skills between an "Advanced" and "Proficient" subsection, but I've been asked at least once why I don't specify the number of years with each technology.
Most places (and probably all places that aren't incompetently managed/places you would want to work at) do not filter resumes on the basis of "Our posting said 5+ years of C++ and nowhere on this resume does it say C++ - X Years! Rejected!". If you break your resume down along the lines of "At FooBar Corp I was directly responsible for frobnitzing the blahblahblah with C++", "At Quux Labs my primary achievement was using C++ to cromlify the flux capacitor" etc, most places won't even bother to total up the years involving a given technology.
X Years with Y are a vague wishlist item that job posting writers unthinkingly cargocult around as a rough signal of whether they want a junior engineer or someone more senior. Don't give them too much thought, never let them convince you to disqualify yourself from a job without applying, and definitely don't cargocult along with them.
As a general aside, every time I see a resume with something along the lines of: "Java (2.5 years), C++ (5 years)", I cringe a little. Please don't do this. There is something about denoting the exact amount of time you have spent with a specific technology (which we can generally deduce from your work experience anyway) that, at least to me, broadcasts a lack of confidence in your own skills.