bob@bob
something@something something@something.com
#include <chaiscript/chaiscript.hpp> | |
#include <chaiscript/chaiscript_stdlib.hpp> | |
class BaseClass | |
{ | |
public: | |
BaseClass() | |
{ | |
} |
#include <chrono> | |
#include <string> | |
#include <sstream> | |
#include <vector> | |
#include <iostream> | |
std::string to_string(const int i) | |
{ | |
std::stringstream ss; | |
ss << i; |
#include <chrono> | |
#include <string> | |
#include <sstream> | |
#include <vector> | |
#include <iostream> | |
std::vector<std::vector<std::string>> classic(const int num_vecs, const int vec_size) | |
{ | |
std::vector<std::vector<std::string>> retval; |
var func = fun(){ | |
var ret = 0; | |
for (var i = 0; i < 1000000; ++i) { | |
ret += i; | |
} | |
return ret; | |
} | |
// async takes a 0 parameter function object which is run asynchronously and | |
// returns a Boxed_Value (ie, any value, including void, should work) |
// Generator class | |
class Generator | |
{ | |
var has_value; | |
var value_holder; | |
var params; | |
var func; | |
// empty Generator - no value contained |
bob@bob
something@something something@something.com
repositories: | |
- "ChaiScript/ChaiScript" |
#include <iostream> | |
#include <memory> | |
#include <vector> | |
#include <algorithm> | |
#include <type_traits> | |
template< class ... > using void_t = void; | |
template< class T , class = void > | |
struct is_dereferenceable : std::false_type |
#include <vector> | |
#include <string> | |
#include <sstream> | |
#include <iostream> | |
template<typename ... T> | |
std::vector<std::string> to_strings(const T& ... t) | |
{ | |
std::stringstream ss; | |
return { (ss.str(""), ss << t, ss.str())... }; |
#include <vector> | |
int main() | |
{ | |
// initialize a vector of integers. For the purposes of this example let's assume we *need* a vector | |
std::vector<int> v {1, 2, 3, 4, 5, 6, 1012, 1094}; | |
} |