diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 4fb1eb2..7fc4285 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -41,7 +41,7 @@ jobs: - name: Install Ninja uses: lukka/get-cmake@latest with: - cmakeVersion: ~3.25.0 + cmakeVersion: ~3.28.0 ninjaVersion: ^1.11.1 - name: Setup MSVC if: startsWith(matrix.platform.os, 'windows') @@ -104,7 +104,7 @@ jobs: - name: Setup build environment uses: lukka/get-cmake@latest with: - cmakeVersion: ~3.25.0 + cmakeVersion: ~3.28.0 ninjaVersion: ^1.11.1 - name: Install Compiler id: install-compiler diff --git a/.gitignore b/.gitignore index d81e3d2..d293e3b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,12 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception /.cache -/.vscode /compile_commands.json /build + +# ignore emacs temp files +*~ +\#*\# + +# ignore vscode settings +.vscode diff --git a/include/beman/any_view/detail/any_iterator.hpp b/include/beman/any_view/detail/any_iterator.hpp index 0a06d78..08a9294 100644 --- a/include/beman/any_view/detail/any_iterator.hpp +++ b/include/beman/any_view/detail/any_iterator.hpp @@ -4,9 +4,9 @@ #define BEMAN_ANY_VIEW_DETAIL_ANY_ITERATOR_HPP #include -#include #include #include +#include namespace beman::any_view::detail { diff --git a/include/beman/any_view/detail/iterator_adaptor.hpp b/include/beman/any_view/detail/iterator_adaptor.hpp index f964f99..01354a4 100644 --- a/include/beman/any_view/detail/iterator_adaptor.hpp +++ b/include/beman/any_view/detail/iterator_adaptor.hpp @@ -3,9 +3,9 @@ #ifndef BEMAN_ANY_VIEW_DETAIL_ITERATOR_ADAPTOR_HPP #define BEMAN_ANY_VIEW_DETAIL_ITERATOR_ADAPTOR_HPP -#include #include #include +#include #include #include diff --git a/include/beman/any_view/detail/unique_address.hpp b/include/beman/any_view/detail/unique_address.hpp new file mode 100644 index 0000000..f70581d --- /dev/null +++ b/include/beman/any_view/detail/unique_address.hpp @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#ifndef BEMAN_ANY_VIEW_DETAIL_UNIQUE_ADDRESS_HPP +#define BEMAN_ANY_VIEW_DETAIL_UNIQUE_ADDRESS_HPP + +#if !defined(__has_include) +# if __has_include() +# include +# endif +#else +// if the config.hpp file does not exist because this is in godbolt +// or another context where cmake is not run, default to the correct +// answer. +# if (_MSC_VER) +# define BEMAN_ANY_VIEW_NO_UNIQUE_ADDRESS() [[msvc::no_unique_address]] +# else +# define BEMAN_ANY_VIEW_NO_UNIQUE_ADDRESS() [[no_unique_address]] +# endif +#endif + +#endif diff --git a/include/beman/any_view/detail/view_adaptor.hpp b/include/beman/any_view/detail/view_adaptor.hpp index a18d2de..e04895f 100644 --- a/include/beman/any_view/detail/view_adaptor.hpp +++ b/include/beman/any_view/detail/view_adaptor.hpp @@ -3,7 +3,7 @@ #ifndef BEMAN_ANY_VIEW_DETAIL_VIEW_ADAPTOR_HPP #define BEMAN_ANY_VIEW_DETAIL_VIEW_ADAPTOR_HPP -#include +#include #include namespace beman::any_view::detail {