[prev in list] [next in list] [prev in thread] [next in thread]
List: mingw-notify
Subject: MinGW-notify digest, Vol 1 #868 - 7 msgs
From: mingw-notify-request () lists ! sourceforge ! net
Date: 2004-08-01 10:03:18
Message-ID: E1BrDCE-0001VU-5W () sc8-sf-list1 ! sourceforge ! net
[Download RAW message or body]
Send MinGW-notify mailing list submissions to
mingw-notify@lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/mingw-notify
or, via email, send a message with subject or body 'help' to
mingw-notify-request@lists.sourceforge.net
You can reach the person managing the list at
mingw-notify-admin@lists.sourceforge.net
When replying, please edit your Subject line so it is more specific
than "Re: Contents of MinGW-notify digest..."
This list is used to send updates of submitted patches, bug reports and file \
releases. You are discouraged from posting to this list. If you wish to unsubscribe \
you can do so at https://lists.sourceforge.net/lists/listinfo/mingw-notify.
Today's Topics:
1. [ mingw-Bugs-1001413 ] implicit conversion not working on 3.4.1 \
(SourceForge.net) 2. [ mingw-Bugs-1001413 ] implicit conversion not working on 3.4.1 \
(SourceForge.net) 3. [ mingw-Bugs-1001413 ] implicit conversion not working on 3.4.1 \
(SourceForge.net) 4. [ mingw-Bugs-1001413 ] implicit conversion not working on 3.4.1 \
(SourceForge.net) 5. [ mingw-Bugs-1001413 ] implicit conversion not working on 3.4.1 \
(SourceForge.net) 6. [ mingw-Bugs-1001413 ] implicit conversion not working on 3.4.1 \
(SourceForge.net) 7. [ mingw-Bugs-1001413 ] implicit conversion not working on 3.4.1 \
(SourceForge.net)
--__--__--
Message: 1
To: noreply@sourceforge.net
From: "SourceForge.net" <noreply@sourceforge.net>
Date: Sun, 01 Aug 2004 00:16:37 -0700
Subject: [Mingw-notify] [ mingw-Bugs-1001413 ] implicit conversion not working on \
3.4.1
Bugs item #1001413, was opened at 2004-08-01 09:16
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1001413&group_id=2435
Category: gcc
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Steven Van Ingelgem (g00fy)
Assigned to: Danny Smith (dannysmith)
Summary: implicit conversion not working on 3.4.1
Initial Comment:
I have a function like:
Version GetExeVersion( const wxString& filename )
{
return wxT("");
}
Version has the following constructors:
typedef class Version
{
public:
Version ( const wxString& version ) {
Init(version); }
explicit Version( const wxChar * version ) {
Init(wxString(version)); }
} Version;
The problem here is:
wxString has a constructor allowing wxChar* to be
converted to wxString. AND I made special for
MinGW an 'explicit' constructor (previously I was
working on MSVC6, and there it worked fine).
Now when I do:
Version GetExeVersion( const wxString& filename )
{
return Version(wxT(""));
}
it works fine (as it will be using the
copy-constructor).
So what I am trying to tell is that explicit
constructors, or implicit conversion between types
ain't working with mingw (gcc?).
Thanks & greetings
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1001413&group_id=2435
--__--__--
Message: 2
To: noreply@sourceforge.net
From: "SourceForge.net" <noreply@sourceforge.net>
Date: Sun, 01 Aug 2004 00:17:56 -0700
Subject: [Mingw-notify] [ mingw-Bugs-1001413 ] implicit conversion not working on \
3.4.1
Bugs item #1001413, was opened at 2004-08-01 09:16
Message generated for change (Comment added) made by g00fy
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1001413&group_id=2435
Category: gcc
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Steven Van Ingelgem (g00fy)
Assigned to: Danny Smith (dannysmith)
Summary: implicit conversion not working on 3.4.1
Initial Comment:
I have a function like:
Version GetExeVersion( const wxString& filename )
{
return wxT("");
}
Version has the following constructors:
typedef class Version
{
public:
Version ( const wxString& version ) {
Init(version); }
explicit Version( const wxChar * version ) {
Init(wxString(version)); }
} Version;
The problem here is:
wxString has a constructor allowing wxChar* to be
converted to wxString. AND I made special for
MinGW an 'explicit' constructor (previously I was
working on MSVC6, and there it worked fine).
Now when I do:
Version GetExeVersion( const wxString& filename )
{
return Version(wxT(""));
}
it works fine (as it will be using the
copy-constructor).
So what I am trying to tell is that explicit
constructors, or implicit conversion between types
ain't working with mingw (gcc?).
Thanks & greetings
----------------------------------------------------------------------
> Comment By: Steven Van Ingelgem (g00fy)
Date: 2004-08-01 09:17
Message:
Logged In: YES
user_id=569271
This is the error-log:
--------------------------
make.exe -f "C:\C++
Programs\CDCoverDownloader\Makefile.win"
Compile/GetLocalVersion.o
g++.exe -D__DEBUG__ -c GetLocalVersion.cpp -o
Compile/GetLocalVersion.o -I"C:/Dev-Cpp/include/c++"
-I"C:/Dev-Cpp/include/c++/mingw32" -I"C:
/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include"
-I"C:/Program Files/Coding/wxWidgets/include" -I"C:
/Program Files/Coding/wxWidgets/lib/vc_lib/mswu"
-D__GNUWIN32__ -W -fexceptions -DWIN32
-D__WXMSW__ -D_UNICODE -D_WINDOWS -g3
GetLocalVersion.cpp: In function `Version
GetExeVersion(const wxString&)':
GetLocalVersion.cpp:61: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
GetLocalVersion.cpp:70: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
GetLocalVersion.cpp:74: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
GetLocalVersion.cpp:79: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1001413&group_id=2435
--__--__--
Message: 3
To: noreply@sourceforge.net
From: "SourceForge.net" <noreply@sourceforge.net>
Date: Sun, 01 Aug 2004 02:08:08 -0700
Subject: [Mingw-notify] [ mingw-Bugs-1001413 ] implicit conversion not working on \
3.4.1
Bugs item #1001413, was opened at 2004-08-01 19:16
Message generated for change (Comment added) made by dannysmith
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1001413&group_id=2435
Category: gcc
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Steven Van Ingelgem (g00fy)
Assigned to: Danny Smith (dannysmith)
Summary: implicit conversion not working on 3.4.1
Initial Comment:
I have a function like:
Version GetExeVersion( const wxString& filename )
{
return wxT("");
}
Version has the following constructors:
typedef class Version
{
public:
Version ( const wxString& version ) {
Init(version); }
explicit Version( const wxChar * version ) {
Init(wxString(version)); }
} Version;
The problem here is:
wxString has a constructor allowing wxChar* to be
converted to wxString. AND I made special for
MinGW an 'explicit' constructor (previously I was
working on MSVC6, and there it worked fine).
Now when I do:
Version GetExeVersion( const wxString& filename )
{
return Version(wxT(""));
}
it works fine (as it will be using the
copy-constructor).
So what I am trying to tell is that explicit
constructors, or implicit conversion between types
ain't working with mingw (gcc?).
Thanks & greetings
----------------------------------------------------------------------
> Comment By: Danny Smith (dannysmith)
Date: 2004-08-01 21:08
Message:
Logged In: YES
user_id=11494
I'm a bit confused by what you are saying . If I understand
correctly, you are saying that the explicit keyword turns off
implicit conversion. Well, thats what it is supposed to do.
Please see
http://www.gnu.org/software/gcc/bugs.html
for instructions on how to report gcc bugs.
----------------------------------------------------------------------
Comment By: Steven Van Ingelgem (g00fy)
Date: 2004-08-01 19:17
Message:
Logged In: YES
user_id=569271
This is the error-log:
--------------------------
make.exe -f "C:\C++
Programs\CDCoverDownloader\Makefile.win"
Compile/GetLocalVersion.o
g++.exe -D__DEBUG__ -c GetLocalVersion.cpp -o
Compile/GetLocalVersion.o -I"C:/Dev-Cpp/include/c++"
-I"C:/Dev-Cpp/include/c++/mingw32" -I"C:
/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include"
-I"C:/Program Files/Coding/wxWidgets/include" -I"C:
/Program Files/Coding/wxWidgets/lib/vc_lib/mswu"
-D__GNUWIN32__ -W -fexceptions -DWIN32
-D__WXMSW__ -D_UNICODE -D_WINDOWS -g3
GetLocalVersion.cpp: In function `Version
GetExeVersion(const wxString&)':
GetLocalVersion.cpp:61: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
GetLocalVersion.cpp:70: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
GetLocalVersion.cpp:74: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
GetLocalVersion.cpp:79: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1001413&group_id=2435
--__--__--
Message: 4
To: noreply@sourceforge.net
From: "SourceForge.net" <noreply@sourceforge.net>
Date: Sun, 01 Aug 2004 02:16:02 -0700
Subject: [Mingw-notify] [ mingw-Bugs-1001413 ] implicit conversion not working on \
3.4.1
Bugs item #1001413, was opened at 2004-08-01 09:16
Message generated for change (Comment added) made by g00fy
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1001413&group_id=2435
Category: gcc
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Steven Van Ingelgem (g00fy)
Assigned to: Danny Smith (dannysmith)
Summary: implicit conversion not working on 3.4.1
Initial Comment:
I have a function like:
Version GetExeVersion( const wxString& filename )
{
return wxT("");
}
Version has the following constructors:
typedef class Version
{
public:
Version ( const wxString& version ) {
Init(version); }
explicit Version( const wxChar * version ) {
Init(wxString(version)); }
} Version;
The problem here is:
wxString has a constructor allowing wxChar* to be
converted to wxString. AND I made special for
MinGW an 'explicit' constructor (previously I was
working on MSVC6, and there it worked fine).
Now when I do:
Version GetExeVersion( const wxString& filename )
{
return Version(wxT(""));
}
it works fine (as it will be using the
copy-constructor).
So what I am trying to tell is that explicit
constructors, or implicit conversion between types
ain't working with mingw (gcc?).
Thanks & greetings
----------------------------------------------------------------------
> Comment By: Steven Van Ingelgem (g00fy)
Date: 2004-08-01 11:16
Message:
Logged In: YES
user_id=569271
Yes, I know that ;-)
But normally the wxT("") should be converted to wxString,
as this is a legal conversion.
The problem with that is that it didn't ?
I mean the way it should go is:
wxT("") { = wchar_t * ""}
wxString("") { = wxWidgets string class, encapsulating
wchar_t}
Version(const wxString& "")
But I think gcc/mingw cannot do that ... So I thought,
well let's make an explicit version from it, accepting
ONLY const wxChar* (what wxT("") is). But even that it
wouldn't accept it...
If I am unclear, please ask more info, I am happy to be
of any assistance!
----------------------------------------------------------------------
Comment By: Danny Smith (dannysmith)
Date: 2004-08-01 11:08
Message:
Logged In: YES
user_id=11494
I'm a bit confused by what you are saying . If I understand
correctly, you are saying that the explicit keyword turns off
implicit conversion. Well, thats what it is supposed to do.
Please see
http://www.gnu.org/software/gcc/bugs.html
for instructions on how to report gcc bugs.
----------------------------------------------------------------------
Comment By: Steven Van Ingelgem (g00fy)
Date: 2004-08-01 09:17
Message:
Logged In: YES
user_id=569271
This is the error-log:
--------------------------
make.exe -f "C:\C++
Programs\CDCoverDownloader\Makefile.win"
Compile/GetLocalVersion.o
g++.exe -D__DEBUG__ -c GetLocalVersion.cpp -o
Compile/GetLocalVersion.o -I"C:/Dev-Cpp/include/c++"
-I"C:/Dev-Cpp/include/c++/mingw32" -I"C:
/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include"
-I"C:/Program Files/Coding/wxWidgets/include" -I"C:
/Program Files/Coding/wxWidgets/lib/vc_lib/mswu"
-D__GNUWIN32__ -W -fexceptions -DWIN32
-D__WXMSW__ -D_UNICODE -D_WINDOWS -g3
GetLocalVersion.cpp: In function `Version
GetExeVersion(const wxString&)':
GetLocalVersion.cpp:61: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
GetLocalVersion.cpp:70: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
GetLocalVersion.cpp:74: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
GetLocalVersion.cpp:79: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1001413&group_id=2435
--__--__--
Message: 5
To: noreply@sourceforge.net
From: "SourceForge.net" <noreply@sourceforge.net>
Date: Sun, 01 Aug 2004 02:38:47 -0700
Subject: [Mingw-notify] [ mingw-Bugs-1001413 ] implicit conversion not working on \
3.4.1
Bugs item #1001413, was opened at 2004-08-01 19:16
Message generated for change (Comment added) made by dannysmith
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1001413&group_id=2435
Category: gcc
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Steven Van Ingelgem (g00fy)
Assigned to: Danny Smith (dannysmith)
Summary: implicit conversion not working on 3.4.1
Initial Comment:
I have a function like:
Version GetExeVersion( const wxString& filename )
{
return wxT("");
}
Version has the following constructors:
typedef class Version
{
public:
Version ( const wxString& version ) {
Init(version); }
explicit Version( const wxChar * version ) {
Init(wxString(version)); }
} Version;
The problem here is:
wxString has a constructor allowing wxChar* to be
converted to wxString. AND I made special for
MinGW an 'explicit' constructor (previously I was
working on MSVC6, and there it worked fine).
Now when I do:
Version GetExeVersion( const wxString& filename )
{
return Version(wxT(""));
}
it works fine (as it will be using the
copy-constructor).
So what I am trying to tell is that explicit
constructors, or implicit conversion between types
ain't working with mingw (gcc?).
Thanks & greetings
----------------------------------------------------------------------
> Comment By: Danny Smith (dannysmith)
Date: 2004-08-01 21:38
Message:
Logged In: YES
user_id=11494
Does section 12.3.4 of C++98 std explain?
"At most one user-defined conversion (constructor or
conversion function) is implicitly applied to a single value."
Danny
----------------------------------------------------------------------
Comment By: Steven Van Ingelgem (g00fy)
Date: 2004-08-01 21:16
Message:
Logged In: YES
user_id=569271
Yes, I know that ;-)
But normally the wxT("") should be converted to wxString,
as this is a legal conversion.
The problem with that is that it didn't ?
I mean the way it should go is:
wxT("") { = wchar_t * ""}
wxString("") { = wxWidgets string class, encapsulating
wchar_t}
Version(const wxString& "")
But I think gcc/mingw cannot do that ... So I thought,
well let's make an explicit version from it, accepting
ONLY const wxChar* (what wxT("") is). But even that it
wouldn't accept it...
If I am unclear, please ask more info, I am happy to be
of any assistance!
----------------------------------------------------------------------
Comment By: Danny Smith (dannysmith)
Date: 2004-08-01 21:08
Message:
Logged In: YES
user_id=11494
I'm a bit confused by what you are saying . If I understand
correctly, you are saying that the explicit keyword turns off
implicit conversion. Well, thats what it is supposed to do.
Please see
http://www.gnu.org/software/gcc/bugs.html
for instructions on how to report gcc bugs.
----------------------------------------------------------------------
Comment By: Steven Van Ingelgem (g00fy)
Date: 2004-08-01 19:17
Message:
Logged In: YES
user_id=569271
This is the error-log:
--------------------------
make.exe -f "C:\C++
Programs\CDCoverDownloader\Makefile.win"
Compile/GetLocalVersion.o
g++.exe -D__DEBUG__ -c GetLocalVersion.cpp -o
Compile/GetLocalVersion.o -I"C:/Dev-Cpp/include/c++"
-I"C:/Dev-Cpp/include/c++/mingw32" -I"C:
/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include"
-I"C:/Program Files/Coding/wxWidgets/include" -I"C:
/Program Files/Coding/wxWidgets/lib/vc_lib/mswu"
-D__GNUWIN32__ -W -fexceptions -DWIN32
-D__WXMSW__ -D_UNICODE -D_WINDOWS -g3
GetLocalVersion.cpp: In function `Version
GetExeVersion(const wxString&)':
GetLocalVersion.cpp:61: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
GetLocalVersion.cpp:70: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
GetLocalVersion.cpp:74: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
GetLocalVersion.cpp:79: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1001413&group_id=2435
--__--__--
Message: 6
To: noreply@sourceforge.net
From: "SourceForge.net" <noreply@sourceforge.net>
Date: Sun, 01 Aug 2004 02:43:40 -0700
Subject: [Mingw-notify] [ mingw-Bugs-1001413 ] implicit conversion not working on \
3.4.1
Bugs item #1001413, was opened at 2004-08-01 09:16
Message generated for change (Comment added) made by g00fy
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1001413&group_id=2435
Category: gcc
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Steven Van Ingelgem (g00fy)
Assigned to: Danny Smith (dannysmith)
Summary: implicit conversion not working on 3.4.1
Initial Comment:
I have a function like:
Version GetExeVersion( const wxString& filename )
{
return wxT("");
}
Version has the following constructors:
typedef class Version
{
public:
Version ( const wxString& version ) {
Init(version); }
explicit Version( const wxChar * version ) {
Init(wxString(version)); }
} Version;
The problem here is:
wxString has a constructor allowing wxChar* to be
converted to wxString. AND I made special for
MinGW an 'explicit' constructor (previously I was
working on MSVC6, and there it worked fine).
Now when I do:
Version GetExeVersion( const wxString& filename )
{
return Version(wxT(""));
}
it works fine (as it will be using the
copy-constructor).
So what I am trying to tell is that explicit
constructors, or implicit conversion between types
ain't working with mingw (gcc?).
Thanks & greetings
----------------------------------------------------------------------
> Comment By: Steven Van Ingelgem (g00fy)
Date: 2004-08-01 11:43
Message:
Logged In: YES
user_id=569271
Yes, indeed...
The following items works:
return wxString( wxT("") ); { conversion wxString ->
Version }
return Version ( wxT("") ); { copy constructor & wxChar ->
wxString }
So it is apparent that VC++ didn't follow this C++98 std
I presume...
On a side-note:
Where can I find this C++98 std ?
----------------------------------------------------------------------
Comment By: Danny Smith (dannysmith)
Date: 2004-08-01 11:38
Message:
Logged In: YES
user_id=11494
Does section 12.3.4 of C++98 std explain?
"At most one user-defined conversion (constructor or
conversion function) is implicitly applied to a single value."
Danny
----------------------------------------------------------------------
Comment By: Steven Van Ingelgem (g00fy)
Date: 2004-08-01 11:16
Message:
Logged In: YES
user_id=569271
Yes, I know that ;-)
But normally the wxT("") should be converted to wxString,
as this is a legal conversion.
The problem with that is that it didn't ?
I mean the way it should go is:
wxT("") { = wchar_t * ""}
wxString("") { = wxWidgets string class, encapsulating
wchar_t}
Version(const wxString& "")
But I think gcc/mingw cannot do that ... So I thought,
well let's make an explicit version from it, accepting
ONLY const wxChar* (what wxT("") is). But even that it
wouldn't accept it...
If I am unclear, please ask more info, I am happy to be
of any assistance!
----------------------------------------------------------------------
Comment By: Danny Smith (dannysmith)
Date: 2004-08-01 11:08
Message:
Logged In: YES
user_id=11494
I'm a bit confused by what you are saying . If I understand
correctly, you are saying that the explicit keyword turns off
implicit conversion. Well, thats what it is supposed to do.
Please see
http://www.gnu.org/software/gcc/bugs.html
for instructions on how to report gcc bugs.
----------------------------------------------------------------------
Comment By: Steven Van Ingelgem (g00fy)
Date: 2004-08-01 09:17
Message:
Logged In: YES
user_id=569271
This is the error-log:
--------------------------
make.exe -f "C:\C++
Programs\CDCoverDownloader\Makefile.win"
Compile/GetLocalVersion.o
g++.exe -D__DEBUG__ -c GetLocalVersion.cpp -o
Compile/GetLocalVersion.o -I"C:/Dev-Cpp/include/c++"
-I"C:/Dev-Cpp/include/c++/mingw32" -I"C:
/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include"
-I"C:/Program Files/Coding/wxWidgets/include" -I"C:
/Program Files/Coding/wxWidgets/lib/vc_lib/mswu"
-D__GNUWIN32__ -W -fexceptions -DWIN32
-D__WXMSW__ -D_UNICODE -D_WINDOWS -g3
GetLocalVersion.cpp: In function `Version
GetExeVersion(const wxString&)':
GetLocalVersion.cpp:61: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
GetLocalVersion.cpp:70: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
GetLocalVersion.cpp:74: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
GetLocalVersion.cpp:79: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1001413&group_id=2435
--__--__--
Message: 7
To: noreply@sourceforge.net
From: "SourceForge.net" <noreply@sourceforge.net>
Date: Sun, 01 Aug 2004 03:02:10 -0700
Subject: [Mingw-notify] [ mingw-Bugs-1001413 ] implicit conversion not working on \
3.4.1
Bugs item #1001413, was opened at 2004-08-01 19:16
Message generated for change (Comment added) made by dannysmith
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1001413&group_id=2435
Category: gcc
Group: None
> Status: Closed
> Resolution: Invalid
Priority: 5
Submitted By: Steven Van Ingelgem (g00fy)
Assigned to: Danny Smith (dannysmith)
Summary: implicit conversion not working on 3.4.1
Initial Comment:
I have a function like:
Version GetExeVersion( const wxString& filename )
{
return wxT("");
}
Version has the following constructors:
typedef class Version
{
public:
Version ( const wxString& version ) {
Init(version); }
explicit Version( const wxChar * version ) {
Init(wxString(version)); }
} Version;
The problem here is:
wxString has a constructor allowing wxChar* to be
converted to wxString. AND I made special for
MinGW an 'explicit' constructor (previously I was
working on MSVC6, and there it worked fine).
Now when I do:
Version GetExeVersion( const wxString& filename )
{
return Version(wxT(""));
}
it works fine (as it will be using the
copy-constructor).
So what I am trying to tell is that explicit
constructors, or implicit conversion between types
ain't working with mingw (gcc?).
Thanks & greetings
----------------------------------------------------------------------
> Comment By: Danny Smith (dannysmith)
Date: 2004-08-01 22:02
Message:
Logged In: YES
user_id=11494
I purchased a copy of ISO/IEC 14882:1998 about 4 years ago
from NZ ISO agent, for about $NZ20 IIRC. You may be able
to download a free draft version somewhere.
Danny
----------------------------------------------------------------------
Comment By: Steven Van Ingelgem (g00fy)
Date: 2004-08-01 21:43
Message:
Logged In: YES
user_id=569271
Yes, indeed...
The following items works:
return wxString( wxT("") ); { conversion wxString ->
Version }
return Version ( wxT("") ); { copy constructor & wxChar ->
wxString }
So it is apparent that VC++ didn't follow this C++98 std
I presume...
On a side-note:
Where can I find this C++98 std ?
----------------------------------------------------------------------
Comment By: Danny Smith (dannysmith)
Date: 2004-08-01 21:38
Message:
Logged In: YES
user_id=11494
Does section 12.3.4 of C++98 std explain?
"At most one user-defined conversion (constructor or
conversion function) is implicitly applied to a single value."
Danny
----------------------------------------------------------------------
Comment By: Steven Van Ingelgem (g00fy)
Date: 2004-08-01 21:16
Message:
Logged In: YES
user_id=569271
Yes, I know that ;-)
But normally the wxT("") should be converted to wxString,
as this is a legal conversion.
The problem with that is that it didn't ?
I mean the way it should go is:
wxT("") { = wchar_t * ""}
wxString("") { = wxWidgets string class, encapsulating
wchar_t}
Version(const wxString& "")
But I think gcc/mingw cannot do that ... So I thought,
well let's make an explicit version from it, accepting
ONLY const wxChar* (what wxT("") is). But even that it
wouldn't accept it...
If I am unclear, please ask more info, I am happy to be
of any assistance!
----------------------------------------------------------------------
Comment By: Danny Smith (dannysmith)
Date: 2004-08-01 21:08
Message:
Logged In: YES
user_id=11494
I'm a bit confused by what you are saying . If I understand
correctly, you are saying that the explicit keyword turns off
implicit conversion. Well, thats what it is supposed to do.
Please see
http://www.gnu.org/software/gcc/bugs.html
for instructions on how to report gcc bugs.
----------------------------------------------------------------------
Comment By: Steven Van Ingelgem (g00fy)
Date: 2004-08-01 19:17
Message:
Logged In: YES
user_id=569271
This is the error-log:
--------------------------
make.exe -f "C:\C++
Programs\CDCoverDownloader\Makefile.win"
Compile/GetLocalVersion.o
g++.exe -D__DEBUG__ -c GetLocalVersion.cpp -o
Compile/GetLocalVersion.o -I"C:/Dev-Cpp/include/c++"
-I"C:/Dev-Cpp/include/c++/mingw32" -I"C:
/Dev-Cpp/include/c++/backward" -I"C:/Dev-Cpp/include"
-I"C:/Program Files/Coding/wxWidgets/include" -I"C:
/Program Files/Coding/wxWidgets/lib/vc_lib/mswu"
-D__GNUWIN32__ -W -fexceptions -DWIN32
-D__WXMSW__ -D_UNICODE -D_WINDOWS -g3
GetLocalVersion.cpp: In function `Version
GetExeVersion(const wxString&)':
GetLocalVersion.cpp:61: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
GetLocalVersion.cpp:70: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
GetLocalVersion.cpp:74: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
GetLocalVersion.cpp:79: error: conversion from `const
wxChar*' to non-scalar type `Version' requested
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1001413&group_id=2435
--__--__--
_______________________________________________
MinGW-notify mailing list
MinGW-notify@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-notify
End of MinGW-notify Digest
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic