C ++ Унифицированная семантика Move оператора унифицированного присваивания

РЕДАКТИРОВАТЬ: решено см. В комментариях - не знаю, как пометить как решенное без ответа.

После просмотра видео на 9 канале о семантике Perfect Forwarding / Move в c ++ 0x я убедился, что это хороший способ написать новые операторы присваивания.

#include <string>
#include <vector>
#include <iostream>

struct my_type 
{
    my_type(std::string name_)
            :    name(name_)
            {}

    my_type(const my_type&)=default;

    my_type(my_type&& other)
    {
            this->swap(other);
    }

    my_type &operator=(my_type other)
    {
            swap(other);
            return *this;
    }

    void swap(my_type &other)
    {
            name.swap(other.name);
    }

private:
    std::string name;
    void operator=(const my_type&)=delete;  
    void operator=(my_type&&)=delete;
};


int main()
{
    my_type t("hello world");
    my_type t1("foo bar");
    t=t1;
    t=std::move(t1);
}

Это должно позволить присваивать ему и r-значения, и const & s. Создав новый объект с помощью соответствующего конструктора, а затем поменяв содержимое на * this. Мне кажется, это звучит так, потому что никакие данные не копируются больше, чем нужно. А указательная арифметика стоит дешево.

Однако мой компилятор не согласен. (g ++ 4.6) И я получаю эти ошибки.

copyconsttest.cpp: In function ‘int main()’:
copyconsttest.cpp:40:4: error: ambiguous overload for ‘operator=’ in ‘t = t1’
copyconsttest.cpp:40:4: note: candidates are:
copyconsttest.cpp:18:11: note: my_type& my_type::operator=(my_type)
copyconsttest.cpp:30:11: note: my_type& my_type::operator=(const my_type&) <deleted>
copyconsttest.cpp:31:11: note: my_type& my_type::operator=(my_type&&) <near match>
copyconsttest.cpp:31:11: note:   no known conversion for argument 1 from ‘my_type’ to ‘my_type&&’
copyconsttest.cpp:41:16: error: ambiguous overload for ‘operator=’ in ‘t = std::move [with _Tp = my_type&, typename std::remove_reference< <template-parameter-1-1> >::type = my_type]((* & t1))’
copyconsttest.cpp:41:16: note: candidates are:
copyconsttest.cpp:18:11: note: my_type& my_type::operator=(my_type)
copyconsttest.cpp:30:11: note: my_type& my_type::operator=(const my_type&) <deleted>
copyconsttest.cpp:31:11: note: my_type& my_type::operator=(my_type&&) <deleted>

Я делаю что-то неправильно? Это плохая практика (я не думаю, что есть способ проверить, назначаете ли вы себя)? Компилятор просто еще не готов?

Спасибо

Ответы на вопрос(3)

Ваш ответ на вопрос