-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for C++14 equivalent versions of find, contains and count whe…
…n comparator is_transparent
- Loading branch information
Showing
7 changed files
with
169 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#pragma once | ||
|
||
#include <utility> | ||
|
||
#include "isdetected.hpp" | ||
|
||
namespace amc { | ||
namespace vec { | ||
|
||
/// Implement the member detection idiom to know if allocator provides 'reallocate' method. | ||
template <class T> | ||
using has_reallocate_t = decltype(std::declval<T>().reallocate( | ||
std::declval<typename T::pointer>(), std::declval<typename T::size_type>(), std::declval<typename T::size_type>(), | ||
std::declval<typename T::size_type>())); | ||
|
||
template <class T> | ||
using has_reallocate = is_detected<has_reallocate_t, T>; | ||
} // namespace vec | ||
} // namespace amc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#pragma once | ||
|
||
#include <utility> | ||
|
||
#include "isdetected.hpp" | ||
|
||
namespace amc { | ||
|
||
/// Implement the member detection idiom to know if T provides 'is_transparent' type | ||
template <class T> | ||
using has_is_transparent_t = typename T::is_transparent; | ||
|
||
template <class T> | ||
using has_is_transparent = is_detected<has_is_transparent_t, T>; | ||
} // namespace amc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters