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
3Copyright 2025 Matthew Tolman
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16
17*/
18
19#ifndef MTCORE_PAIR_HPP
20#define MTCORE_PAIR_HPP
21
22namespace mtcore {
30 template<typename T1, typename T2>
31 struct Pair {
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
Pair< T1, T2 > make_pair(T1 first, T2 second)
Helper to make a pair with type inference.
Definition pair.hpp:45
Core library for C++ with Zig-related functionality.
Represents a pair of elements Useful to avoid having to have many micro structs.
Definition pair.hpp:31