Re: Xcode 2.4.1 problem
Re: Xcode 2.4.1 problem
- Subject: Re: Xcode 2.4.1 problem
- From: "Marcin Zalewski" <email@hidden>
- Date: Tue, 12 Dec 2006 14:49:31 +0100
After some investigation I think I got to the bottom of the problem. Here is a code example that causes gcc in Xcode 2.4.1 to fail:
#include<vector>
#include<string>
template<typename Pred1, typename Pred2>
class or_pred
{
// stuff here
};
template<typename Pred1, typename Pred2>
or_pred<Pred1, Pred2>
operator || (const Pred1 p1, const Pred2 p2)
{
return or_pred<Pred1, Pred2>();
}
int main()
{
std::vector<std::string> v;
v.push_back("C");
}
This program fails with the following error:
/usr/include/c++/4.0.0/bits/cpp_type_traits.h:109: error: 'std::__is_integer<std::string>::<anonymous enum>' is/uses anonymous type
/usr/include/c++/4.0.0/bits/cpp_type_traits.h:109: error: 'std::__is_floating<std::string>::<anonymous enum>' is/uses anonymous type
/usr/include/c++/4.0.0/bits/cpp_type_traits.h:109: error: trying to instantiate 'template<class Pred1, class Pred2> class or_pred'
I think that according to section 14.8.3 of the C++ standard this should not happen. The compiler should not include the failing instantiation in the overload set and proceed with the built-in || operator. This is actually what gcc
4.0.0 in the older version of Xcode did, it is only gcc 4.0.1 that produces that error.
I am new to Xcode and I am not sure where does one send this kind of bug reports. Is it something that would go to the gcc developers or to the Xcode developers? Could anyone help me with that?
-m
On 12/11/06, Marcin Zalewski <email@hidden> wrote:
Hello,
I have been able to compile my application with the default version of Xcode shipped on my DVD (don't remember the version now). With Xcode 4.2.1 I get error messages such as this one:
/usr/include/c++/4.0.0/bits/cpp_type_traits.h:109: error: 'std::__is_integer<std::string>::<anonymous enum>' is/uses anonymous type
This is just an example, all other places where enum is used give me such error.
Does anyone know why this was ok with gcc 4.0.0 but is not ok with gcc 4.0.1?
I am a bit surprised anyway that nobody stumbled across this problem before...
-m
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden