Commit 9a154f6e authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

hide lambda return types from Function ctor symbols

Summary: It is possible for return type names to be long. They are present in the ctor symbol names for SFINAE, but we can get around that by inserting a cast-to-void.

Reviewed By: luciang

Differential Revision: D32976770

fbshipit-source-id: d5a972543f4d97f94abea9631a4bed35fa67f8f3
parent a61cf107
...@@ -290,7 +290,7 @@ template < ...@@ -290,7 +290,7 @@ template <
typename To, typename To,
typename = typename std::enable_if< typename = typename std::enable_if<
!std::is_reference<To>::value || std::is_reference<From>::value>::type> !std::is_reference<To>::value || std::is_reference<From>::value>::type>
using SafeResultOf = decltype(static_cast<To>(std::declval<From>())); using SafeResultOf = decltype(void(static_cast<To>(std::declval<From>())));
#if defined(_MSC_VER) #if defined(_MSC_VER)
// Need a workaround for MSVC to avoid the inscrutable error: // Need a workaround for MSVC to avoid the inscrutable error:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment