Skip to content

Commit 4f4debe

Browse files
committed
tidy up type traits
1 parent 1c19d44 commit 4f4debe

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

include/boost/buffers/detail/type_traits.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ namespace boost {
1818
namespace buffers {
1919
namespace detail {
2020

21+
#if defined(__cpp_lib_concepts) && __cpp_lib_concepts >= 201907
22+
23+
template<class T>
24+
using is_bidirectional_iterator = std::is_bidirectional_iterator<T>;
25+
26+
#else
27+
28+
// C++11 version of is_bidirectional_iterator
29+
2130
// Alias for true_type if T is a BidirectionalIterator
2231
template<class T, class = void>
2332
struct is_bidirectional_iterator : std::false_type
@@ -88,6 +97,8 @@ struct is_bidirectional_iterator<T, void_t<decltype(
8897
{
8998
};
9099

100+
#endif
101+
91102
} // detail
92103
} // buffers
93104
} // boost

include/boost/buffers/range.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ constexpr struct
7979
}
8080
} begin {};
8181

82+
//------------------------------------------------------------------------------
83+
8284
/** Return an iterator to the end of the buffer sequence.
8385
*/
8486
constexpr struct

0 commit comments

Comments
 (0)