Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. PDAL_DLL inline std::string::size_type
  2. extractSpaces(const std::string& s, std::string::size_type p)
  3. // { return extract(s, p, (int(*)(int))std::isspace); }
  4. { return extract(s, p, [](int i){return i == ' ';}); }
  5.  
  6. When I compile this on gcc 7.4 I get:
  7.  
  8. /home/acbell/pdalinstall/include/pdal/util/Utils.hpp:475:5: warning: mangled name for ‘std::__cxx11::basic_string<char>::size_type pdal::Utils::extract(const string&, std::__cxx11::basic_string<char>::size_type, PREDICATE) [with PREDICATE = int (*)(int) throw ()]’ will change in C++17 because the exception specification is part of a function type [-Wnoexcept-type]
  9.  
  10. with the first version of the extract, but not the second. This seems strange. Why would the compiler think that the pointer to the function I'm providing throws?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement