mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
source: fix compilation with Boost 1.71.0 beta 1
Due to argument-dependent lookup rules the `boost::algorithm::split` function has always been considered by the compiler when resolving an unqualified call to `split`. Before Boost 1.71.0 the `boost::algorithm::split` function took an lvalue reference as its `Input` argument. Therefore a temporary instance of `std::string` would cause `boost::algorithm::split` not to be considered due to SFINAE, and the compiler would keep looking, finally finding the top-level `split` function. In Boost 1.71.0 the first argument was changed to an rvalue reference. Therefore the temporary `std::string` instance is now a valid argument to the function, and the compiler considers `boost::algorithm::split` to be a possible call. Other functions aren't looked up. The fix is easy: just be explicit which namespace to take the symbol from. That way argument-dependent lookup will not be done. Fixes #2599.
This commit is contained in:
parent
39f7b45d9f
commit
02a074b61f
4
NEWS.md
4
NEWS.md
@ -5,6 +5,10 @@
|
||||
* mkvmerge: mkvmerge now allows appending AV1, VP8, VP9, h.264/AVC and
|
||||
h.265/HEVC tracks whose pixel dimensions differ. Implements #2582.
|
||||
|
||||
## Bug fixes
|
||||
|
||||
* source code: fixed building with Boost 1.71.0. Fixes #2599.
|
||||
|
||||
|
||||
# Version 35.0.0 "All The Love In The World" 2019-06-22
|
||||
|
||||
|
@ -29,7 +29,7 @@ inline std::vector<std::string>
|
||||
split(std::string const &text,
|
||||
std::string const &pattern = ",",
|
||||
size_t max = 0) {
|
||||
return split(text, boost::regex("\\Q"s + pattern, boost::regex::perl), max);
|
||||
return ::split(text, boost::regex("\\Q"s + pattern, boost::regex::perl), max);
|
||||
}
|
||||
|
||||
void strip(std::string &s, bool newlines = false);
|
||||
|
Loading…
Reference in New Issue
Block a user