mboehme added inline comments.

================
Comment at: test/clang-tidy/misc-move-const-arg.cpp:75-76
@@ +74,4 @@
+
+struct NonMoveable {
+ public:
+  NonMoveable();
----------------
aaron.ballman wrote:
> This type isn't non-moveable. For that, you need to explicitly delete the 
> move constructor. Perhaps a better name is `NonMoveConstructible`?
> 
> Also, no need for the `public` access specifier.
> This type isn't non-moveable. For that, you need to explicitly delete the 
> move constructor.

Can you expand on this?

The standard says: "If the definition of a class X does not explicitly declare 
a move constructor, one will be implicitly declared as defaulted if and only if 
- X does not have a user-declared copy constructor [...]" (12.8/9).

Because I'm declaring a copy constructor, I would thus have expected not to get 
an implicitly-declared move constructor. Where am I going wrong here?

> Perhaps a better name is NonMoveConstructible?

But the type _is_ move-constructible (in the sense of 
std::is_move_constructible<>).

> Also, no need for the public access specifier.

Oops -- thanks for catching this.

Actually, I meant to make this a class -- not sure how the "struct" slipped in 
there.

================
Comment at: test/clang-tidy/misc-move-const-arg.cpp:116
@@ +115,3 @@
+struct Moveable {
+ public:
+  Moveable();
----------------
aaron.ballman wrote:
> No need for the `public` access specifier.
Thanks for cathching this -- as above, I meant to make this a class.


http://reviews.llvm.org/D21223



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to