www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - [bug?]

↑ ↓ ← "Matthew" <matthew stlsoft.com> writes:
What might this mean?

"P:\Programs\dm\Libraries\MFC\include\32-bit\afxtempl.h(305) : Error: no 
match for function '?_P(unsigned ,char *,int )'"

Cheers

Matthew 
Jan 18 2006
Jan Knepper <jan smartsoft.us> writes:
Matthew wrote:
 What might this mean?
 
 "P:\Programs\dm\Libraries\MFC\include\32-bit\afxtempl.h(305) : Error: no 
 match for function '?_P(unsigned ,char *,int )'"
 
 Cheers
 
 Matthew 
 
 

I'll email it to you. Jan -- ManiaC++ Jan Knepper But as for me and my household, we shall use Mozilla... www.mozilla.org
Jan 18 2006
↑ ↓ "Matthew" <matthew stlsoft.com> writes:
"Jan Knepper" <jan smartsoft.us> wrote in message 
news:dqmvc9$1vlu$2 digitaldaemon.com...
 Matthew wrote:
 What might this mean?

 "P:\Programs\dm\Libraries\MFC\include\32-bit\afxtempl.h(305) : Error: no 
 match for function '?_P(unsigned ,char *,int )'"

 Cheers

 Matthew


It's the invocation of aray new inside CArray<>
Jan 19 2006
↑ ↓ Jan Knepper <jan smartsoft.us> writes:
Matthew wrote:
 "Jan Knepper" <jan smartsoft.us> wrote in message 
 news:dqmvc9$1vlu$2 digitaldaemon.com...
 
Matthew wrote:

What might this mean?

"P:\Programs\dm\Libraries\MFC\include\32-bit\afxtempl.h(305) : Error: no 
match for function '?_P(unsigned ,char *,int )'"

Cheers

Matthew

My afxtempl.h is too heavily patched to know what line 305 is...

It's the invocation of aray new inside CArray<>

BTW I tried to email you, bit you address used here kinda bounced... Jan -- ManiaC++ Jan Knepper But as for me and my household, we shall use Mozilla... www.mozilla.org
Jan 21 2006
↑ ↓ → "Matthew" <matthew stlsoft.com> writes:
"Jan Knepper" <jan smartsoft.us> wrote in message 
news:dqu0uf$1poi$1 digitaldaemon.com...
 Matthew wrote:
 "Jan Knepper" <jan smartsoft.us> wrote in message 
 news:dqmvc9$1vlu$2 digitaldaemon.com...

Matthew wrote:

What might this mean?

"P:\Programs\dm\Libraries\MFC\include\32-bit\afxtempl.h(305) : Error: no 
match for function '?_P(unsigned ,char *,int )'"

Cheers

Matthew

My afxtempl.h is too heavily patched to know what line 305 is...

It's the invocation of aray new inside CArray<>


template<class TYPE, class ARG_TYPE> void CArray<TYPE, ARG_TYPE>::SetSize(int nNewSize, int nGrowBy) { ASSERT_VALID(this); ASSERT(nNewSize >= 0); if (nGrowBy != -1) m_nGrowBy = nGrowBy; // set new size if (nNewSize == 0) { // shrink to nothing if (m_pData != NULL) { DestructElements(m_pData, m_nSize); delete[] (BYTE*)m_pData; m_pData = NULL; } m_nSize = m_nMaxSize = 0; } else if (m_pData == NULL) { // create one with exact size #ifdef SIZE_T_MAX ASSERT(nNewSize <= SIZE_T_MAX/sizeof(TYPE)); // no overflow #endif m_pData = (TYPE*) new BYTE[nNewSize * sizeof(TYPE)]; <<<<<<<<<<<<<<<<<<< HERE <<<<<<<<<<<<<<< ConstructElements(m_pData, nNewSize); m_nSize = m_nMaxSize = nNewSize; } else if (nNewSize <= m_nMaxSize) { // it fits if (nNewSize > m_nSize) { // initialize the new elements ConstructElements(&m_pData[m_nSize], nNewSize-m_nSize); } else if (m_nSize > nNewSize) { // destroy the old elements DestructElements(&m_pData[nNewSize], m_nSize-nNewSize); } m_nSize = nNewSize; } else { // otherwise, grow array int nGrowBy = m_nGrowBy; if (nGrowBy == 0) { // heuristically determine growth when nGrowBy == 0 // (this avoids heap fragmentation in many situations) nGrowBy = m_nSize / 8; nGrowBy = (nGrowBy < 4) ? 4 : ((nGrowBy > 1024) ? 1024 : nGrowBy); } int nNewMax; if (nNewSize < m_nMaxSize + nGrowBy) nNewMax = m_nMaxSize + nGrowBy; // granularity else nNewMax = nNewSize; // no slush ASSERT(nNewMax >= m_nMaxSize); // no wrap around #ifdef SIZE_T_MAX ASSERT(nNewMax <= SIZE_T_MAX/sizeof(TYPE)); // no overflow #endif TYPE* pNewData = (TYPE*) new BYTE[nNewMax * sizeof(TYPE)]; // copy new data from old memcpy(pNewData, m_pData, m_nSize * sizeof(TYPE)); // construct remaining elements ASSERT(nNewSize > m_nSize); ConstructElements(&pNewData[m_nSize], nNewSize-m_nSize); // get rid of old stuff (note: no destructors called) delete[] (BYTE*)m_pData; m_pData = pNewData; m_nSize = nNewSize; m_nMaxSize = nNewMax; } }
 BTW I tried to email you, bit you address used here kinda bounced...

I've only my main email still going. Too much spam from all the crackpot spammers round the world
Jan 29 2006
"Walter Bright" <newshound digitalmars.com> writes:
"Matthew" <matthew stlsoft.com> wrote in message 
news:dqmrbe$1sj8$1 digitaldaemon.com...
 What might this mean?

 "P:\Programs\dm\Libraries\MFC\include\32-bit\afxtempl.h(305) : Error: no 
 match for function '?_P(unsigned ,char *,int )'"

?_P is array operator new.
Jan 19 2006
↑ ↓ → "Matthew" <matthew stlsoft.com> writes:
"Walter Bright" <newshound digitalmars.com> wrote in message 
news:dqnhor$2g0l$1 digitaldaemon.com...
 "Matthew" <matthew stlsoft.com> wrote in message 
 news:dqmrbe$1sj8$1 digitaldaemon.com...
 What might this mean?

 "P:\Programs\dm\Libraries\MFC\include\32-bit\afxtempl.h(305) : Error: no 
 match for function '?_P(unsigned ,char *,int )'"

?_P is array operator new.

Interesting. This is all working with lots of other compilers, but I decided to try and bring DMC++ back into the MFCSTL fold in my unit-tests but this is what crops up. I have no idea why this error should crop up. I suspect that the compiler's mistaken, and there's something else going wrong.
Jan 19 2006