Use decltype to get the type of a non-static local
authorChristopher Dykes <cdykes@fb.com>
Fri, 22 Jul 2016 17:13:42 +0000 (10:13 -0700)
committerFacebook Github Bot 1 <facebook-github-bot-1-bot@fb.com>
Fri, 22 Jul 2016 17:23:50 +0000 (10:23 -0700)
commit7b8c8076b423a403b7601ced72ba7b0a4ffebd4e
tree1c6955bace632e3431121bf46b2201b8e21dcc66
parent9b2bbca75345932f76311d8d848487ad48f1705d
Use decltype to get the type of a non-static local

Summary: As the `sizeof()` is being evaluated in a static context, MSVC doesn't let you reference non-static locals. Solve the issue by getting the type of the local via `decltype` instead.

Reviewed By: yfeldblum

Differential Revision: D3600845

fbshipit-source-id: 825d93ced8f09d9f4bf0dcf02142f47a0ec32605
folly/io/async/test/AsyncSSLSocketTest.h