Bugzilla – Full Text Bug Listing |
Summary: | examples/topology-read/topology-example-sim.cc uses variable length array | ||
---|---|---|---|
Product: | ns-3 | Reporter: | Quincy Tse <quincy.tse> |
Component: | examples | Assignee: | Josh Pelkey <jpelkey> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ns-bugs, tomh |
Priority: | P5 | ||
Version: | ns-3-dev | ||
Hardware: | All | ||
OS: | All | ||
Attachments: | Proposed patch. |
Description
Quincy Tse
2010-05-31 01:54:51 UTC
Created attachment 902 [details]
Proposed patch.
Are we making a decision here to say no to variable-length arrays in ns-3? (In reply to comment #2) > Are we making a decision here to say no to variable-length arrays in ns-3? I slightly lean towards this because it is not standard and there are other viable solutions in C++ (such as new[] or std::vector). If no other comments from developers I suggest to apply the patch and add this statement to the coding style: "variable-length arrays are not standards-compliant C++; use instead std::vector, std::string, or operator new[] when your code might call for a variable-length array." changeset: caa2dd9bbbce I also updated the webpage, changeset: f27e0846b0c4 |