Ver código fonte

AK: Define a convenience alias for a Function's return type

This is nice when the return type is long and needs to be specified as
a lambda's return type many times to resolve ambiguity.
Timothy Flynn 2 anos atrás
pai
commit
061bca99a9
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      AK/Function.h

+ 2 - 0
AK/Function.h

@@ -51,6 +51,8 @@ class Function<Out(In...)> {
     AK_MAKE_NONCOPYABLE(Function);
 
 public:
+    using ReturnType = Out;
+
     Function() = default;
     Function(std::nullptr_t)
     {