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
version: 2.1 | |
executors: | |
default: | |
docker: | |
- image: buildpack-deps:bionic-curl | |
test-env: | |
parameters: | |
compiler: | |
description: "compiler-version" | |
default: "clang-7.0.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
#!/usr/bin/env zsh | |
# A hash array for zplug | |
typeset -gx -A zplugs | |
zplugs=() | |
# A variable as a starting point of zplug | |
typeset -gx ZPLUG_ROOT="${${(%):-%N}:A:h}" | |
# Load basic functions such as an __zplug::base function |
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
template < class T, class = void > | |
struct Add{ | |
static_assert([]{ return false; }(), "Concept not satisfied: t1 + t2 [t1, t2 in T]"); | |
}; | |
template < class T > | |
struct Add<T, std::void_t< | |
decltype( std::declval<T>() + std::declval<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
template < class... Units1, template <class> class Synonym1, auto Value1, | |
class... Units2, template <class> class Synonym2, auto Value2, | |
std::enable_if_t< | |
is_same_dimensional_v< | |
dimensional_t<Units1...>, | |
dimensional_t<Units2...>>, | |
bool> = false > | |
inline constexpr auto | |
operator+ (static_quantity_t<Synonym1<dimensional_t<Units1...>>, Value1>, static_quantity_t<Synonym2<dimensional_t<Units2...>>, Value2>) noexcept | |
-> static_quantity_t<mitamagic::scaled_dimension_t<dimensional_t<Units1...>, dimensional_t<Units2...>>, |
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
clang++ ./test.cpp -std=c++17 -Wall -Wextra -I../include | |
In file included from ./test.cpp:1: | |
In file included from ./../include/DTL.hpp:32: | |
In file included from ../include/DTL/Deprecated.hpp:43: | |
In file included from ../include/Deprecated/RogueLike.hpp:18: | |
../include/Utility/NoiseShoreBool.hpp:282:75: warning: unused parameter 'x_' [-Wunused-parameter] | |
constexpr void noiseShoreBothBool(Matrix_ & matrix_, const std::size_t x_, const std::size_t y_) noexcept { | |
^ | |
../include/Utility/NoiseShoreBool.hpp:282:97: warning: unused parameter 'y_' [-Wunused-parameter] | |
constexpr void noiseShoreBothBool(Matrix_ & matrix_, const std::size_t x_, const std::size_t y_) noexcept { |
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
FROM ubuntu | |
RUN set -x && \ | |
apt-get update && \ | |
apt-get install -y make cmake gcc g++ python libtool zlib1g zlib1g-dev subversion && \ | |
apt-get clean && \ | |
rm -rf /var/lib/apt/lists/* && \ | |
cd / && \ | |
mkdir llvm && \ | |
cd /llvm && \ |
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
# zplug | |
source ~/.zplug/init.zsh | |
zplug 'zplug/zplug', hook-build:'zplug --self-manage' | |
# theme | |
zplug "bhilburn/powerlevel9k", use:powerlevel9k.zsh-theme | |
# syntax highlighting (https://github.com/zsh-users/zsh-syntax-highlighting) | |
zplug "zsh-users/zsh-syntax-highlighting" | |
# history関係 | |
zplug "zsh-users/zsh-history-substring-search" | |
# タイプ補完 |
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
fn main() { | |
let mut scores = vec![1, 2, 3]; // --+ 'scope | |
let score = &scores[0]; // | | |
// ^~~~~~~~~~~~~~~~~~~~~ 'lifetime // | | |
println!("{}", score); // | | |
scores.push(4); // | | |
} // <-----------------------------------+ |
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 <tuple> | |
using namespace std; | |
int | |
main(){ | |
vector< pair< std::string, int, int > > vec; | |
// 超ダサいし、読みにくいし、パフォーマンスも悪そうなコード | |
vec.push_back( make_tuple( "hoge", 1, 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> | |
int main() { | |
[](auto f){ | |
return [=](auto x) { | |
return [=](auto ...y) { | |
return f(x(x), y...); | |
}; | |
}([=](auto x) { | |
return [=](auto ...y) { |