where is the definition?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jim Z. Shi

    #1

    where is the definition?

    hi, all
    i looked through <stl_deque.hf or some reason, but i can not find the
    definition of the method `erase()', there are just two declaration:
    //----------------------------------
    iterator
    erase(iterator __first, iterator __last);

    iterator
    erase(iterator __position);
    //----------------------------------

    where is the definition?

    thanks,
    Jim
  • Tonni Tielens

    #2
    Re: where is the definition?

    On Sep 23, 11:53 am, "Jim Z. Shi" <ji...@cisco.co mwrote:
    where is the definition?
    Depends on the compiler. The definition can be in a precompiled
    library or in a seperate source file.

    Comment

    • James Kanze

      #3
      Re: where is the definition?

      On Sep 23, 3:44 pm, Tonni Tielens <tonnitiel...@g mail.comwrote:
      On Sep 23, 11:53 am, "Jim Z. Shi" <ji...@cisco.co mwrote:
      where is the definition?
      Depends on the compiler. The definition can be in a
      precompiled library or in a seperate source file.
      Or built into the compiler, or in a database somewhere, or
      whatever the implementation wants. The name of the file he gave
      reminds me of g++, however, where the standard library is in
      files, with most of the actual code in a sub-directory bits,
      with the class definitions and inline functions in .h files and
      the template implementations in .tcc files. If the original
      poster is asking about g++, given that there is a file
      bits/deque.tcc, that's where I'd look.

      More generally, if I want to find out about the actual contents
      of a header, I'll write a one line program which includes it;
      most compilers have an option which will generate the
      preprocessor output (usually -E or /E), which will contain the
      code (with all macros expanded) and #line declarations
      specifying where it comes from.

      --
      James Kanze (GABI Software) email:james.kan ze@gmail.com
      Conseils en informatique orientée objet/
      Beratung in objektorientier ter Datenverarbeitu ng
      9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

      Comment

      • Jim Z. Shi

        #4
        Re: where is the definition?



        James Kanze wrote:
        On Sep 23, 3:44 pm, Tonni Tielens <tonnitiel...@g mail.comwrote:
        >On Sep 23, 11:53 am, "Jim Z. Shi" <ji...@cisco.co mwrote:
        More generally, if I want to find out about the actual contents
        of a header, I'll write a one line program which includes it;
        most compilers have an option which will generate the
        preprocessor output (usually -E or /E), which will contain the
        code (with all macros expanded) and #line declarations
        specifying where it comes from.
        :)

        this helps a lot.

        thanks,
        Jim

        Comment

        Working...