In C++03 there are no <vectorfwd>
-like files, while there is the <iosfwd>
header. Will this change in the future?
It could be valuable to reduce dependencies and for better modularity.
UPDATE:
I have received an answer from the language creator: "practically it's not possible to require this from all STL vendors".
The interface of C++ standard library is defined by the following collection of headers. For some of the C standard library headers of the form xxx.h, the C++ standard library both includes an identically-named header and another header of the form cxxx (all meaningful cxxx headers are listed above).
Forward Declaration refers to the beforehand declaration of the syntax or signature of an identifier, variable, function, class, etc. prior to its usage (done later in the program). Example: In C++, Forward declarations are usually used for Classes.
The C++ Standard requires that the C Standard headers declare all external names in namespace std, then hoist them into the global namespace with individual using declarations for each of the names. But in some translation environments the C Standard headers include no namespace declarations, declaring all names directly in the global namespace.
The C++ standard library provides the C++ library headers and additional C++ headers for C library facilities (see ' headers ' page for descriptions): A freestanding implementation has an implementation-defined set of headers, see here for the minimal requirement on the set of headers.
No, there are no new forward files, just the old <iosfwd>
.
The complete I/O-system is large compared to a vector, so the advantage would perhaps not be that significant.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With