Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11800: Boost Convert fails on user defined types with no value_type
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-11-19 01:59:27
#11800: Boost Convert fails on user defined types with no value_type
------------------------------------+---------------------
Reporter: Brad Anderson <eco@â¦> | Owner:
Type: Bugs | Status: new
Milestone: To Be Determined | Component: None
Version: Boost 1.59.0 | Severity: Problem
Resolution: | Keywords:
------------------------------------+---------------------
Comment (by Vladimir Batov):
Thank you for the analysis and the code snippet. It's much appreciated.
Unfortunately, I have no access to MSVC 2013. So, my reasoning is based on
the information provided and my looking at the code. There I see that the
mentioned code causing compilation error:
template<typename T> struct is_string<T, /*is_range_class=*/true>
{
static bool const value = cnv::is_char<typename T::value_type>::value;
};
only kicks in if T is a class (checked by boost::is_class<T>) and T is a
range (checked by cnv::is_range<T>). The "struct change" is a class.
However, it is not a range and, therefore, cnv::is_range<T> should fail
for the class as it does not have begin() and end() methods (see range.hpp
lines 19-26). That mentioned check does correctly fail with the compilers
(gcc and clang) available to me. More so, judging from
http://www.boost.org/development/tests/develop/developer/convert.html, the
respective test (convert_test_has_member) also works on msvc-12.0 (aka
MSVC-2013, aka BOOST_MSVC=1800) correctly. However, it is known that
earlier versions are broken and fail to compile convert_test_has_member.
However, I understand you are using msvc-12.0 (MSVC-2013, BOOST_MSVC=1800)
which seems to work in regression tests but fails for you. Could that be
that your version of MSVC-2013 needs an update that would bring its
behavior in line with msvc-12.0 in the regression tests?
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11800#comment:3> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC