http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466
--- Comment #1 from Matt Clarkson <mattyclarkson at gmail dot com> 2012-10-16 15:46:31 UTC --- This is still an error on 4.7.2. It is the const before the std::shared_ptr<const T> that is the problem: template<typename T> #if (__GNUC__ <= 4) && (__GNUC_MINOR__ <= 7) && (__GNUC_PATCHLEVEL__ <= 2) using CallbackPtr = std::shared_ptr<const T>; #else // This causes a segmentation fault on G++ 4.7.2 // Bug Report: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54466 using CallbackPtr = const std::shared_ptr<const T>; #endif