Smith, who was capped 61 times by Scotland and played on two Lions tours, was diagnosed with stage four colorectal cancer in 2019.
Hogg and Smith embraced on the Murrayfield pitch before the game against South Africa last November when the latter delivered the match ball on the weekend he was inducted into Scottish Rugby’s Hall of Fame.
Posting on Twitter on Wednesday evening, the Scotland captain wrote: “Deeply saddened to learn of the passing of Tom Smith. A true legend of the game, he will be missed by everyone. Thoughts are with Tom’s family and friends. RIP Tom.”
The loosehead mixed tremendous ability with great courage in an exceptional playing career during which he had to cope with epilepsy. He was part of the fabled Lions side which won a Test series in South Africa in 1997 and then helped Scotland triumph in the Five Nations Championship two years later.
Scotland coach Townsend, a team-mate of Smith’s during both those triumphs, said: “Tom was one of the toughest and most skilful players I had the pleasure to call a team-mate.
“He succeeded in the most challenging of environments and kept up a high level of play well into his thirties.
“Tom also did a tremendous amount for charitable causes and was a great family man. I am convinced that he will be regarded as one of our best ever players and his loss will be felt by all those who played with him or watched him for club and country over the years.”
The passing of Smith, who is survived by his wife Zoe, sons Angus and Teddy and daughter Amelie, provoked a flood of tributes.
Brian O’Driscoll, the Irish great who played alongside Smith for the Lions against Australia during the 2001 tour, said: “So sad to hear of the passing of my old team mate Tom Smith who battled his illness with courage and strength - just like he played rugby. A quiet but lovely man who was a hell of a player. Thinking of his family.”