Cut extraneous typename in StringKeyedCommon.h
authorYedidya Feldblum <yfeldblum@fb.com>
Wed, 29 Mar 2017 17:17:46 +0000 (10:17 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 29 Mar 2017 17:20:33 +0000 (10:20 -0700)
Summary:
[Folly] Cut extraneous typename in `StringKeyedCommon.h`.

In this case, `typename` is optional, and, to avoid confusion, should be removed.

"In this case" means in a template definition, with a qualified non-dependent name.

Reviewed By: ericniebler

Differential Revision: D4792087

fbshipit-source-id: dbb9d2c747432a1f9bc8823e72a7668e78a2fbaa

folly/experimental/StringKeyedCommon.h

index eed9d101b67ff237aff77c3f4b798ecf94833fb5..c79d7b7c7078508103904a4a91b27a8c10bb27bc 100644 (file)
@@ -28,7 +28,7 @@ StringPiece stringPieceDup(StringPiece piece, const Alloc& alloc) {
   auto size = piece.size();
   auto keyDup = typename Alloc::template rebind<char>::other(alloc)
     .allocate(size);
-  memcpy(keyDup, piece.data(), size * sizeof(typename StringPiece::value_type));
+  memcpy(keyDup, piece.data(), size * sizeof(StringPiece::value_type));
   return StringPiece(keyDup, size);
 }