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:
40pro2col.de
This email sent to email@hidden