소스 검색

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 년 전
부모
커밋
061bca99a9
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      AK/Function.h

+ 2 - 0
AK/Function.h

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