File: operatorsubis.cc

package info (click to toggle)
bisonc%2B%2B 4.09.02-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,412 kB
  • ctags: 2,871
  • sloc: cpp: 9,459; ansic: 1,434; makefile: 1,091; sh: 286; yacc: 84; lex: 60
file content (16 lines) | stat: -rw-r--r-- 423 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "lookaheadset.ih"

LookaheadSet &LookaheadSet::operator-=(LookaheadSet const &other)
{
    std::set<Element const *> difference;

    set_difference(begin(), end(), other.begin(), other.end(),
                    inserter(difference, difference.begin()));

    *reinterpret_cast<std::set<Element const *> *>(this) = difference;

    if (other.d_EOF == e_withEOF)
        d_EOF = e_withoutEOF;

    return *this;
}