www.digitalmars.com         C & C++   DMDScript  

c++.stlsoft - problem with: reg_key + std::swap + BCB6 in 1.8.8

reply "Pablo Aguilar" <paguilarg hotmail.com> writes:
Hi,

Using WinSTL's reg_key header file seems to break std::swap for BCB6.
Somewhere in it, there's the swap specialization for reg_keys placed in the
std namespace, however, that seems to be taking precedence over the original
std::swap.

Any call to std::swap complains about arguments not being of type reg_key.
Commenting out the specialization works, fine for me, but I figure a proper
workaround for BCB6 might be in order.

...

Was 1.8.8 officially released? 'cuz the release notes still read 1.8.7, if
I'm not mistaken.

...

Cheers,
Pablo
Oct 11 2005
parent reply "Matthew" <matthew hat.stlsoft.dot.org> writes:
 Using WinSTL's reg_key header file seems to break std::swap for BCB6.
 Somewhere in it, there's the swap specialization for reg_keys placed in
the
 std namespace, however, that seems to be taking precedence over the
original
 std::swap.

 Any call to std::swap complains about arguments not being of type reg_key.
 Commenting out the specialization works, fine for me, but I figure a
proper
 workaround for BCB6 might be in order.
I'll take a look. If you can supply a small project that exemplifies the problem that would be immensely helpful.
 Was 1.8.8 officially released? 'cuz the release notes still read 1.8.7, if
 I'm not mistaken.
I was working on a way to automate the preparation of the release notes by querying source control and whatnot, but ran out of time, and then discovered I'd released it without release notes. Sigh. Since I expect 1.8.9 will be out in another week or so, I figured I'd let it lie. (I'm just ever so slightly swamped at the mo <G>) Since I got your attention, I'm hoping for some help in a while in sorting things out a little, prior to 1.9 (which will coincide with the manuscript for Extended STL hitting the inboxes of the reviewers for first review; in about 4-6 weeks' time), but it may be more effective to hit you up on that in email form. ;-) Cheers Matthew
Oct 11 2005
parent reply "Pablo Aguilar" <pablo.aguilar gmail.com> writes:
 I'll take a look. If you can supply a small project that exemplifies the
 problem that would be immensely helpful.
Sure, code looks like this: #include <utility> #include <algorithm> // ^^ I'm not sure which file has std::swap for BCB #include <winstl/reg_key.hpp> #pragma argsused int main(int argc, char* argv[]) { int i = 0, j = 1; std::swap(i, j); // ^ error here ^ // tries to call std::swap(reg_key&, reg_key&); // which is declared in winstl/reg_key inside namespace std return 0; } The project + source files are attached
 I was working on a way to automate the preparation of the release notes by
 querying source control and whatnot, but ran out of time, and then
 discovered I'd released it without release notes. Sigh.

 Since I expect 1.8.9 will be out in another week or so, I figured I'd let
it
 lie. (I'm just ever so slightly swamped at the mo <G>)

 Since I got your attention, I'm hoping for some help in a while in sorting
 things out a little, prior to 1.9 (which will coincide with the manuscript
 for Extended STL hitting the inboxes of the reviewers for first review; in
 about 4-6 weeks' time), but it may be more effective to hit you up on that
 in email form. ;-)

 Cheers

 Matthew
Ok, well... I kinda quit my job, so I've time to spare... let me know what you need help with... Pablo begin 666 reg_key_std_swap_problem.zip M<%]P<F]B;&5M+V-O9&4N8W!P58[!;L(P$$3OEOP/(W$H5(C0*U .]-1OJ JR M$A,O.(ZU7A.AJO]>AZ*J[&5GWZPT,XELVL[ -9RDCUII-:%0^]Q8;+*0)[EN M_S/CVYY)7%=H56&_Q_M3A] +4F:+P5'M<"1OX4Q"DF:U2H.)./:,W=ON,6" MD,17;-O#V5X7+L;M[>%>RG";<K*-5A0$G:$P'47!]1RU,_P\ZLO'YTRK+ZU0 M6"W<30```&(````U````<F5G7VME>5]S=&1?<W=A<%]P<F]B;&5M+W)E9U]K M97E?<W1D7W-W87!?<')O8FQE;2]R96=?:V5Y7W-T9%]S=V%P7W!R;V)L96TN M8G!RS1AK3]M(\#L2_V$/H:.H<DA 5Z$F:>78!EP<.[(3:'6IHK6]A"U^U>M M<K_^9KU^0M(KE4ZJP'C>,SN[,SMF\'$=!NB1I(S&T?"HU^D>(1)YL4^CY?!H ME=U)YT?HXX?]O<$?DH24MV]'*QKX)$6?QP::I/$WXF5(DKC Q+8^:<H40(0& M8UFQ+2>'`;O1;$>W3/2( Q49'HR44:?[KM/M'IR4$H5R*9&2Y>*!;!8L\Q?L M"2>+)(W= (0=LB:UDC7Z=*$;FE-J0=BD$[O?: E;<UH2.^VFA-5:NFJTM%J< M2\W<P52U"\YYR8 H5&VB5>L_?%/&=5P+&?IHAUW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DWJ)OB=-/* M?N_WR/[+V6G;`O(2<^)5ZI'MBRC462ZR*PU*'/F45PL.V$L38J3(]7)W4 7+ MKT5U"]<J3=D.3Q,,"2%0:]RPO8IRG)>" 5>1=P_-8W]OQDB%E6U#N56!<Q6S M3$Z2 'JX*&:;A'%&.+U"^,(KI&%6$(0A`5<-"0(K&RV$Y=S'3[RAC-F2Y3T( MOFART1LO*'&%?U&5JI8]DD%/]GTG_TJ>133/%Q 4^(*-LI(`C<\3?OPK`KT$ M````" `O8DPS)OZ?DB0!``!L`P``-0```')E9U]K97E?<W1D7W-W87!?<')O M8FQE;2]R96=?:V5Y7W-T9%]S=V%P7W!R;V)L96TN<F5SG9._3L,P$,;/I0L+ MZL!.1D:DKDBX:J2H`_ 6/ (>XB%C)/H^';)DJ)3E'H.!P>(5W+OS'Y(&).!+ MOKJ_\WVV%<D```79^^!S?2S2_ 5926VUNERF^=N8UV0%L;R ']3("TT3!GZX M.$O6AM_)SP0W$T,P?%G]S??*3_S Q5'7U'0GY[B"1]C #I[(6WBF,6E\+WA) M!46QE%O!MTC!"5!+`P0*``````#B8DPS````````````````&0```')E9U]K M97E?<W1D7W-W87!?<')O8FQE;2]02P$"% `4````" "O8DPSX9IE!, ````- M`0``(0`````````!`" `````````<F5G7VME>5]S=&1?<W=A<%]P<F]B;&5M M`0` ````_P```')E9U]K97E?<W1D7W-W87!?<')O8FQE;2]R96=?:V5Y7W-T M9%]S=V%P7W!R;V)L96TN8G!F4$L!`A0`% ```` `VV),,TDA]]P?! ``.Q(` M96=?:V5Y7W-T9%]S=V%P7W!R;V)L96TN8G!R4$L!`A0`% ```` `+V),,R;^ M<')O8FQE;2]R96=?:V5Y7W-T9%]S=V%P7W!R;V)L96TN<F5S4$L!`A0`" `` M````XF),,P```````````````!D````````````0````B D``')E9U]K97E? G<W1D7W-W87!?<')O8FQE;2]02P4&``````4`!0"_`0``OPD````` ` end
Oct 12 2005
next sibling parent "Matthew" <matthew hat.stlsoft.dot.org> writes:
Looks like a straight bug in Borland's name resolution. I'll have to remove
the swap's for Borland compilation from the requisite components.

"Pablo Aguilar" <pablo.aguilar gmail.com> wrote in message
news:dijnu2$2336$1 digitaldaemon.com...
 I'll take a look. If you can supply a small project that exemplifies the
 problem that would be immensely helpful.
Sure, code looks like this: #include <utility> #include <algorithm> // ^^ I'm not sure which file has std::swap for BCB #include <winstl/reg_key.hpp> #pragma argsused int main(int argc, char* argv[]) { int i = 0, j = 1; std::swap(i, j); // ^ error here ^ // tries to call std::swap(reg_key&, reg_key&); // which is declared in winstl/reg_key inside namespace std return 0; } The project + source files are attached
 I was working on a way to automate the preparation of the release notes
by
 querying source control and whatnot, but ran out of time, and then
 discovered I'd released it without release notes. Sigh.

 Since I expect 1.8.9 will be out in another week or so, I figured I'd
let
 it
 lie. (I'm just ever so slightly swamped at the mo <G>)

 Since I got your attention, I'm hoping for some help in a while in
sorting
 things out a little, prior to 1.9 (which will coincide with the
manuscript
 for Extended STL hitting the inboxes of the reviewers for first review;
in
 about 4-6 weeks' time), but it may be more effective to hit you up on
that
 in email form. ;-)

 Cheers

 Matthew
Ok, well... I kinda quit my job, so I've time to spare... let me know what you need help with... Pablo
Oct 16 2005
prev sibling parent "Matthew" <admin stlsoft.dot.dot.dot.dot.org> writes:
Arturius gives:

Arturius Compiler Multiplexer, version 2.0.1.01-alpha (Oct  9 2005,
16:08:44)
Copyright Synesis Software, 2001-2005; all rights reserved
Written by Matthew Wilson
http://arturius.org/, http://synesis.com.au/
Tool: bcc/5.6
..\code.cpp(16): Warning W8030 : Temporary used for parameter 'lhs'
in call to 'std::swap(stlsoft::winstl_project::reg_key_a
&,stlsoft::winstl_project::reg_key_a &)' in function main(int,char *
*)
..\code.cpp(16): Error E2064 : Cannot initialize
'stlsoft::winstl_project::reg_key_a &' with 'int' in function
main(int,char * *)
..\code.cpp(16): Error E2342 : Type mismatch in parameter 'lhs'
(wanted 'stlsoft::winstl_project::reg_key_a &', got 'int') in
function main(int,char * *)
..\code.cpp(16): Warning W8030 : Temporary used for parameter 'rhs'
in call to 'std::swap(stlsoft::winstl_project::reg_key_a
&,stlsoft::winstl_project::reg_key_a &)' in function main(int,char *
*)
..\code.cpp(16): Error E2064 : Cannot initialize
'stlsoft::winstl_project::reg_key_a &' with 'int' in function
main(int,char * *)
..\code.cpp(16): Error E2342 : Type mismatch in parameter 'rhs'
(wanted 'stlsoft::winstl_project::reg_key_a &', got 'int') in
function main(int,char * *)
..\code.cpp(18): Warning W8004 : 'j' is assigned a value that is
never used in function main(int,char * *)
..\code.cpp(18): Warning W8004 : 'i' is assigned a value that is
never used in function main(int,char * *)
..\code.cpp(18): Warning W8057 : Parameter 'argc' is never used in
function main(int,char * *)
..\code.cpp(18): Warning W8057 : Parameter 'argv' is never used in
function main(int,char * *)
Tool: cw/7
Tool: cw/8
Tool: dm/8.40
Tool: dm/8.44
Tool: dm/8.45
Tool: dm/beta-sgi
[Arturius:dm_filter] ..\code.cpp(16) : Error: undefined identifier
'std'
Tool: dm/beta-stlport
Tool: gcc/2.9.5
[Arturius:gcc_filter]
H:/STLSoft/Releases/1.8.x/STLSoft/include/winstl.h(284): #error
Versions of GNU C/C++ prior to 3.0 are not supported by the WinSTL
libraries
Tool: gcc/3.2
Tool: gcc/3.3
Tool: gcc/3.4
Tool: icl/6
Tool: icl/7
Tool: icl/8
Tool: ow/1.2
..\code.cpp(5): Error! E059: col(18) unable to open 'utility'
..\code.cpp(6): Error! E059: col(20) unable to open 'algorithm'
..\code.cpp(9): Error! E059: col(29) unable to open
'winstl/reg_key.hpp'
..\code.cpp(16): Error! E241: col(10) 'class std' has not been
declared
..\code.cpp(16): Error! E029: col(10) symbol 'swap' has not been
declared
Tool: ow/1.3
..\code.cpp(5): Error! E059: col(18) unable to open 'utility'
..\code.cpp(6): Error! E059: col(20) unable to open 'algorithm'
..\code.cpp(9): Error! E059: col(29) unable to open
'winstl/reg_key.hpp'
..\code.cpp(16): Error! E241: col(10) 'class std' has not been
declared
..\code.cpp(16): Error! E029: col(10) symbol 'swap' has not been
declared
Tool: vc/2
..\code.cpp(5): fatal error C1083: Cannot open include file:
'utility': No such file or directory
Tool: vc/4.2
Tool: vc/5
Tool: vc/6
Tool: vc/7
Tool: vc/7.1
Tool: vc/8


It's pretty clear that Borland's a bit of a dunce here. I've adjust
winstl_reg_key.h accordingly, and checked all the other 
specialisations
of std::swap(), but please let me know if there're any
similar problems elsewhere. The change will be out with 1.8.9 (or 
1.9.1)
Oct 29 2005