Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
Vivy
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Wiki externe
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Elliu
Vivy
Validations
18ae278e
Vérifiée
Valider
18ae278e
rédigé
3 years ago
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
MISC: Add the string trait
parent
5582a9fe
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion
!21
Add clean logs support + dependent MR
Modifications
1
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
src/Lib/Utils.hh
+16
-0
16 ajouts, 0 suppression
src/Lib/Utils.hh
avec
16 ajouts
et
0 suppression
src/Lib/Utils.hh
+
16
−
0
Voir le fichier @
18ae278e
...
...
@@ -26,6 +26,7 @@
// Use chrono instead of std::chrono...
namespace
chrono
=
std
::
chrono
;
using
chrono
::
duration_cast
;
// Prety define for OpenMP's parallel for loop with indentation not fucked up
// by clang-format.
...
...
@@ -58,8 +59,23 @@ concept PropertyConstViewable = requires(T element)
// clang-format on
};
// Concept with a better name for inheritence between types
template
<
class
T
,
class
U
>
concept
Derived
=
std
::
is_base_of
<
U
,
T
>::
value
;
// Concept for string things
template
<
typename
T
>
concept
StringType
=
requires
(
T
str
)
{
// clang-format off
typename
T
::
iterator
;
// Can iterate
typename
T
::
value_type
;
// The `Char`
{
str
.
size
()
}
->
std
::
convertible_to
<
std
::
size_t
>
;
{
str
.
begin
()
}
->
std
::
same_as
<
typename
T
::
iterator
>
;
{
str
.
end
()
}
->
std
::
same_as
<
typename
T
::
iterator
>
;
{
str
[
0
]
}
->
std
::
same_as
<
typename
T
::
value_type
>
;
// clang-format on
};
}
namespace
Vivy
::
Utils
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter