fix Cursor's copy constructor
authorAdam Simpkins <simpkins@fb.com>
Thu, 6 Mar 2014 00:28:09 +0000 (16:28 -0800)
committerDave Watson <davejwatson@fb.com>
Tue, 18 Mar 2014 17:01:34 +0000 (10:01 -0700)
commitc8ad790f81721ce7faee85274ff5ae80124ce674
tree7a0d40d9b5c80e6db9819059e713b264acaeca81
parent9f95e046d5efc40ca366cf2423e09d13fb8590e3
fix Cursor's copy constructor

Summary:
The Cursor class didn't provide a copy constructor accepting a
"const Cursor&".  The existing constructor only accepted references to
non-const Cursor.

This updates the constructor to also accept "const Cursor&".  I also
made the template parameter checking more strict, so that it only
accepts other CursorBase classes.  This prevents the compiler from
thinking that a Cursor can be constructed from any other possible type
when performing overload resolution.

Test Plan: Ran all of the folly cursor tests.

Reviewed By: davejwatson@fb.com

FB internal diff: D1208428
folly/io/Cursor.h