Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
Compiler-generated functions and operators: A pain?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Piyo, post: 2600320"] BTW, John, here is an idea. I think you can use templates to help create those concepts of non-copyable, etc. and derive from those templates to insure the concept. I hope this helps! BTW boost ([URL="http://www.boost.org"]www.boost.org[/URL]) has some examples of this idea in practice. [URL]http://www.boost.org/libs/utility/utility.htm[/URL] This shows the non-copyable concept. As for non-default constructable, I am not sure but I thought that if you only specify ctors that cannot be effectively reduced to a default constructor, it means that your class is non-default constructable. eg. Note: tested gcc3.4.3 and this class is non-default constructable. class A { public: A( int var ); }; This version can be default-constructable: class A { public: A( int var=0 ); }; Hope that helps! [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
Compiler-generated functions and operators: A pain?
Top