Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

workaround for "incompatible string iterator" assertion triggered by default-constructed string iterators#565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
deanberris merged 2 commits intocpp-netlib:0.11-develfrommistafunk:0.11-devel
Oct 16, 2015
Merged
Changes from1 commit
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
NextNext commit
hack-fixed windows debug assertion "incompatible string iterators"
  • Loading branch information
@mistafunk
mistafunk committedOct 12, 2015
commit1ed82c51793016e5dd2381b461f4f1eb62a6ce7f
18 changes: 17 additions & 1 deletionboost/network/uri/uri.hpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -108,44 +108,60 @@ class BOOST_URI_DECL uri {
return uri_parts_.fragment ? uri_parts_.fragment.get() : const_range_type();
}

// hackfix by Simon Haegler, Esri R&D Zurich
// this workaround is needed to avoid running into the "incompatible string iterator" assertion
// triggered by the default-constructed string iterators employed by cpp-netlib (see uri.ipp qi::rule declarations)
#if defined(_MSC_VER) && defined(_DEBUG)
#define CATCH_EMPTY_ITERATOR_RANGE if (range.begin()._Getcont() == 0 || range.end()._Getcont() == 0) { return string_type(); }
#else
#define CATCH_EMPTY_ITERATOR_RANGE
#endif

string_type scheme() const {
const_range_type range = scheme_range();
return range ? string_type(boost::begin(range), boost::end(range))
CATCH_EMPTY_ITERATOR_RANGE
return range ? string_type(boost::begin(range), boost::end(range))
: string_type();
}

string_type user_info() const {
const_range_type range = user_info_range();
CATCH_EMPTY_ITERATOR_RANGE
return range ? string_type(boost::begin(range), boost::end(range))
: string_type();
}

string_type host() const {
const_range_type range = host_range();
CATCH_EMPTY_ITERATOR_RANGE
return range ? string_type(boost::begin(range), boost::end(range))
: string_type();
}

string_type port() const {
const_range_type range = port_range();
CATCH_EMPTY_ITERATOR_RANGE
return range ? string_type(boost::begin(range), boost::end(range))
: string_type();
}

string_type path() const {
const_range_type range = path_range();
CATCH_EMPTY_ITERATOR_RANGE
return range ? string_type(boost::begin(range), boost::end(range))
: string_type();
}

string_type query() const {
const_range_type range = query_range();
CATCH_EMPTY_ITERATOR_RANGE
return range ? string_type(boost::begin(range), boost::end(range))
: string_type();
}

string_type fragment() const {
const_range_type range = fragment_range();
CATCH_EMPTY_ITERATOR_RANGE
return range ? string_type(boost::begin(range), boost::end(range))
: string_type();
}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp