Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .codespell_words
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
unexpect
OT
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
# Workflow files stored in the
# default location of `.github/workflows`
directory: "/"
schedule:
interval: "weekly"
17 changes: 17 additions & 0 deletions .github/workflows/format.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Format

on:
workflow_dispatch:
pull_request:
push:
branches:
- main

jobs:
pre-commit:
name: pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
37 changes: 37 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-builtin-literals
- id: fix-byte-order-marker
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: fix-encoding-pragma
- id: forbid-new-submodules
- id: mixed-line-ending
- id: name-tests-test
- id: requirements-txt-fixer
- id: sort-simple-yaml
- id: trailing-whitespace

- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
args: ['--write-changes', '--ignore-words=.codespell_words']
exclude: CHANGELOG.rst
10 changes: 5 additions & 5 deletions tl_expected/include/tl_expected/expected.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
#if (TL_CPLUSPLUS > 201103L) && !defined(TL_EXPECTED_GCC49)
#include <cassert>
#define TL_ASSERT(x) assert(x)
#else
#else
#define TL_ASSERT(x)
#endif
#endif
Expand Down Expand Up @@ -132,7 +132,7 @@ struct is_trivially_copy_constructible<std::vector<T, A>> : std::false_type {};
#define TL_EXPECTED_11_CONSTEXPR constexpr
#endif

#if TL_CPLUSPLUS >= 201703L
#if TL_CPLUSPLUS >= 201703L
#define TL_EXPECTED_NODISCARD [[nodiscard]]
#else
#define TL_EXPECTED_NODISCARD
Expand Down Expand Up @@ -534,7 +534,7 @@ template <class T, class E> struct expected_storage_base<T, E, true, true> {
Args &&...args)
: m_unexpect(il, std::forward<Args>(args)...), m_has_val(false) {}

expected_storage_base(const expected_storage_base &) = default;
expected_storage_base(const expected_storage_base &) = default;
expected_storage_base(expected_storage_base &&) = default;
expected_storage_base &operator=(const expected_storage_base &) = default;
expected_storage_base &operator=(expected_storage_base &&) = default;
Expand Down Expand Up @@ -651,9 +651,9 @@ template <class E> struct expected_storage_base<void, E, false, true> {
//no constexpr for GCC 4/5 bug
#else
TL_EXPECTED_MSVC2015_CONSTEXPR
#endif
#endif
expected_storage_base() : m_has_val(true) {}

constexpr expected_storage_base(no_init_t) : m_val(), m_has_val(false) {}

constexpr expected_storage_base(in_place_t) : m_has_val(true) {}
Expand Down
Loading