- Host of C++ Weekly
- Co-host of CppCast
- Speaker / Contractor / Trainer
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
git clone git://gcc.gnu.org/git/gcc.git | |
mkdir gcc_build | |
cd gcc_build | |
../gcc/configure --disable-bootstrap --disable-werror --disable-multilib --enable-languages=c,c++ --prefix=/usr/local | |
make -j3 | |
make install |
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
if [ $# -gt 1 ] | |
then | |
echo "Checking out LLVM '$1' branch from svn into '`pwd`/llvm' and setting install prefix to '$2'" | |
echo "Press Return To Continue" | |
read $VAR | |
else | |
echo "Usage: $0 <branch name> <install prefix>" | |
exit | |
fi |
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 <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}; | |
} |
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 <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())... }; |
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 <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 |
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
repositories: | |
- "ChaiScript/ChaiScript" |
bob@bob
something@something something@something.com
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
// Generator class | |
class Generator | |
{ | |
var has_value; | |
var value_holder; | |
var params; | |
var func; | |
// empty Generator - no value contained |
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
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) |
NewerOlder