> -----Original Message----- > From: Martin Sebor [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 09, 2008 11:10 AM > To: [email protected] > Subject: Re: svn commit: r675044 - in /stdcxx/branches/4.3.x: > include/rw/_tuple.h include/tuple > tests/utilities/20.tuple.cnstr.cpp > tests/utilities/20.tuple.creation.cpp > tests/utilities/20.tuple.h tests/utilities/20.tuple.helpers.cpp > ... > > This can probably be changed to use a void return type, which will > > simplify the code further. You only really need the return > type to chain > > assignments or to call a function on the result, none of > which we should > > be doing. > > Good idea! Also, the inline specifier is redundant and should > be removed.
A void return type causes an compile error: gcc -c -I/work/stdcxx/branches/4.3.x/include/ansi -D_RWSTDDEBUG -pthread -I/work/stdcxx/branches/4.3.x/include -I/build/stdcxx-4.3.x-15D/include -I/work/stdcxx/branches/4.3.x/tests/include -pedantic -nostdinc++ -std=gnu++0x -D_RWSTD_EXT_CXX_0X -g -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align /work/stdcxx/branches/4.3.x/tests/utilities/20.tuple.creation.cpp /work/stdcxx/branches/4.3.x/include/rw/_tuple.h: In member function 'void __rw::__rw_ignore::operator=(const _TypeT&) const [with _TypeT = double]': /work/stdcxx/branches/4.3.x/include/rw/_tuple.h:131: instantiated from '__rw::__rw_tuple<_HeadT, _TailT ...>& __rw::__rw_tuple<_HeadT, _TailT ...>::operator=(__rw::__rw_tuple<_HeadU, _TailU ...>&&) [with _HeadU = double, _TailU = const char*, _HeadT = const __rw::__rw_ignore&, _TailT = const char*&]' /work/stdcxx/branches/4.3.x/include/rw/_tuple.h:130: instantiated from '__rw::__rw_tuple<_HeadT, _TailT ...>& __rw::__rw_tuple<_HeadT, _TailT ...>::operator=(__rw::__rw_tuple<_HeadU, _TailU ...>&&) [with _HeadU = int, _TailU = double, const char*, _HeadT = int&, _TailT = const __rw::__rw_ignore&, const char*&]' /work/stdcxx/branches/4.3.x/include/tuple:123: instantiated from 'std::tuple<_TypesT>& std::tuple<_TypesT>::operator=(std::tuple<_TypesU ...>&&) [with _TypesU = int, double, const char*, _TypesT = int&, const __rw::__rw_ignore&, const char*&]' /work/stdcxx/branches/4.3.x/tests/utilities/20.tuple.creation.cpp:75: instantiated from here /work/stdcxx/branches/4.3.x/include/rw/_tuple.h:181: error: return-statement with a value, in function returning 'void' make: *** [20.tuple.creation.o] Error 1 Brad.
