Skip to content

Instantly share code, notes, and snippets.

View loliGothicK's full-sized avatar
:octocat:
may the --force be with you!

Mitama loliGothicK

:octocat:
may the --force be with you!
View GitHub Profile
version: 2.1
executors:
default:
docker:
- image: buildpack-deps:bionic-curl
test-env:
parameters:
compiler:
description: "compiler-version"
default: "clang-7.0.0"
#!/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
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>() )
>>
{
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...>>,
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 {
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 && \
# 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"
# タイプ補完
fn main() {
let mut scores = vec![1, 2, 3]; // --+ 'scope
let score = &scores[0]; // |
// ^~~~~~~~~~~~~~~~~~~~~ 'lifetime // |
println!("{}", score); // |
scores.push(4); // |
} // <-----------------------------------+
#include <vector>
#include <tuple>
using namespace std;
int
main(){
vector< pair< std::string, int, int > > vec;
// 超ダサいし、読みにくいし、パフォーマンスも悪そうなコード
vec.push_back( make_tuple( "hoge", 1, 0 ) );
// コンストラクタに直接初期化子を完全転送して要素を構築
#include <iostream>
int main() {
[](auto f){
return [=](auto x) {
return [=](auto ...y) {
return f(x(x), y...);
};
}([=](auto x) {
return [=](auto ...y) {