[ https://issues.apache.org/jira/browse/STDCXX-603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548082 ]
Travis Vitek commented on STDCXX-603: ------------------------------------- Here is a reduced test case. The issue can be resolved by writing apply() inline in the class declaration or changing the declaration of `__fun' to `void __fun(const T&)'. Apparently the VisualAge C++ compiler gets confused when using a typedef in this context. [EMAIL PROTECTED] tests]$ cat t.cpp && gmake t template <class T> struct valarray { typedef T U; void apply (void __func (const U&)) const; }; template <class T> void valarray<T>::apply (void __fun (const U&)) const { } struct S { }; void foo (const S& s) { }; int main () { valarray<S>().apply (foo); return 0; } xlCcore t.o -o t -L/build/vitek/11s/rwtest -lrwtest11s -I/amd/devco/vitek/stdcxx/trunk/include/ansi -D_RWSTDDEBUG -liconv -Wl,-bh:5 -L/build/vitek/11s/lib -lstd11s -lm -qtemplateregistry=t.ti ld: 0711-317 ERROR: Undefined symbol: .valarray<S>::apply(void(*)(const S&)) const ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. gmake: *** [t] Error 8 > [IBM XLC++ 9.0] unsats on std::valarray<S>::apply() in > 26.valarray.members.stdcxx-313.cpp > ----------------------------------------------------------------------------------------- > > Key: STDCXX-603 > URL: https://issues.apache.org/jira/browse/STDCXX-603 > Project: C++ Standard Library > Issue Type: Bug > Components: Tests > Affects Versions: 4.2.0 > Environment: IBM XLC++ 9.0/AIX 5.3 > Reporter: Martin Sebor > Assignee: Travis Vitek > Fix For: 4.2.1 > > > The 26.valarray.members.stdcxx-313.cpp regression test fails to link with IBM > XLC++ 9.0 on AIX 5.3: > xlCcore_r -c -I$(TOPDIR)/include/ansi -I$(TOPDIR)/include > -I$(BUILDDIR)/include -I$(TOPDIR)/tests/include -O -Q > -qtemplateregistry=26.valarray.members.stdcxx-313.ti > $(TOPDIR)/tests/regress/26.valarray.members.stdcxx-313.cpp > xlCcore_r 26.valarray.members.stdcxx-313.o -o 26.valarray.members.stdcxx-313 > -L$(BUILDDIR)/rwtest -lrwtest -I$(TOPDIR)/include/ansi -liconv -Wl,-bh:5 > -L$(BUILDDIR)/lib -Wl,-bsvr4,-R$(BUILDDIR)/lib:$(BUILDDIR)/rwtest -lstd > -lm -qtemplateregistry=26.valarray.members.stdcxx-313.ti > ld: 0711-317 ERROR: Undefined symbol: .std::valarray<S>::apply(S(*)(S)) const > ld: 0711-317 ERROR: Undefined symbol: .std::valarray<S>::apply(S(*)(const > S&)) const > ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. > gmake: *** [26.valarray.members.stdcxx-313] Error 8 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.