boilerplate ~master (2021-05-11T08:52:50Z)
Dub
Repo
hasOwnFunction
boilerplate
autostring
Undocumented in source.
template
hasOwnFunction (
Aggregate
Super
string
Name
Type
) {
import
std
.
meta
:
AliasSeq
,
Filter
;
;
import
std
.
traits
:
Unqual
;
;
eponymoustemplate
FunctionMatchesType
(alias Fun)
;
alias
MyFunctions
=
AliasSeq
!(
__traits
(
getOverloads
,
Aggregate
,
Name
))
;
alias
MatchingFunctions
=
Filter
!(
FunctionMatchesType
,
MyFunctions
)
;
enum
hasFunction
;
alias
SuperFunctions
=
AliasSeq
!(
__traits
(
getOverloads
,
Super
,
Name
))
;
alias
SuperMatchingFunctions
=
Filter
!(
FunctionMatchesType
,
SuperFunctions
)
;
enum
superHasFunction
;
static if
(
hasFunction
)
static if
(
superHasFunction
)
enum
hasOwnFunction
;
static if
(
hasFunction
)
static if
(!(
superHasFunction
))
enum
hasOwnFunction
;
static if
(!(
hasFunction
))
enum
hasOwnFunction
;
}
Members
Aliases
MatchingFunctions
alias
MatchingFunctions
=
Filter
!(
FunctionMatchesType
,
MyFunctions
)
Undocumented in source.
MyFunctions
alias
MyFunctions
=
AliasSeq
!(
__traits
(
getOverloads
,
Aggregate
,
Name
))
Undocumented in source.
SuperFunctions
alias
SuperFunctions
=
AliasSeq
!(
__traits
(
getOverloads
,
Super
,
Name
))
Undocumented in source.
SuperMatchingFunctions
alias
SuperMatchingFunctions
=
Filter
!(
FunctionMatchesType
,
SuperFunctions
)
Undocumented in source.
Enums
FunctionMatchesType
eponymoustemplate
FunctionMatchesType
(alias Fun)
Undocumented in source.
Manifest constants
hasFunction
enum
hasFunction
;
Undocumented in source.
hasOwnFunction
enum
hasOwnFunction
;
Undocumented in source.
hasOwnFunction
enum
hasOwnFunction
;
Undocumented in source.
hasOwnFunction
enum
hasOwnFunction
;
Undocumented in source.
superHasFunction
enum
superHasFunction
;
Undocumented in source.
Meta
Source
See Implementation
boilerplate
autostring
enums
ToStringEnum
functions
isMemberUnlabeledByDefault
mixin templates
GenerateToStringTemplate
structs
ToString
ToStringHandler
templates
checkAttributeConsistency
hasOwnFunction
hasOwnStringToString
hasOwnVoidToString
isFromAliasThis
typeName
variables
GenerateToString