mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
porting sscrisk/CEL
This commit is contained in:
parent
ad60c8c530
commit
db20f64991
181 changed files with 2531 additions and 607 deletions
38
sprout/utility/pair.hpp
Normal file
38
sprout/utility/pair.hpp
Normal file
|
@ -0,0 +1,38 @@
|
|||
#ifndef SPROUT_UTILITY_PAIR_HPP
|
||||
#define SPROUT_UTILITY_PAIR_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
|
||||
namespace sprout {
|
||||
// Copyright (C) 2011 RiSK (sscrisk)
|
||||
|
||||
//
|
||||
// pair
|
||||
//
|
||||
template <typename T1, typename T2>
|
||||
struct pair {
|
||||
public:
|
||||
typedef T1 first_type;
|
||||
typedef T2 second_type;
|
||||
public:
|
||||
T1 first;
|
||||
T2 second;
|
||||
public:
|
||||
SPROUT_CONSTEXPR pair(pair const&) = default;
|
||||
SPROUT_CONSTEXPR pair()
|
||||
: first()
|
||||
, second()
|
||||
{}
|
||||
SPROUT_CONSTEXPR pair(T1 const& x, T2 const& y)
|
||||
: first(x)
|
||||
, second(y)
|
||||
{}
|
||||
template<typename U, typename V>
|
||||
SPROUT_CONSTEXPR pair(sprout::pair<U, V> const& p)
|
||||
: first(p.first)
|
||||
, second(p.second)
|
||||
{}
|
||||
};
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_UTILITY_PAIR_HPP
|
Loading…
Add table
Add a link
Reference in a new issue