add copyright headers

This commit is contained in:
2018-12-10 16:58:18 +07:00
parent 8da06cb998
commit 95b7b612c3
2 changed files with 20 additions and 8 deletions

View File

@@ -1,3 +1,9 @@
/*******************************************************************************
* This file is part of the "promise.hpp"
* For conditions of distribution and use, see copyright notice in LICENSE.md
* Copyright (C) 2018 Matvey Cherevko
******************************************************************************/
#pragma once #pragma once
#include <cstdint> #include <cstdint>
@@ -418,9 +424,9 @@ namespace promise_hpp
auto np = invoke_hpp::invoke( auto np = invoke_hpp::invoke(
std::forward<decltype(f)>(f), std::forward<decltype(f)>(f),
v); v);
np.then([n = n]() mutable { np.then([n]() mutable {
n.resolve(); n.resolve();
}, [n = n](std::exception_ptr e) mutable { }, [n](std::exception_ptr e) mutable {
n.reject(e); n.reject(e);
}); });
}, [n = next](std::exception_ptr e) mutable { }, [n = next](std::exception_ptr e) mutable {
@@ -445,9 +451,9 @@ namespace promise_hpp
auto np = invoke_hpp::invoke( auto np = invoke_hpp::invoke(
std::forward<decltype(f)>(f), std::forward<decltype(f)>(f),
v); v);
np.then([n = n](const typename ResolveFR::value_type& nv) mutable { np.then([n](const typename ResolveFR::value_type& nv) mutable {
n.resolve(nv); n.resolve(nv);
}, [n = n](std::exception_ptr e) mutable { }, [n](std::exception_ptr e) mutable {
n.reject(e); n.reject(e);
}); });
}, [n = next](std::exception_ptr e) mutable { }, [n = next](std::exception_ptr e) mutable {
@@ -746,9 +752,9 @@ namespace promise_hpp
]() mutable { ]() mutable {
auto np = invoke_hpp::invoke( auto np = invoke_hpp::invoke(
std::forward<decltype(f)>(f)); std::forward<decltype(f)>(f));
np.then([n = n]() mutable { np.then([n]() mutable {
n.resolve(); n.resolve();
}, [n = n](std::exception_ptr e) mutable { }, [n](std::exception_ptr e) mutable {
n.reject(e); n.reject(e);
}); });
}, [n = next](std::exception_ptr e) mutable { }, [n = next](std::exception_ptr e) mutable {
@@ -772,9 +778,9 @@ namespace promise_hpp
]() mutable { ]() mutable {
auto np = invoke_hpp::invoke( auto np = invoke_hpp::invoke(
std::forward<decltype(f)>(f)); std::forward<decltype(f)>(f));
np.then([n = n](const typename ResolveFR::value_type& nv) mutable { np.then([n](const typename ResolveFR::value_type& nv) mutable {
n.resolve(nv); n.resolve(nv);
}, [n = n](std::exception_ptr e) mutable { }, [n](std::exception_ptr e) mutable {
n.reject(e); n.reject(e);
}); });
}, [n = next](std::exception_ptr e) mutable { }, [n = next](std::exception_ptr e) mutable {

View File

@@ -1,3 +1,9 @@
/*******************************************************************************
* This file is part of the "promise.hpp"
* For conditions of distribution and use, see copyright notice in LICENSE.md
* Copyright (C) 2018 Matvey Cherevko
******************************************************************************/
#define CATCH_CONFIG_MAIN #define CATCH_CONFIG_MAIN
#include "catch.hpp" #include "catch.hpp"