What are SCARY iterators?

后端 未结 2 775
没有蜡笔的小新
没有蜡笔的小新 2020-12-09 02:05

I\'m reading the VC11 Blog on VC11\'s C++11 features when I\'ve come up to the SCARY iterators topic.

What are SCARY iterators and how does this affect my C++

相关标签:
2条回答
  • 2020-12-09 02:49

    From the linked PDF, at http://www.open-std.org/jtc1/sc22/WG21/docs/papers/2009/n2911.pdf

    The acronym SCARY describes assignments and initializations that are Seemingly erroneous (appearing Constrained by conflicting generic parameters), but Actually work with the Right implementation (unconstrained bY the conflict due to minimized dependencies).

    0 讨论(0)
  • 2020-12-09 03:05

    If you're using them, there's no need to get SCAREd... just ignore their SCARY-ness.

    If you're making them, that means you have to make your iterators independent of the container's allocator type, and of other generic parameters to the container that don't affect the iterators.

    0 讨论(0)
提交回复
热议问题