Have you looked at the boost library?