http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57771
Bug ID: 57771 Summary: g++ misinterprets >> in static_cast Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mustrumr97 at gmail dot com template<int a> struct s{}; s<static_cast<int>(4>>2)> x; This works in C++98 mode but fails in C++11 mode. Maybe g++ misunderstands >> as closing angle brackets, but this does not make sense because they are in (). clang++ compiles this code. This looks like bug 37875 but for casts.