mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +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:
parent
9c209b8079
commit
0c424c4dab
Notes:
sideshowbarker
2024-07-17 22:22:30 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/0c424c4dabf Pull-request: https://github.com/SerenityOS/serenity/pull/11355 Reviewed-by: https://github.com/IdanHo ✅ Reviewed-by: https://github.com/trflynn89
1 changed files with 19 additions and 0 deletions
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>;
|
||||
|
||||
}
|
Loading…
Reference in a new issue