¡@

Home 

c++ Programming Glossary: copyable

Accessing inactive union member - undefined?

http://stackoverflow.com/questions/11373203/accessing-inactive-union-member-undefined

set of bits that hold the value of type T. For trivially copyable types the value representation is a set of bits in the object..

When is overloading pass by reference (l-value and r-value) preferred to pass-by-value?

http://stackoverflow.com/questions/18303287/when-is-overloading-pass-by-reference-l-value-and-r-value-preferred-to-pass-by

from rhs to lhs . When the element type is trivially copyable this may boil down to nothing but memcpy . This can be much..

Singleton pattern in C++

http://stackoverflow.com/questions/2496918/singleton-pattern-in-c

because that's where the work takes place ~S anything not copyable S S const S operator S const static S MInstance in s.cpp S S..

Is this key-oriented access-protection pattern a known idiom?

http://stackoverflow.com/questions/3220009/is-this-key-oriented-access-protection-pattern-a-known-idiom

SomeKey friend class Foo SomeKey possibly make it non copyable too class Bar public void protectedMethod SomeKey Here only..

How to name this key-oriented access-protection pattern?

http://stackoverflow.com/questions/3324248/how-to-name-this-key-oriented-access-protection-pattern

class SomeKey friend class Foo SomeKey possibly non copyable too class Bar public void protectedMethod SomeKey only friends..

Can we increase the re-usability of this key-oriented access-protection pattern?

http://stackoverflow.com/questions/3324898/can-we-increase-the-re-usability-of-this-key-oriented-access-protection-pattern

friend class Foo more friends... SomeKey possibly non copyable too class Bar public void protectedMethod SomeKey only friends.. private friend T C 0x MSVC allows as extension passkey noncopyable passkey const passkey delete passkey operator const passkey.. Key Keys value Passkey is not allowed. private noncopyable allow const allow delete allow operator const allow delete ..

how copy from one stringstream object to another in C++?

http://stackoverflow.com/questions/3442520/how-copy-from-one-stringstream-object-to-another-in-c

share improve this question Indeed streams are non copyable though they are movable . Depending on your usage the following..

What C++ Smart Pointer Implementations are available?

http://stackoverflow.com/questions/5026197/what-c-smart-pointer-implementations-are-available

the necessary array goodness is baked in. This one is non copyable and so can't be used in STL containers. I've found almost anywhere..

smart pointers (boost) explained

http://stackoverflow.com/questions/569775/smart-pointers-boost-explained

also allow stuffing objects that are only movable but not copyable into containers. So you can stuff unique_ptr's into a vector..

What's the most reliable way to prohibit a copy constructor in C++?

http://stackoverflow.com/questions/5702100/whats-the-most-reliable-way-to-prohibit-a-copy-constructor-in-c

a copy constructor in a C class so that class becomes non copyable . Of course operator should be prohibited at the same time...

Unit test compile-time error

http://stackoverflow.com/questions/605915/unit-test-compile-time-error

the error For example if I create a class which is non copyable I'd like to test the fact that trying to copy it will generate.. tests files and testing the results N.B. I took non copyable only to illustrate my point so I'm not interested in answers.. so I'm not interested in answers about using boost noncopyable and such. c unit testing compiler errors share improve this..

Is it smart to replace boost::thread and boost::mutex with c++11 equivalents?

http://stackoverflow.com/questions/7241993/is-it-smart-to-replace-boostthread-and-boostmutex-with-c11-equivalents

to boost thread Boost uses boost bind which requires copyable arguments. std thread allows move only types such as std unique_ptr..

Can I list-initialize a vector of move-only type?

http://stackoverflow.com/questions/8468774/can-i-list-initialize-a-vector-of-move-only-type

Obviously that cannot work because std unique_ptr is not copyable error use of deleted function 'std unique_ptr _Tp _Dp unique_ptr..

Which kind of pointer do I use when?

http://stackoverflow.com/questions/8706192/which-kind-of-pointer-do-i-use-when

Unique ownership Boost also has a scoped_ptr which is not copyable and for which you can not specify a deleter. std unique_ptr.. containers as long as you don't use operations that need copyable types obviously . Note again that Boost has an array version..

Does C++11 change the behavior of explicitly calling std::swap to ensure ADL-located swap's are found, like boost::swap?

http://stackoverflow.com/questions/9170247/does-c11-change-the-behavior-of-explicitly-calling-stdswap-to-ensure-adl-loc

foo const foo not defined foo operator const foo non copyable void swap foo lhs foo rhs std swap lhs.i rhs.i template typename..

With explicitly deleted member functions in C++11, is it still worthwhile to inherit from a noncopyable base class?

http://stackoverflow.com/questions/9458741/with-explicitly-deleted-member-functions-in-c11-is-it-still-worthwhile-to-inh

in C 11 is it still worthwhile to inherit from a noncopyable base class With explicitly deleted member functions in C 11.. in C 11 is it still worthwhile to inherit from a noncopyable base class I'm talking about the trick where you privately inherit.. deleted copy constructor and copy assignment e.g. boost noncopyable . Are the advantages put forward in this question still applicable..