Re: gcc 4.0 compiling error ( from CW to XCode )
Re: gcc 4.0 compiling error ( from CW to XCode )
- Subject: Re: gcc 4.0 compiling error ( from CW to XCode )
- From: Robert Welz <email@hidden>
- Date: Wed, 11 Jun 2008 13:54:24 +0200
just beeing curious,
can it be that template <> is not supported by gcc 4.0?
Am 11.06.2008 um 13:05 schrieb Robert Welz:
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
---
Robert Welz
Pro2col Limited
Weinheimer Strasse 64
D-68309 Mannheim
t 0621 724 5837
f 0621 724 5782
w http://www.pro2col.de
e email@hidden
skype ro.welz
Pro2col Technischer Support
email@hidden
Tel.: +49 621 724 5837
Apple Solution Expert - Print & Publishing
File transfer & workflow specialists for the graphic art & prepress
industry
Distributors for DevZeroG, Hermstedt & OneVision within the UK and
Ireland
Pro2col's legal position regarding Internet communications can be
found at http://pro2col.com/about/legal.asp
_______________________________________________
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