Код: Выделить всё
std::tuple< std::wstring, int64_t > item(L"str", 10);;
std::tuple< const std::wstring&, int64_t > item_ref = item;
< /code>
Во втором кортеже первое парамец правильно отличается: < /p>
std::wstring
Теперь у меня есть класс, унаследованный от std :: tuple :
template< typename ... Args >
class Identifier: public std::tuple< Args... >
{
public:
Identifier( Args... args ):std::tuple< Args... >( std::forward< Args >( args )... )
{}
Identifier( std::tuple< Args... > tuple ):std::tuple< Args... >( tuple )
{}
};
< /code>
Я стараюсь сделать такую же инициализацию, как с кортежями: < /p>
Identifier item(L"str", 10);
Identifier item_ref = item;
< /code>
Но я получаю ошибку: < /p>
Нет жизнеспособного преобразования из 'идентификатора 'to' Идентификатор '< /p>
< /blockquote>
Какие преобразования или конструктор мне нужно сделать актерский состав преуспевает?
Подробнее здесь: https://stackoverflow.com/questions/793 ... g-paramete