more tests

This commit is contained in:
Naios 2015-06-08 22:44:14 +02:00
parent 6bef0fd271
commit 517c9d14f9
2 changed files with 38 additions and 2 deletions

View File

@ -2,10 +2,42 @@
#ifndef _FLUENT_HPP_
#define _FLUENT_HPP_
#include <memory>
#include <utility>
#include "functional_unwrap.hpp"
struct fluent_step
class fluent_step
{
bool released;
void release()
{
int i = 0;
}
public:
fluent_step() : released(false) { }
~fluent_step()
{
if (!released)
release();
}
fluent_step(fluent_step const&) = delete;
fluent_step(fluent_step&& right) : released(false)
{
right.released = true;
}
fluent_step& operator= (fluent_step const&) = delete;
fluent_step& operator= (fluent_step&& right)
{
released = false;
right.released = true;
}
template <typename Callback>
fluent_step& then(Callback const& callback)
{

View File

@ -6,7 +6,11 @@ int main(int argc, char** argv)
make_waterfall()
.then([]
{
})
.then([]
{
});
return 0;