Skip to content
Snippets Groups Projects

Remove compile order check

Closed Max Lyon requested to merge remove_compile_order_check into master

MeshIO.hh enforces that MeshIO.hh is included before any mesh type is included. I don't know why that is. I removed that check and in the unittests I included MeshIO.hh after the mesh types. Everything seems to work fine.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • I don't remember why this was enforced. I'm not sure if it's worth the risk removing it.

  • Author Developer

    I don't know if this is a problem for many people, but for me it caused a headache more than once.

    In a large project with some headers including MeshIO.hh and some including a mesh type it can be very hard to find a compilable include order for multiple of those files. Especially if MeshIO.hh is not included directly but only after a chain of several headers.

    A common style guide seems to be to order includes alphabetically. With the compile order check in MeshIO.hh this convention may be impossible to follow.

    I don't know what trouble the wrong include order may have caused in the past so it is hard to say whether the arguments above are worth taking the risk...

  • Jan Möbius mentioned in merge request !162 (merged)

    mentioned in merge request !162 (merged)

  • closed

  • I merged a warning instead of removing the check. If that warning does not create reports, we will remove it.

Please register or sign in to reply
Loading