• R/O
  • SSH
  • HTTPS

eirrepo: Commit


Commit MetaInfo

Revision452 (tree)
Time2022-02-23 23:04:40
Authorquiret

Log Message

- improved some utilities

Change Summary

Incremental Difference

--- common/sdk/UniqueIterate.h (revision 451)
+++ common/sdk/UniqueIterate.h (revision 452)
@@ -347,9 +347,9 @@
347347 return ( containerContains( containers, item ) || ... );
348348 }
349349
350-template <typename itemType, typename... containerTypes>
350+template <typename findItemType, typename putItemType, typename... containerTypes>
351351 requires ( sizeof...( containerTypes ) > 0 )
352-AINLINE void replaceInContainer( const itemType& oldval, const itemType& newval, containerTypes&&... containers )
352+AINLINE void replaceInContainer( const findItemType& oldval, const putItemType& newval, containerTypes&&... containers )
353353 {
354354 auto _replace_lambda = [&]( auto& container ) LAINLINE
355355 {
@@ -357,7 +357,7 @@
357357 {
358358 if ( auto *foundNode = container.Find( oldval ) )
359359 {
360- itemType& upd = container.BeginNodeUpdate( foundNode );
360+ auto& upd = container.BeginNodeUpdate( foundNode );
361361
362362 upd = newval;
363363
@@ -374,7 +374,7 @@
374374 }
375375 else
376376 {
377- for ( itemType& ival : container )
377+ for ( auto& ival : container )
378378 {
379379 if ( ival == oldval )
380380 {
--- common/sdk/eirutils.h (revision 451)
+++ common/sdk/eirutils.h (revision 452)
@@ -87,7 +87,7 @@
8787 concept ThreeWayComparableValues = requires( LT l, RT r ) { l <=> r; };
8888
8989 template <typename LT, typename RT>
90-concept EqualityComparableValues = requires( LT l, RT r ) { (bool)( l == r ); };
90+concept EqualityComparableValues = requires( LT l, RT r ) { { l == r } -> std::same_as <bool>; };
9191
9292 // Basic function.
9393 template <typename leftType, typename rightType> requires ( ThreeWayComparableValues <leftType, rightType> )
Show on old repository browser