mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 07:23:53 +01:00
ircd::util: Add template typedef convenience for std::pair.
This commit is contained in:
parent
3c8a8d01aa
commit
8058fbc6e9
2 changed files with 23 additions and 0 deletions
22
include/ircd/util/pair.h
Normal file
22
include/ircd/util/pair.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
// The Construct
|
||||
//
|
||||
// Copyright (C) The Construct Developers, Authors & Contributors
|
||||
// Copyright (C) 2016-2020 Jason Volk <jason@zemos.net>
|
||||
//
|
||||
// Permission to use, copy, modify, and/or distribute this software for any
|
||||
// purpose with or without fee is hereby granted, provided that the above
|
||||
// copyright notice and this permission notice is present in all copies. The
|
||||
// full license for this software is available in the LICENSE file.
|
||||
|
||||
#pragma once
|
||||
#define HAVE_IRCD_UTIL_PAIR_H
|
||||
|
||||
namespace ircd {
|
||||
inline namespace util
|
||||
{
|
||||
/// Simple gimmick to allow shorter declarations when both elements
|
||||
/// of a pair are the same.
|
||||
template<class A,
|
||||
class B = A>
|
||||
using pair = std::pair<A, B>;
|
||||
}}
|
|
@ -32,6 +32,7 @@ namespace ircd
|
|||
|
||||
#include "typography.h"
|
||||
#include "identity.h"
|
||||
#include "pair.h"
|
||||
#include "unit_literal.h"
|
||||
#include "construction.h"
|
||||
#include "unwind.h"
|
||||
|
|
Loading…
Reference in a new issue