Question: What was a global war that lasted from 1939 to 1945, when class of submarines built for the Royal Navy?

Context paragraphs:
World War II: World War II (often abbreviated to WWII or WW2), also known as the Second World War, was a global war that lasted from 1939 to 1945, although related conflicts began earlier.  It involved the vast majority of the world's countries—including all of the great powers—eventually forming two opposing military alliances: the Allies and the Axis.  It was the most widespread war in history, and directly involved more than 100 million people from over 30 countries.  In a state of total war, the major participants threw their entire economic, industrial, and scientific capabilities behind the war effort, erasing the distinction between civilian and military resources.

British V-class submarine: The British V-class submarine (officially ""U-Class Long hull 1941–42 programme"") was a class of submarines built for the Royal Navy during the Second World War.

River-class submarine: The River class, or "Thames" class were a class of submarines built for the Royal Navy.  Operating during the Second World War, the three boats of the class comprised "Thames" , "Severn" and "Clyde" .  All the submarines were named after rivers in the United Kingdom.  One was lost during the war and the rest taken out of service following it.

Holland-class submarine: The Holland class were the first submarines built for the Royal Navy.  They were built by Vickers, Barrow-in-Furness.  The first three were designed by John Philip Holland.  The Hollands were built under licence from the Holland Torpedo Boat Company/Electric Boat Company during the years 1901 to 1903.  The Admiralty of the Royal Navy hoped to keep the Holland class a secret and very few senior officers even knew of their existence.  This led to the myth of the Admiralty not taking any interest in submarines.  On the contrary, the Admiralty was well aware of the submarine's destructive potential.  It therefore refrained from any submarine development program so as to avoid provoking similar programs on the part of foreign navies.  Once those navies did begin serious submarine programs, the Admiralty had no choice but to begin its own.

Mackerel-class submarine: The "Mackerel"-class submarines were a pair of experimental prototype submarines built just prior to World War II and launched in 1940 and 1941.  The two submarines were similar in size and capability to the S-class submarines built at the end of World War I, and had been ordered to test the feasibility of using mass production techniques to build small submarines.  Until at least 1940 it was thought that mass production of fleet submarines would be impractical, and in any case small submarines could provide area defense for submarine bases.  Once it became apparent that there would be sufficient production of the more capable "Gato"-class submarine s, interest in the design waned and no additional small submarines were ordered.  Submarine production standardized during the war on the "Gato" class and its successors, the "Balao" and "Tench"-class submarines.  In some references, the "Mackerel"s are called the "M class".

Marcello-class submarine: The "Marcello"-class was a class of nine submarines built in 1937 and 1938 by CRDA in Trieste for the Royal Italian Navy (Italian: "Regia Marina" ).  Two similar submarines built in 1939 at La Spezia by Oto Melara are sometimes considered part of the class.  All eleven served in the Mediterranean Sea at the start of the Second World War.  After "Provana" ' s 1940 sinking, the remaining boats were transferred to the German submarine base (BETASOM) at Bordeaux in August 1940.  After four boats had been sunk in the Atlantic, "Barbarigo" and "Comandante Cappellini" (sometimes also called "Cappellini") were then selected for conversion to "transport submarines" in order to exchange rare or irreplaceable trade goods with Japan.  Cargo capacity of 160 tons reduced reserve buoyancy from 20–25% to 3.5–6%; and armament was reduced to defensive machine guns. Only "Dandolo" was in operational condition at the end of the war.

Osvetnik-class submarine: The "Osvetnik"-class consisted of two submarines built by Ateliers et Chantiers de la Loire, Nantes, France, for the navy of the Kingdom of Serbs, Croats and Slovenes (later Yugoslavia).  Launched in 1928–29, the vessels were named "Osvetnik" (Avenger) and "Smeli" (Daring) in Serbo-Croatian.  They were built to a partial double hull Simonot design similar to the French "Circé" class .  The "Osvetnik"-class was the second class of submarines to serve in the Royal Yugoslav Navy, and joined the two larger British-made "Hrabri"-class submarines to make up the pre-war Yugoslav submarine force.  They were armed with six 550 mm torpedo tubes, one 100 mm gun, and one 40 mm anti-aircraft gun, and could dive to 80 m .

TR-1700-class submarine: The TR-1700 ("Santa Cruz") is a class of diesel-electric patrol submarines built by Thyssen Nordseewerke for the Argentine Navy in the 1980s.  These ships are amongst the largest submarines built in Germany since World War II and are among the fastest diesel-electric submarines in the world.

British S-class submarine (1931): The S-class submarines of the Royal Navy were originally designed and built during the modernisation of the submarine force in the early 1930s to meet the need for smaller boats to patrol the restricted waters of the North Sea and the Mediterranean Sea, replacing the British H class submarines.  As part of the major naval construction for the Royal Navy during the Second World War, the "S" class became the largest single group of submarines ever built for the Royal Navy.  A total of 62 was constructed over a period of 15 years, with fifty of the "improved" "S"-class being launched between 1940 and 1945.

V-boat: The V-boats were a group of nine United States Navy submarines built between World War I and World War II from 1921 to 1934.  These were not a ship class in the usual sense of a series of nearly identical ships built from the same design, but shared authorization under the "fleet boat" program.  The term "V-boats" is used to includes five separate classes of submarines.  They broke down into three large, fast fleet submarines ("V-1" through "V-3"), three large long-range submarines ("V-4" through "V-6"), and three medium-sized submarines ("V-7" through "V-9").  The successful fleet submarines of World War II ("Tambor" class through "Tench" class ) were descended from the last three, especially "V-7", though somewhat larger with pure diesel-electric propulsion systems.

Supporting paragraphs: British V-class submarine World War II
Answer: World War II