• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
gcc 4.0 compiling error ( from CW to XCode )
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gcc 4.0 compiling error ( from CW to XCode )


  • Subject: gcc 4.0 compiling error ( from CW to XCode )
  • From: Robert Welz <email@hidden>
  • Date: Wed, 11 Jun 2008 13:05:41 +0200

Hello.
Thanks to the help of Jens and Jesper I could solve the include issues. Now it seems that I have problems with changes in the C++ Standard:


/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:72: error: template-id 'assign<>' for 'void std::char_traits<std::caseless>::assign(std::caseless&, const std::caseless&)' does not match any template declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:72: error: invalid function declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:80: error: template-id 'eq<>' for 'bool std::char_traits<std::caseless>::eq(const std::caseless&, const std::caseless&)' does not match any template declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:80: error: invalid function declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:88: error: template-id 'lt<>' for 'bool std::char_traits<std::caseless>::lt(const std::caseless&, const std::caseless&)' does not match any template declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:88: error: invalid function declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:96: error: template-id 'compare<>' for 'int std::char_traits<std::caseless>::compare(const std::caseless*, const std::caseless*, size_t)' does not match any template declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:96: error: invalid function declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:111: error: template-id 'length<>' for 'size_t std::char_traits<std::caseless>::length(const std::caseless*)' does not match any template declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:111: error: invalid function declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:119: error: template-id 'find<>' for 'const std::caseless* std::char_traits<std::caseless>::find(const std::caseless*, size_t, const std::caseless&)' does not match any template declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:119: error: invalid function declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:138: error: template-id 'move<>' for 'std::caseless* std::char_traits<std::caseless>::move(std::caseless*, const std::caseless*, size_t)' does not match any template declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:138: error: invalid function declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:146: error: template-id 'copy<>' for 'std::caseless* std::char_traits<std::caseless>::copy(std::caseless*, const std::caseless*, size_t)' does not match any template declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:146: error: invalid function declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:154: error: template-id 'assign<>' for 'std::caseless* std::char_traits<std::caseless>::assign(std::caseless*, size_t, std::caseless)' does not match any template declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:154: error: invalid function declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:162: error: template-id 'not_eof<>' for 'int std::char_traits<std::caseless>::not_eof(const int&)' does not match any template declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:162: error: invalid function declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:170: error: template-id 'to_char_type<>' for 'std::caseless std::char_traits<std::caseless>::to_char_type(const int&)' does not match any template declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:170: error: invalid function declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:178: error: template-id 'to_int_type<>' for 'int std::char_traits<std::caseless>::to_int_type(const std::caseless&)' does not match any template declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:178: error: invalid function declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:186: error: template-id 'eq_int_type<>' for 'bool std::char_traits<std::caseless>::eq_int_type(const int&, const int&)' does not match any template declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:186: error: invalid function declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:194: error: template-id 'eof<>' for 'int std::char_traits<std::caseless>::eof()' does not match any template declaration
/Source/Grand Central Pro/GrandCentral/Develop/Mac/XRay Client 1.2.4 XCode/../../Common/HOSAL/Utils/Caseless.h:194: error: invalid function declaration


Can someone give me a hint what happens here? This code compiled well under CodeWarrior 9.0 but why not here?

The code is as follows:

//	Case insensitive strings & chars

#ifndef CASELESS_H
#define CASELESS_H

#include <string>
#include "SetupArch.h"

namespace std {

#if defined  CompilingForPosix || defined CompilingForWin32
	typedef char caseless;
#else

//#include "Utils/noalign.h"
#include "/Source/Grand Central Pro/GrandCentral/Develop/Common/HOSAL/ Utils/noalign.h"


struct caseless {
	char	c;

	caseless () : c(0) {}
	caseless (char ch) : c(ch) {}
	caseless (char* ch) : c(*ch) {}
	operator char()
		{ return c; }
	operator const char() const
		{ return c; }
	operator const char*() const
		{ return (const char*)&c; }
//	operator int()
//		{ return (int) c; }
};

//#include "Utils/realign.h"
#include "/Source/Grand Central Pro/GrandCentral/Develop/Common/HOSAL/ Utils/realign.h"


// char_traits<char>

template <>
struct char_traits<caseless>
{
	typedef caseless	char_type;
	typedef int         int_type;
	typedef streamoff   off_type;
	typedef streampos   pos_type;
	typedef mbstate_t   state_type;

	static void assign(char_type& c1, const char_type& c2);
	static bool eq(const char_type& c1, const char_type& c2);
	static bool lt(const char_type& c1, const char_type& c2);

static int compare(const char_type* s1, const char_type* s2, size_t n);
static size_t length(const char_type* s);
static const char_type* find(const char_type* s, size_t n, const char_type& a);
static char_type* move(char_type* s1, const char_type* s2, size_t n);
static char_type* copy(char_type* s1, const char_type* s2, size_t n);
static char_type* assign(char_type* s, size_t n, char_type a);


	static int_type not_eof(const int_type& c);
	static char_type to_char_type(const int_type& c);
	static int_type to_int_type(const char_type& c);
	static bool eq_int_type(const int_type& c1, const int_type& c2);
	static int_type eof();
};

// Implementation: char_traits<char>

template <>
inline
void
char_traits<caseless>::assign(char_type& c1, const char_type& c2)
{
	c1 = c2;
}



Thank you very much for some help.

BTW is there literature about changes in C++ which can be recommended?

Robert





_______________________________________________
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


  • Follow-Ups:
    • Re: gcc 4.0 compiling error ( from CW to XCode )
      • From: Robert Welz <email@hidden>
  • Prev by Date: Re: public release of Xcode 3.1?
  • Next by Date: Debugger enters __dyld_stub_binding_helper*
  • Previous by thread: Re: Compiler error
  • Next by thread: Re: gcc 4.0 compiling error ( from CW to XCode )
  • Index(es):
    • Date
    • Thread