Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
burnpanck committed Nov 27, 2022
1 parent 3b440be commit 434dc58
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
sharedlibs: [OFF, ON]
std: [14, 17, 20]

runs-on: windows-latest
runs-on: windows-2022

steps:
- uses: actions/checkout@v2
Expand All @@ -92,7 +92,7 @@ jobs:
- name: Configure
shell: bash
working-directory: build/
run: cmake $GITHUB_WORKSPACE -G"Visual Studio 17 2022" -DCMAKE_CXX_STANDARD=${{matrix.std}}  -DBUILD_SHARED_LIBS=${{matrix.sharedlibs}}
run: cmake $GITHUB_WORKSPACE -G"Visual Studio 17 2022" -DCMAKE_CXX_STANDARD=${{matrix.std}} -DBUILD_SHARED_LIBS=${{matrix.sharedlibs}}
- name: Build
working-directory: build/
run: cmake --build . --config ${{matrix.build_type}}
Expand Down
8 changes: 0 additions & 8 deletions include/foonathan/memory/allocator_storage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,7 @@ namespace foonathan
FOONATHAN_REQUIRES(
(!std::is_base_of<allocator_storage, typename std::decay<Alloc>::type>::value))>
allocator_storage(Alloc&& alloc,
#if FOONATHAN_SFINAE_WORKAROUND
FOONATHAN_SFINAE(new storage_policy(std::declval<Alloc&&>())))
#else
FOONATHAN_SFINAE(new storage_policy(detail::forward<Alloc>(alloc))))
#endif
: storage_policy(detail::forward<Alloc>(alloc))
{
}
Expand All @@ -141,11 +137,7 @@ namespace foonathan
/// otherwise this constructor does not participate in overload resolution.
template <class OtherPolicy>
allocator_storage(const allocator_storage<OtherPolicy, Mutex>& other,
#if FOONATHAN_SFINAE_WORKAROUND
FOONATHAN_SFINAE(new storage_policy(std::declval<const allocator_storage<OtherPolicy, Mutex>&>().get_allocator())))
#else
FOONATHAN_SFINAE(new storage_policy(other.get_allocator())))
#endif
: storage_policy(other.get_allocator())
{
}
Expand Down
5 changes: 0 additions & 5 deletions include/foonathan/memory/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@
#endif
#endif

// SFINAE workaround for MSVC 19.33
#ifndef FOONATHAN_SFINAE_WORKAROUND
#define FOONATHAN_SFINAE_WORKAROUND 1
#endif

// log prefix
#define FOONATHAN_MEMORY_LOG_PREFIX "foonathan::memory"

Expand Down
8 changes: 0 additions & 8 deletions include/foonathan/memory/std_allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,7 @@ namespace foonathan
// MSVC seems to ignore access rights in decltype SFINAE below
// use this to prevent this constructor being chosen instead of move/copy for types inheriting from it
FOONATHAN_REQUIRES((!std::is_base_of<std_allocator, RawAlloc>::value))>
#if FOONATHAN_SFINAE_WORKAROUND
std_allocator(RawAlloc& alloc, FOONATHAN_SFINAE(alloc_reference(std::declval<RawAlloc&>()))) noexcept
#else
std_allocator(RawAlloc& alloc, FOONATHAN_SFINAE(alloc_reference(alloc))) noexcept
#endif
: alloc_reference(alloc)
{
}
Expand All @@ -153,11 +149,7 @@ namespace foonathan
// MSVC seems to ignore access rights in decltype SFINAE below
// use this to prevent this constructor being chosen instead of move/copy for types inheriting from it
FOONATHAN_REQUIRES((!std::is_base_of<std_allocator, RawAlloc>::value))>
#if FOONATHAN_SFINAE_WORKAROUND
std_allocator(const RawAlloc& alloc, FOONATHAN_SFINAE(alloc_reference(std::declval<const RawAlloc&>()))) noexcept
#else
std_allocator(const RawAlloc& alloc, FOONATHAN_SFINAE(alloc_reference(alloc))) noexcept
#endif
: alloc_reference(alloc)
{
}
Expand Down

0 comments on commit 434dc58

Please sign in to comment.