What is a predicate?

前端 未结 12 1718
无人及你
无人及你 2020-12-04 12:16

Being a hobbyist coder, I\'m lacking some fundamental knowledge. For the last couple days I\'ve been reading some stuff and the word \"predicate\" keeps reappearing. I\'d ve

12条回答
  •  抹茶落季
    2020-12-04 12:42

    From C++ Primer 5th (§10.3.1):

    A predicate is an expression that can be called and that returns a value that can be used as a condition.

    Also from chapter Defined Terms section:

    predicate : Function that returns a type that can be converted to bool.

提交回复
热议问题