HotSpot Style Guide promotes putting implementation in headers

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 16
    • Component/s: hotspot

      The Style Guide currently says:

        Put a member function `FooBar::bang` into the same file that
        defined `FooBar`, or its associated *.cpp file.

      It probably shouldn't promote putting the implementation in the header. But there is also this:

        * Do not put non-trivial function implementations in .hpp files. If
        the implementation depends on other .hpp files, put it in a .cpp or
        a .inline.hpp file.

      However, the trend toward lots of .inline.hpp files is not necessarily good either, especially since we may not be using them properly. But that may be a separate discussion.

      Probably those two quoted sections should be merged or linked in some way, in additional to any content changes.

            Assignee:
            Unassigned
            Reporter:
            Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: