Click here to Skip to main content
15,899,754 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: ATL DLL Newbie Question Pin
Charles Spirz16-May-03 11:14
Charles Spirz16-May-03 11:14 
GeneralRe: ATL DLL Newbie Question Pin
James Spibey16-May-03 12:20
James Spibey16-May-03 12:20 
QuestionUsing yourDLL in myDLL, /FORCE:MULTIPLE ? Pin
SoloVision16-May-03 4:04
SoloVision16-May-03 4:04 
GeneralCMap and CComPtr Pin
Paul Selormey15-May-03 0:28
Paul Selormey15-May-03 0:28 
GeneralUsing bitset as key in a map Pin
Rox27114-May-03 5:17
Rox27114-May-03 5:17 
GeneralRe: Using bitset as key in a map Pin
Joaquín M López Muñoz14-May-03 9:12
Joaquín M López Muñoz14-May-03 9:12 
GeneralRe: Using bitset as key in a map Pin
Rox27114-May-03 21:34
Rox27114-May-03 21:34 
GeneralRe: Using bitset as key in a map Pin
Rox27114-May-03 22:54
Rox27114-May-03 22:54 
Ok. In the Visual C++ version of STL, there is a undocumented public direct access on the "unsigned longs" that compose the actual bitfield of bitset.
That is the _W(_I) function which we can use to compare two bitset. Here is the struct that compares two bitset. Not fully tested yet but that gives an idea.

template<size_t _n=""> struct LessThanBitset
{
bool operator()(const std::bitset<_N>& bs1, const std::bitset<_N>& bs2) const
{
typedef unsigned long _Ty;
enum
{
_Nb = CHAR_BIT * sizeof (_Ty),
_Nw = _N == 0 ? 0 : (_N - 1) / _Nb
};
// Since we are storing the most significant bit
// at pos == size() - 1, we need to do the memcmp in reverse.

// Compare a block at a time
for (int _I = _Nw; 0<_I ; --_I)
if (bs1._W(_I) < bs2._W(_I)) return true;
else if (bs1._W(_I) > bs2._W(_I)) return false;

return (bs1._W(0) < bs2._W(0));
}
};
GeneralRe: Using bitset as key in a map Pin
Stuart Dootson14-May-03 23:27
professionalStuart Dootson14-May-03 23:27 
Generalhelp please!!!!!!!!! Pin
xxhimanshu14-May-03 2:03
xxhimanshu14-May-03 2:03 
GeneralTLB and DLL Pin
Hans Ruck13-May-03 21:40
Hans Ruck13-May-03 21:40 
GeneralRe: TLB and DLL Pin
Stephane Rodriguez.13-May-03 21:50
Stephane Rodriguez.13-May-03 21:50 
GeneralRe: TLB and DLL Pin
Hans Ruck13-May-03 22:32
Hans Ruck13-May-03 22:32 
QuestionSTL - multimap - equal keys? Pin
Bash13-May-03 0:52
Bash13-May-03 0:52 
AnswerRe: STL - multimap - equal keys? Pin
Joaquín M López Muñoz13-May-03 2:42
Joaquín M López Muñoz13-May-03 2:42 
GeneralIDL enum and VC Import Pin
John M. Drescher12-May-03 10:16
John M. Drescher12-May-03 10:16 
GeneralRe: IDL enum and VC Import Pin
Michael Dunn12-May-03 18:09
sitebuilderMichael Dunn12-May-03 18:09 
GeneralRe: IDL enum and VC Import Pin
John M. Drescher13-May-03 5:09
John M. Drescher13-May-03 5:09 
GeneralRe: IDL enum and VC Import Pin
Jörgen Sigvardsson13-May-03 9:48
Jörgen Sigvardsson13-May-03 9:48 
GeneralRe: IDL enum and VC Import Pin
John M. Drescher13-May-03 10:05
John M. Drescher13-May-03 10:05 
GeneralRe: IDL enum and VC Import Pin
Jörgen Sigvardsson13-May-03 11:09
Jörgen Sigvardsson13-May-03 11:09 
GeneralRe: IDL enum and VC Import Pin
John M. Drescher13-May-03 11:20
John M. Drescher13-May-03 11:20 
GeneralConsuming ATL generated events in IE Pin
rajeev11-May-03 18:50
rajeev11-May-03 18:50 
General2 questions in wtl Pin
User 1605510-May-03 16:06
User 1605510-May-03 16:06 
GeneralRe: 2 questions in wtl Pin
Michael Dunn10-May-03 17:19
sitebuilderMichael Dunn10-May-03 17:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.