Skip to content

Instantly share code, notes, and snippets.

View marionette-of-u's full-sized avatar

arithmeticae marionette-of-u

View GitHub Profile
$ clang -cc1 -I/usr/local/include -I/MinGW/lib/gcc/mingw32/4.7.2/include/c++/mingw32 -I/MinGW/lib/gcc/mingw32/4.7.2/include/c++ -code-completion-at=main.cpp:i:j main.cpp &> cmp.txt
"---------------------------------------------------------------------------
" neocomplcache
let g:neocomplcache_enable_at_startup = 1
let g:neocomplcache_force_overwrite_completefunc=1
if !exists("g:neocomplcache_force_omni_patterns")
let g:neocomplcache_force_omni_patterns = {}
endif
let g:neocomplcache_force_omni_patterns.cpp = '[^.[:digit:] *\t]\%(\.\|->\)\|::'
"---------------------------------------------------------------------------
#include "clang-c/Index.h"
#include <cstdlib>
#include <iostream>
#include <fstream>
/*
* Compile with:
* g++ complete.cc -o complete -lclang -L/usr/lib/llvm
* Run with:
* LIBCLANG_TIMING=1 ./complete file.cc line column [clang args...]
template<class Key, class Value>
class specialized_binary_tree_map{
public:
typedef Key key_type;
typedef Value value_type;
struct item{
item() : key(), value(){
for(std::size_t i = 0; i < 2; ++i){ link[i] = nullptr; }
parent = nullptr;
}
#include <iostream>
#include <utility>
#include <functional>
#include <cstdlib>
template<class Key, class Value>
class seq_binary_tree{
public:
typedef Key key_type;
typedef Value value_type;
#include <typeinfo>
#include <cxxabi.h>
#include <cstdlib>
class demangle{
private:
char *realname;
public:
demangle(const std::type_info &ti){
int status = 0;
b : exp(q)*exp(z)*exp(p)^3
d : exp(q)
e : q
d : exp(z)
e : z
c : exp(p)^3
d : exp(3*p)
b : 3*p
e : p
e : 3
#include <typeinfo>
#include <cxxabi.h>
#include <cstdlib>
class demangle{
private:
char *realname;
public:
demangle(const std::type_info &ti){
int status = 0;
exp(q+3*p+z+exp(exp(2*e)+y+3*x))
exp(exp(y+x))
exp(exp(exp(q))+exp(exp(p))+exp(2*x)+exp(y)+exp(exp(z)))
#include <iostream>
#include <ginac/ginac.h>
namespace ExtGiNaC{
using namespace GiNaC;
namespace detail{
class map_reduce_exp : public map_function{
public:
ex operator ()(const ex &expression){
return