Skip to content

Commit e55e9f2

Browse files
authored
Merge pull request #42 from djw8605/fix-function-ptr
Fixing function pointers depreciated in c++11, but makes the build re…
2 parents 782d860 + 6caa5b5 commit e55e9f2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/scitokens_internal.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
#include <memory>
33
#include <sstream>
4+
#include <functional>
45

56
#include <curl/curl.h>
67
#include <jwt-cpp/base.h>
@@ -100,7 +101,7 @@ parse_url(const std::string &url, std::string &schema, std::string &netloc,
100101
schema.reserve(distance(url.begin(), prot_iter));
101102
std::transform(url.begin(), prot_iter,
102103
std::back_inserter(schema),
103-
std::ptr_fun<int,int>(tolower));
104+
std::function<int(int)>(tolower));
104105
if (prot_iter == url.end() )
105106
{
106107
throw InvalidIssuerException("Issuer URL missing hostname.");
@@ -110,7 +111,7 @@ parse_url(const std::string &url, std::string &schema, std::string &netloc,
110111
netloc.reserve(std::distance(prot_iter, path_iter));
111112
std::transform(prot_iter, path_iter,
112113
std::back_inserter(netloc),
113-
std::ptr_fun<int,int>(tolower));
114+
std::function<int(int)>(tolower));
114115
std::string::const_iterator query_iter = std::find(path_iter, url.end(), '?');
115116
path.assign(path_iter, query_iter);
116117
}

0 commit comments

Comments
 (0)