Is using ranges in c++ advisable at all?
-
I find the traditional syntax of most c++ stl algorithms annoying; that using them is lengthy to write is only a small issue, but that they always need to operate on existing objects limits their composability considerably.
Could someone Advice what else can be done?
-
I find the traditional syntax of most c++ stl algorithms annoying; that using them is lengthy to write is only a small issue, but that they always need to operate on existing objects limits their composability considerably.
Could someone Advice what else can be done?
@Sachin-Bhatt said in Is using ranges in c++ advisable at all?:
but that they always need to operate on existing objects
On what else should they operate? On non-existent objects? Can you explain better what exactly you are asking?
-
Is using ranges in c++ advisable at all?
Do you mean the C++20 ranges? Yeah, sure, go ahead. That's what they're for.
but that they always need to operate on existing objects
I don't think I understand that part. stl algorithms operate mostly on iterators. Those can be anything as long as they satisfy the iterator interface.