Click here to Skip to main content
15,913,055 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Strange problem with CDaoRecordset Pin
Manfred Staiger19-Jan-05 5:37
Manfred Staiger19-Jan-05 5:37 
GeneralRe: Strange problem with CDaoRecordset Pin
S Douglas19-Jan-05 19:00
professionalS Douglas19-Jan-05 19:00 
Generalsize from the childframe border Pin
neosun19-Jan-05 1:59
neosun19-Jan-05 1:59 
GeneralRe: size from the childframe border Pin
Antony M Kancidrowski19-Jan-05 3:39
Antony M Kancidrowski19-Jan-05 3:39 
GeneralRe: size from the childframe border Pin
Roger Allen19-Jan-05 4:04
Roger Allen19-Jan-05 4:04 
QuestionSetup HyperTerminal ?? Pin
Kabashiro19-Jan-05 1:26
Kabashiro19-Jan-05 1:26 
AnswerRe: Setup HyperTerminal ?? Pin
Antony M Kancidrowski19-Jan-05 3:43
Antony M Kancidrowski19-Jan-05 3:43 
GeneralMy bug or C++ bug Pin
Emilio Garavaglia19-Jan-05 1:19
Emilio Garavaglia19-Jan-05 1:19 
Consider several classes like this:
class Class
{
public:
    Class& operator&=(const Class& c)
    {   /* some stuff */  return *this; }
};
Now consider this template:
template<class A, class B>
A operator&(const A& a, const B& b)
{  return A(a)&=b; }


for any Class-like, now we have & available.

Now, consider a fragment like this
{
    ....
    int i, flag;
    ....
    if(i & flag)
       ... some action
    ... other actions
}

Althought not intentional (I didn't wrote that template for that), the compiler use the templetized & operator.
It should not be a problem, but ... for some reasons i becomes NULL because of the templatized operator& execution even if passed as const& (suppose i and flags have no bits in common).

Am I wrong in something or ... it's one of the C7.0 misteries ?




2 bugs found.
> recompile ...
65534 bugs found.
D'Oh! | :doh:

GeneralRe: My bug or C++ bug Pin
Antony M Kancidrowski19-Jan-05 3:53
Antony M Kancidrowski19-Jan-05 3:53 
GeneralRe: My bug or C++ bug Pin
Emilio Garavaglia19-Jan-05 4:22
Emilio Garavaglia19-Jan-05 4:22 
GeneralRe: My bug or C++ bug Pin
John R. Shaw19-Jan-05 9:39
John R. Shaw19-Jan-05 9:39 
GeneralRe: My bug or C++ bug Pin
Emilio Garavaglia19-Jan-05 20:59
Emilio Garavaglia19-Jan-05 20:59 
GeneralRe: My bug or C++ bug Pin
John R. Shaw29-Jan-05 11:07
John R. Shaw29-Jan-05 11:07 
GeneralAlter the dimensions of a metafile Pin
Dimitris Vikeloudas19-Jan-05 0:46
Dimitris Vikeloudas19-Jan-05 0:46 
GeneralRe: Alter the dimensions of a metafile Pin
Shog919-Jan-05 8:53
sitebuilderShog919-Jan-05 8:53 
Generalerror LNK2019: unresolved external symbol &quot;public: __thiscall Pin
aj168219-Jan-05 0:44
aj168219-Jan-05 0:44 
GeneralRe: error LNK2019: unresolved external symbol &quot;public: __thiscall Pin
rrrado19-Jan-05 0:56
rrrado19-Jan-05 0:56 
GeneralScroll messages from IE Pin
Filomela18-Jan-05 23:32
Filomela18-Jan-05 23:32 
GeneralRe: Scroll messages from IE Pin
rrrado19-Jan-05 0:29
rrrado19-Jan-05 0:29 
GeneralUsing Performance Graph... Pin
utkumanyaksalak18-Jan-05 23:27
utkumanyaksalak18-Jan-05 23:27 
GeneralWave Format Transforming Question Pin
IsaacLitingjun18-Jan-05 22:56
IsaacLitingjun18-Jan-05 22:56 
Generaldouble buffering on a mfc dialog with CTreeCtrl as content Pin
neosun18-Jan-05 22:42
neosun18-Jan-05 22:42 
GeneralRe: double buffering on a mfc dialog with CTreeCtrl as content Pin
Martin Koorts19-Jan-05 6:30
Martin Koorts19-Jan-05 6:30 
GeneralRe: double buffering on a mfc dialog with CTreeCtrl as content Pin
Shog919-Jan-05 8:51
sitebuilderShog919-Jan-05 8:51 
GeneralForwared Calls Pin
Maxime Labelle18-Jan-05 22:41
Maxime Labelle18-Jan-05 22:41 

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.