Search code examples
c++d

D operators that are not in C++


Are there any operators in D that are not in C++?


Solution

  • Here is a list of some D tokens

    /=
    .
    ..
    ...
    &
    &=
    &&
    |
    |=
    ||
    -
    -=
    --
    +
    +=
    ++
    <
    <=
    <<
    <<=
    <>
    <>=
    >
    >=
    >>=
    >>>=
    >>
    >>>
    !
    !=
    !<>
    !<>=
    !<
    !<=
    !>
    !>=
    (
    )
    [
    ]
    {
    }
    ?
    ,
    ;
    :
    $
    =
    ==
    *
    *=
    %
    %=
    ^
    ^=
    ~
    ~=
    

    Those for example:

    <>
    <>=
    !<>
    !<>=
    !<
    !<=
    !>
    !>=
    

    are special operators to compare floating point variables. You can find the description of them here http://www.digitalmars.com/d/1.0/expression.html

    There are also the

    is 
    !is
    in
    !in
    typeof
    

    operators.