
Hi, Currently I'm working on a spatial index and was considering using methods templates until I've tested it on GCC. Consider the following simple example: template <typename T1, typename T2> struct boom {}; struct aaa { template <typename T> void boom() {} }; template <typename T> struct bbb { void test() { T t; t.template boom<int>(); // <- here GCC resolves struct boom } }; This kind of code is already used in Boost. Try to compile this on GCC: template <typename T1, typename T2> struct apply {}; template <typename T1, typename T2> struct replace {}; template <typename T1, typename T2> struct remove_if {}; template <typename T1, typename T2> struct transfer {}; template <typename T1, typename T2> struct convert_to_container {}; template <typename T1, typename T2> struct push_match {}; #include <boost/optional.hpp> #include <boost/ptr_container/ptr_array.hpp> #include <boost/ptr_container/ptr_list.hpp> #include <boost/assign.hpp> #include <boost/xpressive/xpressive.hpp> This is not the case on VC++ or clang. Also, not the case if structs can't be found by the compiler (e.g. are in the different namespace). But what if some library defines some struct template and includes other library which defines method template with the same name? Is GCC standard-compliant in this case? Regards, Adam