Same story for the four-engined A340. This aircraft never got the (partially Japanese) UHB engines it was designed to have, but nevertheless the A340-200 and -300 were still introduced in 1992. They were basically made redundant when Boeing's new 777 came out two years later, which had the advantage of having only two engines that were twice as powerful as anything else available at that time, which meant Boeing could keep the weight and therefor cost per seatmile down. The 777 was an instant success with airlines, while the poor old A340 struggled to get over 50 orders anually. Classic example of "second-to-market" advantage played out by the boys from Seattle

But it gets better. In 2000 Airbus persuaded Rolls-Royce to develop the Trent 500 engine, which was to put the A340 back in the race with lower fuel burn and increased range and performance, and the A340-500 and -600 were introduced. The A340-600 could do the same job as a 747-400 as it could carry the same amount of passengers over the same distance but using less fuel, and the A340-500 broke the world record of being the longest-range airliner in the world, and you may recall Singapore Airlines boasting they had the longest commercially operated route in the world of 18,5 hours from Singapore to Newark. That was 2003, and things were looking up for the company from Toulouse. Meanwhile Boeing was struggling to prop up its 777 to match the improved A340's specifications, but was struggling as GE initially failed to provide them with the improved GE90 engines they needed to make the 777 heavier. I recall a plan to build a 777 with thrusting APU (a tiny third engine in the tail normally only used on the ground to generate power and compressed air when the big engines are shut down).
Then GE came through with the GE90-115B, which had 115000lbs of thrust and provided Boeing with the power they needed to build the 777-300ER, their answer to the A340-600. The 777 now again had the upper hand with its lower fuel burn figures and a final blow to the A340 was dealt in the form of the 777-200LR, an ultra long range aircraft which can fly even further than the A340-500 and offers for example Qantas of Australia the means of connecting Sydney and London without the need to have a stopover in Singapore.
The jury is still out on which is the most desirable aircraft as Airbus is now on the verge of introducing the high gross weight or HGW versions of both A340 aircraft, the -500HGW of which will leap-frog the 777-200LR in terms of range, and the -600HGW will be able to carry more people further more cheaply than a 777-300ER.
So all's well that ends well, you might say. But it remains to be seen if any airline at all will order the -500HGW as the tiny ULH market is already saturated with new aircraft, and the -600 has the reputation of being a "hangar queen" with nearly all airlines that fly it, having a lot of teething problems and generally breaking down a lot.
The bottom line is this:
Airbus has a reputation of delivering cheap aircraft that fall short of expectations. Boeing has the reputation of being conservative with their promises to airlines when they are persuading them to order a new type of aircraft, but they end up delivering quality aircraft that exceed airline's expectations, even though they are more expensive than their Airbus equivalent. Tell me which one you'd choose if you were in charge of any airline's fleet.
Airbus will need to get their act together if they want to retain any credibility at all, work their asses off to get the A380 deliveries rolling for the people they are now disappointing and threatening to walk away, and more importantly: make the A350 a shining success. It may seem bad that they are now four years behind Boeing on the A350, but what they need to do is pull a 777 with it. They will have four full years where they can see for themselves how the 787 works for airlines the world over, and they would be completely stupid if they were deaf for the opinions of operators and passengers alike on this aircraft that incorporates so many new technologies to make passengers happy. Secondly, four additional years of engine development will go into the A350's powerplants which will make for even lower fuel burn, and they could use this advantage to ease ahead of Boeing's 787 in the second decade of this century, just like Boeing did with the 777 in the 1990s.