Is vehicular cycling legal in France? I learned to ride in Toronto, where behaviour such as the following is legal:


  if there is not enough space to share the lane safely with another vehicle, it is legal to ride near the centre of the lane, so that drivers must wait or change lanes to overtake


Is this also true in France?

I asked a french man (the father of a competitive cyclist) who replied something which implied, "no": that cyclists should keep right at all times, and that although groups ride two-abreast, they return to single-file if a car approaches from behind.

I would like to double-check: is it legal, and is it at all customary or is it likely to annoy or cause aggressive driving?

Examples of when I might want to use it include:


In a town where the road is narrow or lined with parked cars
In the country-side, going up a hill with many bends, where it wouldn't IMO be safe for an overtaking car to leave their own lane (which would tempt them to overtake me without leaving much margin)


Cars routinely slow down behind tractors when they go up that hill; but when I was driving (a car) I was surprised to see a cyclist hugging the verge as if there was enough room for me to overtake him safely (I didn't think there was and so I didn't).

Also, is there any legally-required overtaking margin (for example, "cars must leave a gap of one metre (3 feet) when overtaking a cyclist")?

FWIW I understand there is strict liability law in France, which may help, nevertheless I'd like to do whatever it is I should.
The Code de la Route also states the following:


  En marche normale, tout conducteur doit maintenir son véhicule près du
  bord droit de la chaussée, autant que le lui permet l'état ou le
  profil de celle-ci.


Which means:


  In a regular situation, any driver must keep his vehicle close to the right side of the road as much as the state of the road allows it.


This part does not specify the nature of the vehicle so bicycles are impacted.

The "as much as the state of the road allows it" is a freedom breech that allows you to add good sense to this law:


ride on the right, but not too close as to be within reach of an opening door of a parked car! 
ride on the right, but if the road is narrow enough that you consider overtaking by a car unsafe, prevent it from happening a ride closer to the centre!
ride on the right but if the side of the road is covered by debris, move closer to the centre!


True it might piss the drivers off but ensure your own safety first.

The police is not that picky with cyclists and when they're riding on the right half of the right lane, everyone is happy I would think.