Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
Add RingBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
Chronimal committed May 18, 2020
1 parent dc2e6d2 commit fb34ba2
Show file tree
Hide file tree
Showing 13 changed files with 18,652 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Full manual is at https://clang.llvm.org/docs/ClangFormatStyleOptions.html
---
BasedOnStyle: Microsoft

IndentWidth: 4
UseTab: Never

IndentCaseLabels: true

NamespaceIndentation: All

AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false

BreakConstructorInitializersBeforeComma: true
BreakConstructorInitializers: BeforeColon

BinPackParameters: false
BinPackArguments: true

# This applies to () [] <>
AlignAfterOpenBracket: AlwaysBreak

# Always break before braces
BreakBeforeBraces: Allman

# Template delcaration is on it's own line
AlwaysBreakTemplateDeclarations: true

# Arguable but IMHO pointer is part of the type
PointerAlignment: Left

SpaceAfterTemplateKeyword: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
##################################################################
# For more info on EditorConfig check out https://EditorConfig.org
##################################################################

root = true

# Code files
[*.{c,cc,cpp,h,hh,hpp, cs}]
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
charset = utf-8
tab_width = 4

# C/C++ Standard requires an empty line at the end of header files
[*.{h,hh,hpp}]
insert_final_newline = true
37 changes: 37 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Default behavior is always what git thinks is the correct line ending for the platform being used.
* text=auto

# Always normalize code to native line endings on checkout.
*.asm text
*.inc text

*.c text
*.cc text
*.cpp text

*.h text
*.hh text
*.hpp text

*.cs text diff=csharp
*.xaml text
*.tt text
*.ps1 text
*.cmd text
*.msbuild text
*.md text

# Visual Studio generated files always have CRLF line endings on checkout.
*.sln text eol=crlf
*.csproj text eol=crlf
*.vcxproj text eol=crlf
*.filters text eol=crlf

# Files that we know for sure are binary and should not be modified.
*.png binary
*.jpg binary
*.bmp binary
*.tga binary
*.ico binary
*.cur binary
*.sdf binary
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@
*.exe
*.out
*.app

# Visual Studio
*.vcxproj.user
.vs/

# CMake
out/
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# utl
# Chronimal's collection of C++17 utility code
A collection of newly refactored utility code I have written for and used in many personal projects over the years.

## Utilities

- **RingBuffer<T, N>** is a fixed size circular buffer with an STL compliant interface implemented in a single [header file](include/ring_buffer.hpp). Usage examples and test harnesses are [here](test/ring_buffer/catch_ring_buffer.cpp).
Loading

0 comments on commit fb34ba2

Please sign in to comment.