Emerging communication network applications require a location accuracy of less than 1 m in more than 95% of the service area. For this purpose, 5G New Radio (NR) technology is designed to facilitate high-accuracy continuous localization. In 5G systems, the existence of high-density small cells and the possibility of the device-to-device (D2D) communication between mobile terminals paves the way for cooperative positioning applications. From the standardization perspective, D2D technology is already under consideration (5G NR Release 16) for ultra-dense networks enabling cooperative positioning and is expected to achieve the ubiquitous positioning of below one-meter accuracy, thereby fulfilling the 5G requirements. In this survey, the strengths and weaknesses of D2D as an enabling technology for cooperative cellular positioning are analyzed (including two D2D approaches to perform cooperative positioning); lessons learned and open issues are highlighted to serve as guidelines for future research.