Created
October 6, 2014 15:41
-
-
Save cjxgm/b2c51b6dc9576102faeb to your computer and use it in GitHub Desktop.
tranferability constrain mixin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace mixin | |
{ | |
struct no_copy_ctor { no_copy_ctor() = default; no_copy_ctor(no_copy_ctor const&) = delete; }; | |
struct no_copy_assign { no_copy_assign& operator=(no_copy_assign const&) = delete; }; | |
struct non_copyable : no_copy_ctor, no_copy_assign {}; | |
struct no_move_ctor { no_move_ctor() = default; no_move_ctor(no_move_ctor &&) = delete; }; | |
struct no_move_assign { no_move_assign& operator=(no_move_assign &&) = delete; }; | |
struct non_movable : no_move_ctor, no_move_assign {}; | |
struct non_transferable : non_copyable, non_movable {}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment