File tree Expand file tree Collapse file tree 2 files changed +17
-5
lines changed
Expand file tree Collapse file tree 2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -40,13 +40,12 @@ struct is_data_source
4040};
4141
4242template <class T >
43- struct is_data_source <T, detail::void_t <typename
44- std::enable_if<
43+ struct is_data_source <T, detail::void_t <
44+ decltype (std::declval<T const &>().data())>>
45+ : std::integral_constant<bool,
4546 std::is_nothrow_move_constructible<T>::value &&
4647 buffers::is_const_buffer_sequence<
47- decltype (std::declval<T const &>().data())>::value
48- >::type> >
49- : std::true_type
48+ decltype(std::declval<T const &>().data())>::value>
5049{
5150};
5251
Original file line number Diff line number Diff line change @@ -55,13 +55,26 @@ struct read_source
5555 system::error_code&);
5656};
5757
58+ // blows up in gcc 5,6,7 without workarounds
59+ struct gcc_banger
60+ {
61+ template <class T ,
62+ typename std::enable_if<
63+ is_data_source<typename std::decay<T>::type>::value,
64+ int >::type = 0 >
65+ gcc_banger (T&&);
66+
67+ gcc_banger (gcc_banger&&) = default ;
68+ };
69+
5870} // (anon)
5971
6072BOOST_CORE_STATIC_ASSERT ( is_data_source<test_source>::value);
6173BOOST_CORE_STATIC_ASSERT (! is_data_source<int >::value);
6274BOOST_CORE_STATIC_ASSERT (! is_data_source<not_source1>::value);
6375BOOST_CORE_STATIC_ASSERT (! is_data_source<not_source2>::value);
6476BOOST_CORE_STATIC_ASSERT (! is_data_source<read_source>::value);
77+ BOOST_CORE_STATIC_ASSERT (! is_data_source<gcc_banger>::value);
6578
6679struct data_source_test
6780{
You can’t perform that action at this time.
0 commit comments