c++ Programming Glossary: forbid
Is it possible to forbid deriving from a class at compile time? http://stackoverflow.com/questions/1000908/is-it-possible-to-forbid-deriving-from-a-class-at-compile-time it possible to forbid deriving from a class at compile time I have a value class.. such that it is not possible to derive from it. I want to forbid it at compile time. Is there perhaps any known idiom to do that..
Converting Derived** to Base** and Derived* to Base* http://stackoverflow.com/questions/11264587/converting-derived-to-base-and-derived-to-base the issue of converting a Derived to a Base and why it is forbidden and I got that the problem is that you could assign to a.. assign to a Base something which is not a Derived so we forbid that. So far so good. But if we apply that principle in depth.. But if we apply that principle in depth why aren't we forbidding such example void nasty_function Base b b Base 3 Ouch int..
C++ Accesses an Array out of bounds gives no error, why? http://stackoverflow.com/questions/1239938/c-accesses-an-array-out-of-bounds-gives-no-error-why that it performs bounds checking although it does not forbid it either . A vector also has the at member function which is..
Is there a way to forbid subclassing of my class? http://stackoverflow.com/questions/1247119/is-there-a-way-to-forbid-subclassing-of-my-class there a way to forbid subclassing of my class Say I've got a class called Base and..
GNU compiler warning “class has virtual functions but non-virtual destructor” http://stackoverflow.com/questions/127426/gnu-compiler-warning-class-has-virtual-functions-but-non-virtual-destructor only pure virtual functions. I want to explicitly forbid users of the interface to delete the object through a pointer..
How do conversion operators work in C++? http://stackoverflow.com/questions/1307876/how-do-conversion-operators-work-in-c in this case can be made safer by the safe bool idiom to forbid conversions to other integer types. The conversions are triggered..
Why do C++11-deleted functions participate in overload resolution? http://stackoverflow.com/questions/14085620/why-do-c11-deleted-functions-participate-in-overload-resolution conversions in certain specific scenarios. In order to forbid a particular overload it has to participate in overload resolution... because it selected a delete d function. delete means I forbid this not merely This does not exist. It's a much stronger statement... I was asking why the C standard says delete means I forbid this instead of this does not exist It's because we don't need..
When instantiating a template, should members of its incomplete argument types be visible? http://stackoverflow.com/questions/17478621/when-instantiating-a-template-should-members-of-its-incomplete-argument-types-b report because the Standard can very reasonably be read to forbid it http www.open std.org jtc1 sc22 wg21 docs cwg_active.html#287..
C++ preprocessor #define-ing a keyword. Is it standards conforming? http://stackoverflow.com/questions/2726204/c-preprocessor-define-ing-a-keyword-is-it-standards-conforming share improve this question In C the closest thing to forbidding #define ing a keyword is §17.4.3.1.1 2 which only disallows.. of that paragraph has been changed in C 0x to outright forbid #define ing a keyword C 0x FCD §17.6.3.3.1 A translation unit..
Is the return type part of the function signature? http://stackoverflow.com/questions/290038/is-the-return-type-part-of-the-function-signature typename T double f invalid However the Standard does forbid a function declaration that only differs in the return type..
C++ - char* vs. string* http://stackoverflow.com/questions/4826481/c-char-vs-string but the C compiler won ™t even warn you that this is forbidden if you try. So always use the second version. If you need.. if you try to modify the contents of str the compiler will forbid this correctly . You should also push the warning level of your..
How to implement a natural sort algorithm in c++? http://stackoverflow.com/questions/642213/how-to-implement-a-natural-sort-algorithm-in-c
Is it valid to write the template type's parameter list in a constructor declaration? http://stackoverflow.com/questions/8636094/is-it-valid-to-write-the-template-types-parameter-list-in-a-constructor-declara g and comeau conline accept this. Indeed 12.1 does not forbid this A T is a name of that class and is not a typedef name but..
Why does the use of 'new' cause memory leaks? http://stackoverflow.com/questions/8839943/why-does-the-use-of-new-cause-memory-leaks pointer private T pointer for this example I'll just forbid copies a smarter class could deal with this some other way automatic_pointer..
|