Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions include/boost/lexical_cast/bad_lexical_cast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,30 @@ namespace boost
{}

#ifndef BOOST_NO_TYPEID
private:
#ifdef BOOST_NO_STD_TYPEINFO
typedef ::type_info type_info_t;
#else
typedef ::std::type_info type_info_t;
#endif
public:
bad_lexical_cast(
const std::type_info &source_type_arg,
const std::type_info &target_type_arg) BOOST_NOEXCEPT
const type_info_t &source_type_arg,
const type_info_t &target_type_arg) BOOST_NOEXCEPT
: source(&source_type_arg), target(&target_type_arg)
{}

const std::type_info &source_type() const BOOST_NOEXCEPT {
const type_info_t &source_type() const BOOST_NOEXCEPT {
return *source;
}

const std::type_info &target_type() const BOOST_NOEXCEPT {
const type_info_t &target_type() const BOOST_NOEXCEPT {
return *target;
}

private:
const std::type_info *source;
const std::type_info *target;
const type_info_t *source;
const type_info_t *target;
#endif
};

Expand Down