Opened 13 years ago

Closed 12 years ago

#3161 closed Bugs (fixed)

assignment operator could not be generated (string_algo) VC9

Reported by: divisortheory@… Owned by: Pavol Droba
Milestone: Boost 1.40.0 Component: string_algo
Version: Boost 1.39.0 Severity: Problem
Keywords: warning; VC9 Cc:

Description

I get the following warnings in boost/algorithm/string when using boost::to_upper_copy in VC9 Service Pack 2

1>Q:\include\boost\1.39.0\boost/iterator/transform_iterator.hpp(142) : warning C4512: 'boost::transform_iterator<UnaryFunc,Iterator,Reference,Value>' : assignment operator could not be generated 1> with 1> [ 1> UnaryFunc=boost::algorithm::detail::to_upperF<char>, 1> Iterator=std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char>>, 1> Reference=boost::use_default, 1> Value=boost::use_default 1> ] 1> Q:\include\boost\1.39.0\boost/algorithm/string/detail/case_conv.hpp(110) : see reference to class template instantiation 'boost::transform_iterator<UnaryFunc,Iterator,Reference,Value>' being compiled 1> with 1> [ 1> UnaryFunc=boost::algorithm::detail::to_upperF<char>, 1> Iterator=std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char>>, 1> Reference=boost::use_default, 1> Value=boost::use_default 1> ] 1> Q:\include\boost\1.39.0\boost/algorithm/string/case_conv.hpp(144) : see reference to function template instantiation 'SequenceT boost::algorithm::detail::transform_range_copy<SequenceT,SequenceT,boost::algorithm::detail::to_upperF<CharT>>(const RangeT &,FunctorT)' being compiled 1> with 1> [ 1> SequenceT=std::string, 1> CharT=char, 1> RangeT=std::string, 1> FunctorT=boost::algorithm::detail::to_upperF<char> 1> ] 1> .\file.cpp(42) : see reference to function template instantiation 'SequenceT boost::algorithm::to_upper_copy<std::string>(const SequenceT &,const std::locale &)' being compiled 1> with 1> [ 1> SequenceT=std::string 1> ]

This happens under 1.39, it seems similar problems were addressed in the same source files in a previous release using BOOST_WORKAROUND, but not applied to the rest of the classes in the files.

Change History (3)

comment:1 by Steven Watanabe, 13 years ago

At first glance, this looks serious, since iterators are supposed to be assignable.

comment:2 by Pavol Droba, 13 years ago

it's really just a warning. the problem is caused by a reference member inside the class. The assignment operator is not used nor required.

comment:3 by Steven Watanabe, 12 years ago

Resolution: fixed
Status: newclosed

(In [62697]) Make to_upperF and to_lowerF assignable. Fixes #3161.

Note: See TracTickets for help on using tickets.