Use emplace() for associative containers.
* HACKING: Adjust requirements. g++4.8 is now OK for all our targets. * iface/dve2/dve2.cc, src/dstarparse/dstarparse.yy src/dstarparse/nsa2tgba.cc, src/graph/ngraph.hh, src/ltlast/atomic_prop.cc, src/ltlast/binop.cc, src/ltlast/bunop.cc, src/ltlast/multop.cc, src/ltlast/unop.cc, src/ltlvisit/mark.cc, src/ltlvisit/relabel.cc, src/taalgos/emptinessta.cc, src/taalgos/tgba2ta.cc, src/tgba/tgbaexplicit.hh, src/tgba/tgbagraph.hh, src/tgba/tgbasafracomplement.cc, src/tgba/tgbatba.cc, src/tgbaalgos/cycles.cc, src/tgbaalgos/degen.cc, src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc, src/tgbaalgos/emptiness.cc, src/tgbaalgos/gtec/gtec.cc, src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/magic.cc, src/tgbaalgos/ndfs_result.hxx, src/tgbaalgos/reachiter.cc, src/tgbaalgos/scc.cc, src/tgbaalgos/sccfilter.cc, src/tgbaalgos/se05.cc, src/tgbaalgos/simulation.cc, src/tgbaalgos/tau03.cc, src/tgbaalgos/tau03opt.cc, src/tgbaalgos/weight.cc: Use emplace() instead of insert(make_pair(...)) or insert(...::value_type(...)).
This commit is contained in:
parent
1eaaf8832a
commit
fd5fbda4dd
35 changed files with 77 additions and 104 deletions
23
HACKING
23
HACKING
|
|
@ -229,25 +229,12 @@ C++11
|
|||
-----
|
||||
|
||||
Spot uses some C++11 features, and therefore requires a C++11
|
||||
compiler. However (1) fully C++11-compliant compilers are
|
||||
not yet well deployed, and (2) development tools have yet
|
||||
to be updated to provide suitable C++11 support. For instance
|
||||
Swig 2.0, which we use for the Python bindings, does not
|
||||
understand C++11. The upcoming release of Swig 3 has better
|
||||
support for C++11, we should switch to it as soon as possible.
|
||||
compiler. The code relies on features that are not available in
|
||||
version of g++ older than 4.8, so this is our minimum requirement
|
||||
for now. Avoid features that require 4.9.
|
||||
|
||||
In the meantime, try to keep the C++11-specific syntax in the *.cc
|
||||
files as much as possible.
|
||||
|
||||
Use only C++11 features that are available in clang 3.1 and g++ 4.6:
|
||||
- http://gcc.gnu.org/projects/cxx0x.html
|
||||
- http://clang.llvm.org/cxx_status.html
|
||||
|
||||
Library interfaces that should not be used:
|
||||
- emplace() is not implemented for associative containers
|
||||
(std::map, std::set, and their unordered ffriends) is
|
||||
before g++ 4.8. Use
|
||||
x.insert(std::make_pair(...)) instead of x.emplace(...)
|
||||
Reasonably recent versions of clang should work as well. Our
|
||||
build farm has clang++ 3.5.
|
||||
|
||||
Encoding
|
||||
--------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue