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> | |
class myclass{ | |
public: | |
myclass(const std::vector<int>&){ | |
throw std::exception(); | |
} | |
private: | |
myclass() = delete; | |
}; |
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 <array> | |
#include <type_traits> | |
template <typename T, std::size_t N> | |
constexpr std::size_t size(const std::array<T, N> &a) { return a.size(); } | |
template <typename A> // テンプレートでなくても同じ | |
void f(const A &a) { | |
char x[a.size()]; // VLA扱いされる。std::array::size()はconstexprになっている | |
char y[size(a)]; // 一段噛ませると通る |
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
#ifdef __GNUG__ | |
#include <cxxabi.h> | |
std::string demangle(const std::string &s) { | |
int r; | |
char *const p = abi::__cxa_demangle(s.c_str(), 0, 0, &r); | |
if (r) return s; | |
try { | |
const std::string x(p); | |
free(p); | |
p = 0; |
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 <thread> | |
#include <future> | |
#include <chrono> | |
#include <functional> | |
#include <deque> | |
struct task_queue { | |
task_queue() = default; | |
task_queue(const task_queue &) = delete; |
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
diff --git a/libgcc/config/i386/gthr-win32.c b/libgcc/config/i386/gthr-win32.c | |
index ab1b69f..4b35582 100644 | |
--- a/libgcc/config/i386/gthr-win32.c | |
+++ b/libgcc/config/i386/gthr-win32.c | |
@@ -1,11 +1,13 @@ | |
/* Implementation of W32-specific threads compatibility routines for | |
libgcc2. */ | |
-/* Copyright (C) 1999, 2000, 2002, 2004, 2008, 2009, 2011 | |
+/* Copyright (C) 1999, 2000, 2002, 2004, 2008, 2009, 2011, 2012 |
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
/* | |
Copyright (c) 2012- kikairoya | |
Boost Software License - Version 1.0 - August 17th, 2003 | |
Permission is hereby granted, free of charge, to any person or organization | |
obtaining a copy of the software and accompanying documentation covered by | |
this license (the "Software") to use, reproduce, display, distribute, | |
execute, and transmit the Software, and to prepare derivative works of the | |
Software, and to permit third-parties to whom the Software is furnished to |
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
diff --git a/libs/context/src/asm/fcontext_i386_sysv_elf_gas.S b/libs/context/src/asm/fcontext_i386_sysv_elf_gas.S | |
index ee27876..25c3339 100644 | |
--- a/libs/context/src/asm/fcontext_i386_sysv_elf_gas.S | |
+++ b/libs/context/src/asm/fcontext_i386_sysv_elf_gas.S | |
@@ -86,9 +86,13 @@ boost_fcontext_make: | |
movl %ecx, 0x14(%eax) /* save the address of the function supposed to run */ | |
movl 0x20(%eax), %edx /* load the stack base */ | |
+ pushl %ebx | |
pushl %eax /* save pointer to fcontext_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
PROMPT_COMMAND=' | |
echo | |
echo -en "[\e[33m$(whoami)\e[0m@\e[35m$(hostname)\e[0m \e[31m$(date +%T)\e[0m] \e[32m$(pwd | sed s:$HOME:~:)\e[0m " | |
if git branch 2> /dev/null > /dev/null ; then | |
if git branch | grep -q "(no branch)" ; then | |
echo "(no branch)" | |
else | |
echo -ne [$(git branch | grep \* | sed "s/.*\* \\(\(.\+\)\\)/\1/")] | |
fi | |
echo -ne " " |
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
// ==UserScript== | |
// @include *****!!!!!! ここに gerrit の URI を入れる !!!!!!***** | |
// ==/UserScript== | |
// HookLib from http://ajalabox.blogspot.jp/2010/05/javascripthooklibjs.html | |
HookLib = {}; | |
HookLib.chain = []; | |
HookLib.hook = function (funcname, hookfunc, options) { | |
var n = HookLib.chain.length; |
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
*.swp | |
*~ | |
*.o | |
*.a | |
vendor_test | |
gtest |