work around gcc 8.2.1+ bug #89303

Do not call std::make_shared on classes inheriting from
std::enable_shared_from_this when compiling with g++ 8.2.

* NEWS: Mention the bug.
* spot/misc/common.hh (SPOT_make_shared_enabled__): New macro.
* spot/twa/twagraph.cc, spot/twa/twagraph.hh, spot/twa/twaproduct.hh,
spot/twa/taatgba.hh, spot/twaalgos/couvreurnew.cc,
spot/twaalgos/magic.cc, spot/twaalgos/se05.cc, spot/twaalgos/tau03.cc,
spot/twaalgos/tau03opt.cc, spot/twaalgos/gv04.cc,
spot/ltsmin/ltsmin.cc, spot/twaalgos/gtec/gtec.cc: Use it.
This commit is contained in:
Alexandre Duret-Lutz 2019-02-12 17:58:38 +01:00
parent d0b9806500
commit a86925e20e
14 changed files with 105 additions and 58 deletions

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2011, 2013-2018 Laboratoire de recherche et
// Copyright (C) 2011, 2013-2019 Laboratoire de recherche et
// développement de l'Epita (LRDE).
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
@ -588,14 +588,18 @@ namespace spot
emptiness_check_ptr
explicit_magic_search(const const_twa_ptr& a, option_map o)
{
return std::make_shared<magic_search_<explicit_magic_search_heap>>(a, 0, o);
return
SPOT_make_shared_enabled__(magic_search_<explicit_magic_search_heap>,
a, 0, o);
}
emptiness_check_ptr
bit_state_hashing_magic_search(const const_twa_ptr& a,
size_t size, option_map o)
{
return std::make_shared<magic_search_<bsh_magic_search_heap>>(a, size, o);
return
SPOT_make_shared_enabled__(magic_search_<bsh_magic_search_heap>,
a, size, o);
}
emptiness_check_ptr