Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. [Q]: Number of overloaded functions...

[Q]: Number of overloaded functions...

Scheduled Pinned Locked Moved C / C++ / MFC
questioncsharpcomtools
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rbid
    wrote on last edited by
    #1

    Hello, I got some code that overloads the use of overloading functions. What is the maximum number of overloaded functions a function can have in VC 7.1 (.NET 2003)?

    void GetValue(bool &isValue, UINT keyId, UINT sectionId);
    void GetValue(bool &isValue, const CString& keyName, UINT sectionId);
    void GetValue(bool &isValue, UINT keyId, const CString& sectionName);
    void GetValue(bool &isValue, const CString& keyName, const CString& sectionName);
    ...
    // Repeat the above 4 for char, unsigned char, short, unsigned short,
    // int, unsigned int, double, __int64
    ...
    void GetValue(__int64 &value, const CString& keyName, const CString& sectionName);

    Intellicense of VC recognices only the first 12 overloaded signatures, when expanding with CTRL-Space. Compilation is O.K even with a highest warning level, which does not hide the possibility that the compiler is casting the values of the last overloaded functions. Running PC-Lint gives some warnings as only 12 overloaded signatures are present. Any comment? --- Rbid. (I'm not the one that loves to overload!) -- **Ricky Marek** (_AKA: rbid_) -- "Things are only impossible until they are not" --- Jean-Luc Picard My articles

    D 1 Reply Last reply
    0
    • R rbid

      Hello, I got some code that overloads the use of overloading functions. What is the maximum number of overloaded functions a function can have in VC 7.1 (.NET 2003)?

      void GetValue(bool &isValue, UINT keyId, UINT sectionId);
      void GetValue(bool &isValue, const CString& keyName, UINT sectionId);
      void GetValue(bool &isValue, UINT keyId, const CString& sectionName);
      void GetValue(bool &isValue, const CString& keyName, const CString& sectionName);
      ...
      // Repeat the above 4 for char, unsigned char, short, unsigned short,
      // int, unsigned int, double, __int64
      ...
      void GetValue(__int64 &value, const CString& keyName, const CString& sectionName);

      Intellicense of VC recognices only the first 12 overloaded signatures, when expanding with CTRL-Space. Compilation is O.K even with a highest warning level, which does not hide the possibility that the compiler is casting the values of the last overloaded functions. Running PC-Lint gives some warnings as only 12 overloaded signatures are present. Any comment? --- Rbid. (I'm not the one that loves to overload!) -- **Ricky Marek** (_AKA: rbid_) -- "Things are only impossible until they are not" --- Jean-Luc Picard My articles

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      I'm not sure about VC 7.1 but with VS6, I have a class with two methods, each overloaded several dozens of times. Twelve seems awfully skimpy.


      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups