“Elastique” time stretch algorithm by zplane (0) seems to be a common choice by plug-in companies. Their C++ library is pretty straightforward to use, and most importantly it sounds good.
Generally speaking, phase vocoder (1) algorithms are what you’d want for developing your own pitch shifting algorithm.
I second this, though I haven't tried the alternatives which I hear are also good. There is some value to specific kinds of pitch shifters, like the Boss Octave pedal, the Digitech Whammy pedal, and Eventide's harmonizers. Depends on what you are trying to do and what kind of control you want.