Section 45. Section forty-four shall not apply to Boston, but shall apply to any other city upon its acceptance prior to January first, nineteen hundred and forty-six by the mayor and city council, and to any town upon its acceptance prior to said date by the town at a meeting.