mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-04-23 21:14:31 +00:00
LibCrypto: Add the BigInteger concept
This makes it much easier to write (template) functions that accept either a signed or unsigned bigint parameter.
This commit is contained in:
19
Userland/Libraries/LibCrypto/Forward.h
Normal file
19
Userland/Libraries/LibCrypto/Forward.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright (c) 2021, the SerenityOS developers.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Concepts.h>
|
||||
|
||||
namespace Crypto {
|
||||
|
||||
class SignedBigInteger;
|
||||
class UnsignedBigInteger;
|
||||
|
||||
template<typename T>
|
||||
concept BigInteger = IsSame<T, SignedBigInteger> || IsSame<T, UnsignedBigInteger>;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user