Skip to content

Commit 7e3e9a5

Browse files
committed
Replace is_copy_constructible+is_trivial with is_trivially_copyable.
For the purpose of selecting operator[] result type, we don't care whether the value type is trivially default-constructible. So, in order to avoid using the deprecated in C++26 is_trivial, use is_trivially_copyable instead of is_copy_constructible+is_trivial. Closes #93.
1 parent 3767696 commit 7e3e9a5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

include/boost/iterator/iterator_facade.hpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,7 @@ template< typename ValueType, typename Reference >
374374
struct use_operator_brackets_proxy :
375375
public detail::negation<
376376
detail::conjunction<
377-
std::is_copy_constructible< ValueType >,
378-
std::is_trivial< ValueType >,
377+
std::is_trivially_copyable< ValueType >,
379378
iterator_writability_disabled< ValueType, Reference >
380379
>
381380
>
@@ -385,14 +384,14 @@ template< typename Iterator, typename Value, typename Reference >
385384
struct operator_brackets_result
386385
{
387386
using type = typename std::conditional<
388-
use_operator_brackets_proxy<Value, Reference>::value,
389-
operator_brackets_proxy<Iterator>,
387+
use_operator_brackets_proxy< Value, Reference >::value,
388+
operator_brackets_proxy< Iterator >,
390389
Value
391390
>::type;
392391
};
393392

394393
template< typename Iterator >
395-
inline operator_brackets_proxy<Iterator> make_operator_brackets_result(Iterator const& iter, std::true_type)
394+
inline operator_brackets_proxy< Iterator > make_operator_brackets_result(Iterator const& iter, std::true_type)
396395
{
397396
return operator_brackets_proxy< Iterator >(iter);
398397
}

0 commit comments

Comments
 (0)