MT Core (C++)
Core library for replacing C++ standard in project usage
Loading...
Searching...
No Matches
pair.hpp
Go to the documentation of this file.
1
/*
2
3
Copyright 2025 Matthew Tolman
4
5
Licensed under the Apache License, Version 2.0 (the "License");
6
you may not use this file except in compliance with the License.
7
You may obtain a copy of the License at
8
9
http://www.apache.org/licenses/LICENSE-2.0
10
11
Unless required by applicable law or agreed to in writing, software
12
distributed under the License is distributed on an "AS IS" BASIS,
13
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
See the License for the specific language governing permissions and
15
limitations under the License.
16
17
*/
18
19
#ifndef MTCORE_PAIR_HPP
20
#define MTCORE_PAIR_HPP
21
22
namespace
mtcore
{
30
template
<
typename
T1,
typename
T2>
31
struct
Pair
{
32
T1
first
;
33
T2
second
;
34
};
35
44
template
<
typename
T1,
typename
T2>
45
Pair<T1, T2>
make_pair
(T1 first, T2 second) {
46
return
{first, second};
47
}
48
}
// namespace mtcore
49
50
#endif
// MTCORE_PAIR_HPP
mtcore::make_pair
Pair< T1, T2 > make_pair(T1 first, T2 second)
Helper to make a pair with type inference.
Definition
pair.hpp:45
mtcore
Core library for C++ with Zig-related functionality.
Definition
core/mtcore/alloc.hpp:45
mtcore::Pair
Represents a pair of elements Useful to avoid having to have many micro structs.
Definition
pair.hpp:31
mtcore::Pair::first
T1 first
Definition
pair.hpp:32
mtcore::Pair::second
T2 second
Definition
pair.hpp:33
include
core
mtcore
colls
pair.hpp
Generated on Wed Jun 11 2025 16:20:21 for MT Core (C++) by
1.13.2