[cig-commits] [commit] baagaard/fix-arrayfwd-std: Remove forward declaration of std objects from arrayfwd.hh. (3258d55)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Thu Jan 29 17:30:06 PST 2015
Repository : https://github.com/geodynamics/pylith
On branch : baagaard/fix-arrayfwd-std
Link : https://github.com/geodynamics/pylith/compare/0000000000000000000000000000000000000000...3258d555af8282716e5e59e16ae43985af2f1949
>---------------------------------------------------------------
commit 3258d555af8282716e5e59e16ae43985af2f1949
Author: Brad Aagaard <baagaard at usgs.gov>
Date: Thu Jan 29 17:29:38 2015 -0800
Remove forward declaration of std objects from arrayfwd.hh.
C++ standard forbids forward declaration of std namespace objects like
std::vector. Some compilers/preprocessors cache that type of
information.
>---------------------------------------------------------------
3258d555af8282716e5e59e16ae43985af2f1949
libsrc/pylith/utils/arrayfwd.hh | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/libsrc/pylith/utils/arrayfwd.hh b/libsrc/pylith/utils/arrayfwd.hh
index 9603609..59272a9 100644
--- a/libsrc/pylith/utils/arrayfwd.hh
+++ b/libsrc/pylith/utils/arrayfwd.hh
@@ -21,7 +21,7 @@
*
* @brief Forward declarations for PyLith array objects.
*
- * These are generally just forward declarations for C++ STL objects.
+ * These are generally just typenames for C++ STL objects.
*
* For simple types (i.e., int and PylithScalar) std::valarray provides some
* features that std::vector does not have, such as operating on the
@@ -37,18 +37,6 @@
#include <vector> // USES std::vector
#include <valarray> // USES std::valarray
-#if 0
-/// Forward declaration of STL vector
-namespace std {
- // std::vector
- template<typename T> class allocator;
- template<typename T, typename U> class vector;
-
- // std::valarray
- template<typename T> class valarray;
-} // std
-#endif
-
/// Aliases
namespace pylith {
/// Alias for std::vector<int>
More information about the CIG-COMMITS
mailing list