Support Class Library
A set of tools providing classes and utility
promise.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <utility>
4 #include <future>
5 
6 namespace scl{
7  namespace tools{
8  namespace make{
16  template <class T, class... Args>
17  inline std::promise<T> promise(Args&&... args){
18  auto ret = std::promise<T>{};
19  ret.set_value(T{std::forward<Args>(args)...});
20  return ret;
21  }
22  }
23  }
24 }
Global namespace of the SCL.
Definition: alias.hpp:3
std::promise< T > promise(Args &&... args)
Creates a fulfilled std::promise in-place with the given set of arguments.
Definition: promise.h:17
Group of factory functions.
Definition: any.h:8