What does the "feature release feature" error do?

I get the following error when compiling the serna-free package:

build/buildd-serna-free_4.3.0.20110221-2-i386-pAsDoD/serna-free-4.3.0.20110221/
  sfworks/common/RefCntStorage.h:76:10:
error: non-placement deallocation function 'static void
StringPrivate::RefCntData<E>::operator
delete(void*,StringPrivate::size_type) [with E = QChar,
StringPrivate::size_type = unsigned int]'
/build/buildd-serna-free_4.3.0.20110221-2-i386-pAsDoD/serna-free-4.3.0.20110221/
   sfworks/common/RefCntStorage.h:135:9:
error: selected for placement delete

The code looks like this:

void operator delete(void* p, size_type)
{
    ::operator delete(p);
}
+3
source share
2 answers

I think the problem comes from this wording in the specification:

If the class T does not declare such a delete operator, but declares a member deletion function named operator delete using two parameters, the second of which is of type std :: size_t (18.1), then this function is a normal release function

This would mean that if you tried to declare a pair operator newand operator deletethat took size_tas the second parameter, the compiler would think that yours operator deletewith this signature:

void operator delete (void* memory, size_t arg)

( ) deallocator, , operator new(void*, size_t).

, , . , , , new , . - , g++ , , ( , ).

: ! , , ++ 0x. , 3.5.4/20:

(3.7.4.2), , , , .

, . , ++ 0x, , g++.

+5

, . :

http://oorexx.svn.sourceforge.net/viewvc/oorexx/main/trunk/interpreter/memory/RexxMemory.hpp?r1=6219&r2=6218&pathrev=6219

:

http://sourceforge.net/tracker/?func=detail&aid=2991134&group_id=119701&atid=684730

++ PATCH ++/34158 ( )

  • :
  • : gcc-patches List
  • : , 10 2009 13:31:17 -0500
  • : ++ PATCH ++/34158 ( )

  • /* "

  • (3.7.4.2) ,
  • ,
  • , ." */
  • if (non_placement_deallocation_fn_p (fn))
  • {
  • ( " % q + D", fn);
  • ( " " );
  • }
+1

All Articles