Enabling devtoolset for old RHEL & CentOS resealses

Is there any correct way to enable devtoolset’s for old (5 & 6) releases of RHEL and CentOS?
(I need it for modern g++ and cmake)