[pkg-boost-devel] Bug#387569: libboost-dev: boost::assign from const char[] to string does not work under g++-4.1

LI Daobing lidaobing at gmail.com
Fri Sep 15 06:45:37 UTC 2006


Package: libboost-dev
Version: 1.33.1-5
Severity: important

$ cat boost.cpp
#include <boost/assign/list_of.hpp> // for 'list_of()'
#include <vector>
#include <string>

void foo() {
    const std::vector<std::string> names = boost::assign::list_of( "Mr. Foo" );
}
$ g++-4.0 -c boost.cpp
$ g++-4.1 -c boost.cpp
/usr/include/boost/type_traits/decay.hpp: In instantiation of ‘boost::decay<const char [8]>’:
/usr/include/boost/mpl/eval_if.hpp:38:   instantiated from ‘boost::mpl::eval_if<boost::is_array<char [8]>, boost::decay<const char [8]>, boost::decay<char [8]> >’
/usr/include/boost/assign/list_of.hpp:70:   instantiated from ‘boost::assign_detail::assign_decay<char [8]>’
/usr/include/boost/assign/list_of.hpp:240:   instantiated from ‘boost::assign_detail::generic_list<char [8]>’
boost.cpp:6:   instantiated from here
/usr/include/boost/type_traits/decay.hpp:38: error: ambiguous class template instantiation for ‘struct boost::remove_bounds<const char [8]>’
/usr/include/boost/type_traits/remove_bounds.hpp:23: error: candidates are: struct boost::remove_bounds<T [N]>
/usr/include/boost/type_traits/remove_bounds.hpp:24: error:                 struct boost::remove_bounds<const T [N]>
/usr/include/boost/type_traits/decay.hpp:38: error: invalid use of undefined type ‘struct boost::remove_bounds<const char [8]>’
/usr/include/boost/type_traits/remove_bounds.hpp:20: error: declaration of ‘struct boost::remove_bounds<const char [8]>’
/usr/include/boost/assign/list_of.hpp: In function ‘boost::assign_detail::generic_list<T> boost::assign::list_of(const T&) [with T = char [8]]’:
boost.cpp:6:   instantiated from here
/usr/include/boost/assign/list_of.hpp:498: error: no match for call to ‘(boost::assign_detail::generic_list<char [8]>) (const char [8])’
/usr/include/boost/assign/list_of.hpp:264: note: candidates are: boost::assign_detail::generic_list<T>& boost::assign_detail::generic_list<T>::operator()() [with T = char [8]]
/usr/include/boost/assign/list_of.hpp: In member function ‘boost::assign_detail::generic_list<T>::operator Container() const [with Container = std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, T = char [8]]’:
boost.cpp:6:   instantiated from here
/usr/include/boost/assign/list_of.hpp:336: error: ‘const class boost::assign_detail::generic_list<char [8]>’ has no member named ‘convert_to_container’


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (50, 'experimental')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-2-amd64
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages libboost-dev depends on:
hi  libstdc++6-4.0-dev [libst 4.0.3-7        The GNU Standard C++ Library v3 (d
hi  libstdc++6-4.1-dev [libst 4.1.1-13       The GNU Standard C++ Library v3 (d
ii  libstdc++6-4.2-dev [libst 4.2-20060709-1 The GNU Standard C++ Library v3 (d

libboost-dev recommends no packages.

-- debconf-show failed




More information about the pkg-boost-devel mailing list