mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add first, second free-function
add string::find
This commit is contained in:
parent
5ce2cb023c
commit
35f08fe242
13 changed files with 611 additions and 383 deletions
29
sprout/utility/pair/make_pair.hpp
Normal file
29
sprout/utility/pair/make_pair.hpp
Normal file
|
@ -0,0 +1,29 @@
|
|||
#ifndef SPROUT_UTILITY_PAIR_MAKE_PAIR_HPP
|
||||
#define SPROUT_UTILITY_PAIR_MAKE_PAIR_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/utility/forward.hpp>
|
||||
#include <sprout/utility/pair/pair.hpp>
|
||||
#include <sprout/functional/ref.hpp>
|
||||
|
||||
namespace sprout {
|
||||
//
|
||||
// make_pair
|
||||
//
|
||||
template<typename T1, typename T2>
|
||||
inline SPROUT_CONSTEXPR sprout::pair<
|
||||
typename sprout::strip_reference<typename std::decay<T1>::type>::type,
|
||||
typename sprout::strip_reference<typename std::decay<T2>::type>::type
|
||||
>
|
||||
make_pair(T1&& x, T2&& y) {
|
||||
return sprout::pair<
|
||||
typename sprout::strip_reference<typename std::decay<T1>::type>::type,
|
||||
typename sprout::strip_reference<typename std::decay<T2>::type>::type
|
||||
>(
|
||||
sprout::forward<T1>(x),
|
||||
sprout::forward<T2>(y)
|
||||
);
|
||||
}
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_UTILITY_PAIR_MAKE_PAIR_HPP
|
Loading…
Add table
Add a link
Reference in a new issue