https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69105

            Bug ID: 69105
           Summary: front_/back_/insert_iterator should use addressof
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rs2740 at gmail dot com
  Target Milestone: ---

Test case:

#include <deque>
#include <iterator>

struct test : std::deque<int> {
    void operator&() const = delete;
};

int main() {
    test t;
    std::back_insert_iterator<test> b(t);
    std::front_insert_iterator<test> f(t);
    std::insert_iterator<test> i(t, t.begin());
}

http://wg21.link/LWG2324 requires std::addressof to be used.

Reply via email to