You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// file: H5*.hpp
// A carefully curated list of HighFive includes.
namespace HighFive {
// declarations.
}
// All definitions go here:
#include "bits/H5*_misc.hpp"
This has certain consequences, such as a not entirely obvious include graph and users can't just include what they need. Users that would like to reduce compilation times would need to be able to pick between declarations and definitions.
The structure I'd like to move towards is that for every public class we have the following files:
One file for forward declarations *_fwd.hpp
One file for declarations *_decl.hpp
One file for non-template definitions *_defn.hpp
One file for template definitions *_tmpl.hpp
One file without suffix that includes the previous four.
Not very picky users would include either highfive/highfive.hpp or highfive/H5{File,Group,Attribute,...}.hpp.
Since we now split decl from defn we can include at the top the declarations or forward declarations we need. There's no need for including at the end of the file anymore. As a consequence the correct ordering of which file to include when happens automatically.
Moreover, this should allow users to compile HighFive and only expose the declarations (and template definitions) in their headers.
This would not cause (m)any change to existing code that include highfive/H5File,Group,...}.hpp carefully and no changes to code that include highfive/highfive.hpp.
The text was updated successfully, but these errors were encountered:
1uc
added
the
v3
Anything that needs to be resolved before `v3`.
label
Nov 27, 2023
Headers currently follow the pattern:
This has certain consequences, such as a not entirely obvious include graph and users can't just include what they need. Users that would like to reduce compilation times would need to be able to pick between declarations and definitions.
The structure I'd like to move towards is that for every public class we have the following files:
*_fwd.hpp
*_decl.hpp
*_defn.hpp
*_tmpl.hpp
Not very picky users would include either
highfive/highfive.hpp
orhighfive/H5{File,Group,Attribute,...}.hpp
.Since we now split decl from defn we can include at the top the declarations or forward declarations we need. There's no need for including at the end of the file anymore. As a consequence the correct ordering of which file to include when happens automatically.
Moreover, this should allow users to compile HighFive and only expose the declarations (and template definitions) in their headers.
This would not cause (m)any change to existing code that include
highfive/H5File,Group,...}.hpp
carefully and no changes to code that includehighfive/highfive.hpp
.The text was updated successfully, but these errors were encountered: