fix fbstring move assignment operator
authorPhilip Pronin <philipp@fb.com>
Tue, 23 Apr 2013 06:36:47 +0000 (23:36 -0700)
committerSara Golemon <sgolemon@fb.com>
Mon, 20 May 2013 18:01:26 +0000 (11:01 -0700)
commit4b9cc255b07960d87abe202ab898ad5bb5eba7ca
tree647003a2f6157bc32c8771ac4eecb3258aa6cd86
parent427f1e4c658379e434f78f6e29c9f1ffff83cda0
fix fbstring move assignment operator

Summary:
21.4.2 [string.cons] / 23 says

> If *this and str are the same object, the member has no effect.

That means we have to support self-move-assignment.

Test Plan: added test which triggered assertion, ran it

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D785057
folly/FBString.h
folly/test/FBStringTest.cpp