Skip to content

Commit 47ebf32

Browse files
github-actions[bot]vinniefalco
authored andcommitted
Use <utility> instead of <functional> for std::reference_wrapper on C++20+
For C++20 and later, std::reference_wrapper is available in <utility>, which is a lighter-weight header than <functional>. Fixes #210 Co-authored-by: Vinnie Falco <vinniefalco@users.noreply.github.com>
1 parent bc956f7 commit 47ebf32

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/boost/http_proto/detail/type_traits.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
#ifndef BOOST_HTTP_PROTO_DETAIL_TYPE_TRAITS_HPP
1111
#define BOOST_HTTP_PROTO_DETAIL_TYPE_TRAITS_HPP
1212

13+
#if __cplusplus >= 202002L
14+
#include <utility>
15+
#else
1316
#include <functional>
17+
#endif
1418
#include <type_traits>
1519

1620
namespace boost {

0 commit comments

Comments
 (0)