This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
struct annotate { | |
annotate() { cout << "annotate ctor" << endl; } | |
annotate(const annotate&) { cout << "annotate copy-ctor" << endl; } | |
annotate(annotate&&) noexcept { cout << "annotate move-ctor" << endl; } | |
annotate& operator=(const annotate&) { cout << "annotate assign" << endl; return *this; } | |
annotate& operator=(annotate&&) noexcept { cout << "annotate move-assign" << endl; return *this; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace adobe { | |
// Precondition: x != T() | |
template <typename T> | |
void test_regular(const T& x) | |
{ | |
assert(x != T()); | |
T y = x; // Copy-construct | |
BOOST_CHECK(x == y); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <memory> | |
using namespace std; | |
template <typename C> // Concept base class | |
class any { | |
public: | |
template <typename T> | |
any(T x) : self_(new model<T>(move(x))) { } | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <tuple> | |
#include <utility> | |
using namespace std; | |
template <typename F, typename T, size_t... I> | |
auto apply_(F f, T&& t, integer_sequence<size_t, I...>) { | |
return f(get<I>(t)...); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <future> | |
#include <iostream> | |
#include <memory> | |
#include <string> | |
#include <thread> | |
#include <unordered_map> | |
#include <dispatch/dispatch.h> | |
using namespace std; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <tuple> | |
#include <iostream> | |
#include <cmath> | |
#include <stlab/future.hpp> | |
#include <stlab/channel.hpp> | |
using namespace stlab; | |
using namespace std; | |
using namespace std::chrono; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <deque> | |
#include <memory> | |
#include <mutex> | |
#include <future> | |
#include <boost/optional.hpp> | |
#include <boost/thread/future.hpp> | |
namespace stlab { | |
class process { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <functional> | |
#include <future> | |
#include <memory> | |
#include <type_traits> | |
#include <dispatch/dispatch.h> | |
namespace stlab { | |
template <class Function, class... Args> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <functional> | |
#include <iostream> | |
#include <string> | |
template <class T> | |
class maybe { | |
std::aligned_storage_t<sizeof(T)> _value; | |
bool _has_value = false; | |
public: |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1 "/Users/sean-parent/Projects/github.com/sean-parent/scratch/scratch/main.cpp" | |
# 1 "<built-in>" 1 | |
# 1 "<built-in>" 3 | |
# 421 "<built-in>" 3 | |
# 1 "<command line>" 1 | |
# 1 "<built-in>" 2 | |
# 1 "/Users/sean-parent/Projects/github.com/sean-parent/scratch/config.hpp" 1 | |
# 2 "<built-in>" 2 | |
# 1 "/Users/sean-parent/Projects/github.com/sean-parent/scratch/scratch/main.cpp" 2 | |
# 1 "/Users/sean-parent/Projects/github.com/sean-parent/scratch/includes/stlab/concurrency/future.hpp" 1 |
OlderNewer