http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50864
Bug #: 50864 Summary: SFINAE bug Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: fate66...@gmail.com [C++0x] compiler option: -Wall -std=c++0x -O3 error message: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. source code: namespace concept_impl { template < class lhs, class rhs > struct is_arrow_operable_impl { private: template < class T = lhs, class U = rhs , class = decltype(std::declval<T>() -> std::declval<U>()) // <- here > static mpl::true_ test (int); template < class... > static mpl::false_ test (...); public: typedef decltype(test (0)) type; }; } // namespace concept_impl template < class lhs, class rhs > struct is_arrow_operable : public concept_impl::is_arrow_operable_impl<lhs, rhs>::type { }; // test type struct foo { int* p; }; // call this meta function static_assert(is_arrow_dereferencable<foo*, int* foo::*>::value ,"error");