Boost logo

Boost :

From: Boris Gubenko (Boris.Gubenko_at_[hidden])
Date: 2007-02-24 22:51:14

On HP-UX/aCC6, iostreams library test code_converter_test fails to link.

This is caused by a (home-added) feature of Rogue Wave library on this
platform which is that for codecvt to be instantiated on anything but
types listed in Table 51 -- Locale Category Facets in - Type
locale::category, the program must be compiled with _HP_INSTANTIATE_STD2_VL
macro defined.

Here is small reproducer:

#include <locale>

struct S {};

int main()
  std::codecvt_byname<wchar_t,char,S>* x =
    new std::codecvt_byname<wchar_t,char,S>("");

bash-3.00$ aCC x.cpp
ld: Unsatisfied symbol "virtual table of std::codecvt<wchar_t,char,S>" in
file x.o
ld: Unsatisfied symbol "type info of std::codecvt<wchar_t,char,S>" in file
2 errors.
bash-3.00$ aCC x.cpp -D_HP_INSTANTIATE_STD2_VL

Attached patch modifies boost/iostreams/detail/config/wide_streams.hpp
to define _HP_INSTANTIATE_STD2_VL macro for HP-UX/aCC.

I verified, that with this fix, iostreams library test code_converter_test
pass. I also verified, that the fix does not cause any regressions.

Please, apply this patch. If the patch is applied only to HEAD, please,
mark iostreams library test code_converter_test expected failure for
toolset "acc".


Index: wide_streams.hpp
RCS file: /cvsroot/boost/boost/boost/iostreams/detail/config/wide_streams.hpp,v
retrieving revision 1.7
diff -r1.7 wide_streams.hpp
> #if defined(__HP_aCC) && !defined(_HP_INSTANTIATE_STD2_VL)
> #endif

Boost list run by bdawes at, gregod at, cpdaniel at, john at