473,322 Members | 1,241 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Depending on _XSTRING_ definition

Would it be safe to assume that if a program is including stl's
wstring/string

#ifdef _XSTRING_ will be valid?

or is this STL implementation dependent?

thanks

Nov 16 '06 #1
5 1271
te*******@gmail.com wrote:
Would it be safe to assume that if a program is including stl's
wstring/string

#ifdef _XSTRING_ will be valid?
No.
or is this STL implementation dependent?
The standard does not mention any _XSTRING_ macro.

Best

Kai-Uwe Bux
Nov 16 '06 #2
Thanks for replying,

Is there another way I could test for the existence of
std::string/wstring?

Does the standard mention anything about _STD?

Kai-Uwe Bux wrote:
te*******@gmail.com wrote:
Would it be safe to assume that if a program is including stl's
wstring/string

#ifdef _XSTRING_ will be valid?

No.
or is this STL implementation dependent?

The standard does not mention any _XSTRING_ macro.

Best

Kai-Uwe Bux
Nov 16 '06 #3

testga...@gmail.com skrev:
Kai-Uwe Bux wrote:
te*******@gmail.com wrote:
Would it be safe to assume that if a program is including stl's
wstring/string
>
#ifdef _XSTRING_ will be valid?
No.
or is this STL implementation dependent?
The standard does not mention any _XSTRING_ macro.
[snip]
First - dont toppost.
Is there another way I could test for the existence of
std::string/wstring?
What do you mean?
#include <stringwill provide you with std::string and std::wstring.
If not, you're not having a compliant compiler (stronger wording would
be appropriate!!).

/Peter
>
Does the standard mention anything about _STD?
Nov 16 '06 #4

peter koch wrote:
testga...@gmail.com skrev:
Kai-Uwe Bux wrote:
te*******@gmail.com wrote:
>
Would it be safe to assume that if a program is including stl's
wstring/string

#ifdef _XSTRING_ will be valid?
>
No.
>
or is this STL implementation dependent?
>
The standard does not mention any _XSTRING_ macro.
[snip]
First - dont toppost.
Sorry, first timer

Is there another way I could test for the existence of
std::string/wstring?
What do you mean?
#include <stringwill provide you with std::string and std::wstring.
If not, you're not having a compliant compiler (stronger wording would
be appropriate!!).

/Peter

Does the standard mention anything about _STD?
I want to be able to do the following:

Under Defines.h -

#ifdef _XSTRING_

typedef std::string UNIQUEKEY

#endif

Applications that don't use stl, can still user the Defines.h files
(for other typedefs/defines), those who do use stl will be able to work
with UNIQUEKEY

Hope I was clear this time,
Thanks

Nov 16 '06 #5
testga...@gmail.com wrote:
I want to be able to do the following:

Under Defines.h -

#ifdef _XSTRING_

typedef std::string UNIQUEKEY

#endif

Applications that don't use stl, can still user the Defines.h files
(for other typedefs/defines), those who do use stl will be able to work
with UNIQUEKEY
All standard C++ libraries (and even the Embedded C++ library) have
std::string. If you include <stringbut the user doesn't use
UNIQUEKEY, then std::string will not be used or linked in.

Cheers! --M

Nov 16 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Sims | last post by:
Hi, This will validate, (http://validator.w3.org/) <form method="POST" action="" name='xForm' style='background:inherit;'> <table style='background:inherit; width:100%;'> <tr width=80%> <td>...
9
by: Dave H | last post by:
Hello, I have a query regarding definition lists. Is it good practice semantically to use the dt and dd elements to mark up questions and answers in a frequently asked questions list, or FAQ? ...
7
by: Wolfgang Kreuzer | last post by:
Hello all, I have two tables - Projects and ProjectStruct Table Projects contains master records of the projects, ProjectStruct allows to define a project herarchie and contains the fields...
6
by: allyn44 | last post by:
HI--what I am trying to do is 2 things: 1. Open a form in either data entry mode or edit mode depending on what task the user is performing 2. Cancel events tied to fields on the form if I am in...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.