Re: Explicitly specializing std::min() on VC++ 2005 Express Edition
- From: "Tom Widmer [VC++ MVP]" <tom_usenet@xxxxxxxxxxx>
- Date: Wed, 09 May 2007 16:50:12 +0100
Matthias Hofmann wrote:
"Tom Widmer [VC++ MVP]" <tom_usenet@xxxxxxxxxxx> schrieb im Newsbeitrag news:uCq1XvVkHHA.4188@xxxxxxxxxxxxxxxxxxxxxxx
The problem is that VC2005 is ignoring 5.16/4 (about ?: ):
"If the second and third operands are lvalues and have the same type, the result is of that type and is an lvalue."
Instead, it is applying the lvalue-to-rvalue conversion (e.g. the array-to-pointer conversion) to the parts of the ?: expression, and thus trying to return a pointer where an array is expected.
That's good news, I first thought that there was a bug in my code.
It's been reported and fixed apparently:
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101496
Tom
.
- Follow-Ups:
- Re: Explicitly specializing std::min() on VC++ 2005 Express Edition
- From: Matthias Hofmann
- Re: Explicitly specializing std::min() on VC++ 2005 Express Edition
- References:
- Explicitly specializing std::min() on VC++ 2005 Express Edition
- From: Matthias Hofmann
- Re: Explicitly specializing std::min() on VC++ 2005 Express Edition
- From: Tom Widmer [VC++ MVP]
- Re: Explicitly specializing std::min() on VC++ 2005 Express Edition
- From: Matthias Hofmann
- Re: Explicitly specializing std::min() on VC++ 2005 Express Edition
- From: Tom Widmer [VC++ MVP]
- Re: Explicitly specializing std::min() on VC++ 2005 Express Edition
- From: Tom Widmer [VC++ MVP]
- Re: Explicitly specializing std::min() on VC++ 2005 Express Edition
- From: Matthias Hofmann
- Re: Explicitly specializing std::min() on VC++ 2005 Express Edition
- From: Tom Widmer [VC++ MVP]
- Re: Explicitly specializing std::min() on VC++ 2005 Express Edition
- From: Matthias Hofmann
- Re: Explicitly specializing std::min() on VC++ 2005 Express Edition
- From: Tom Widmer [VC++ MVP]
- Re: Explicitly specializing std::min() on VC++ 2005 Express Edition
- From: Matthias Hofmann
- Explicitly specializing std::min() on VC++ 2005 Express Edition
- Prev by Date: error implementing Dot11ExtNicSpecificExtension() in IHV Extenstion DLL on Native Wifi Vista
- Next by Date: relative size of object files vc6 vs vc2003 vs vc2005
- Previous by thread: Re: Explicitly specializing std::min() on VC++ 2005 Express Edition
- Next by thread: Re: Explicitly specializing std::min() on VC++ 2005 Express Edition
- Index(es):
Loading