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:
parent
d0b9806500
commit
a86925e20e
14 changed files with 105 additions and 58 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2016-2018 Laboratoire de Recherche et Développement
|
||||
// Copyright (C) 2016-2019 Laboratoire de Recherche et Développement
|
||||
// de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -850,29 +850,38 @@ namespace spot
|
|||
|
||||
} // anonymous namespace
|
||||
|
||||
template<twa_strength strength>
|
||||
using cna = couvreur99_new<false, strength>;
|
||||
template<twa_strength strength>
|
||||
using cne = couvreur99_new<true, strength>;
|
||||
|
||||
emptiness_check_ptr
|
||||
get_couvreur99_new_abstract(const const_twa_ptr& a, option_map o)
|
||||
{
|
||||
// NB: The order of the if's matter.
|
||||
if (a->prop_terminal())
|
||||
return SPOT_make_shared_enabled__(cna<TERMINAL>, a, o);
|
||||
if (a->prop_weak())
|
||||
return SPOT_make_shared_enabled__(cna<WEAK>, a, o);
|
||||
return SPOT_make_shared_enabled__(cna<STRONG>, a, o);
|
||||
}
|
||||
|
||||
emptiness_check_ptr
|
||||
get_couvreur99_new(const const_twa_ptr& a, spot::option_map o)
|
||||
{
|
||||
const_twa_graph_ptr ag = std::dynamic_pointer_cast<const twa_graph>(a);
|
||||
if (ag)
|
||||
// the automaton is explicit
|
||||
if (ag) // the automaton is explicit
|
||||
{
|
||||
// NB: The order of the if's matter.
|
||||
if (a->prop_terminal())
|
||||
return std::make_shared<couvreur99_new<true, TERMINAL>>(ag, o);
|
||||
return SPOT_make_shared_enabled__(cne<TERMINAL>, ag, o);
|
||||
if (a->prop_weak())
|
||||
return std::make_shared<couvreur99_new<true, WEAK>>(ag, o);
|
||||
return std::make_shared<couvreur99_new<true, STRONG>>(ag, o);
|
||||
return SPOT_make_shared_enabled__(cne<WEAK>, ag, o);
|
||||
return SPOT_make_shared_enabled__(cne<STRONG>, ag, o);
|
||||
}
|
||||
else
|
||||
// the automaton is abstract
|
||||
else // the automaton is abstract
|
||||
{
|
||||
// NB: The order of the if's matter.
|
||||
if (a->prop_terminal())
|
||||
return std::make_shared<couvreur99_new<false, TERMINAL>>(a, o);
|
||||
if (a->prop_weak())
|
||||
return std::make_shared<couvreur99_new<false, WEAK>>(a, o);
|
||||
return std::make_shared<couvreur99_new<false, STRONG>>(a, o);
|
||||
return get_couvreur99_new_abstract(a, o);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -882,14 +891,4 @@ namespace spot
|
|||
return get_couvreur99_new(a, spot::option_map())->check();
|
||||
}
|
||||
|
||||
emptiness_check_ptr
|
||||
get_couvreur99_new_abstract(const const_twa_ptr& a, option_map o)
|
||||
{
|
||||
if (a->prop_terminal())
|
||||
return std::make_shared<couvreur99_new<false, TERMINAL>>(a, o);
|
||||
if (a->prop_weak())
|
||||
return std::make_shared<couvreur99_new<false, WEAK>>(a, o);
|
||||
return std::make_shared<couvreur99_new<false, STRONG>>(a, o);
|
||||
}
|
||||
|
||||
} // namespace spot
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2008, 2011, 2014-2016, 2018 Laboratoire de Recherche
|
||||
// et Développement de l'Epita (LRDE).
|
||||
// Copyright (C) 2008, 2011, 2014-2016, 2018-2019 Laboratoire de
|
||||
// Recherche et Développement de l'Epita (LRDE).
|
||||
// Copyright (C) 2003, 2004, 2005, 2006 Laboratoire d'Informatique de
|
||||
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||
// Université Pierre et Marie Curie.
|
||||
|
|
@ -613,8 +613,8 @@ namespace spot
|
|||
couvreur99(const const_twa_ptr& a, option_map o)
|
||||
{
|
||||
if (o.get("shy"))
|
||||
return std::make_shared<couvreur99_check_shy>(a, o);
|
||||
return std::make_shared<couvreur99_check>(a, o);
|
||||
return SPOT_make_shared_enabled__(couvreur99_check_shy, a, o);
|
||||
return SPOT_make_shared_enabled__(couvreur99_check, a, o);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2008, 2010, 2011, 2013-2018 Laboratoire de
|
||||
// Copyright (C) 2008, 2010, 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é
|
||||
|
|
@ -411,6 +411,6 @@ namespace spot
|
|||
emptiness_check_ptr
|
||||
explicit_gv04_check(const const_twa_ptr& a, option_map o)
|
||||
{
|
||||
return std::make_shared<gv04>(a, o);
|
||||
return SPOT_make_shared_enabled__(gv04, a, o);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -680,14 +680,18 @@ namespace spot
|
|||
emptiness_check_ptr
|
||||
explicit_se05_search(const const_twa_ptr& a, option_map o)
|
||||
{
|
||||
return std::make_shared<se05_search<explicit_se05_search_heap>>(a, 0, o);
|
||||
return
|
||||
SPOT_make_shared_enabled__(se05_search<explicit_se05_search_heap>,
|
||||
a, 0, o);
|
||||
}
|
||||
|
||||
emptiness_check_ptr
|
||||
bit_state_hashing_se05_search(const const_twa_ptr& a,
|
||||
size_t size, option_map o)
|
||||
{
|
||||
return std::make_shared<se05_search<bsh_se05_search_heap>>(a, size, o);
|
||||
return
|
||||
SPOT_make_shared_enabled__(se05_search<bsh_se05_search_heap>,
|
||||
a, size, o);
|
||||
}
|
||||
|
||||
emptiness_check_ptr
|
||||
|
|
|
|||
|
|
@ -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
|
||||
// Developpement 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
|
||||
|
|
@ -376,7 +376,9 @@ namespace spot
|
|||
emptiness_check_ptr
|
||||
explicit_tau03_search(const const_twa_ptr& a, option_map o)
|
||||
{
|
||||
return std::make_shared<tau03_search<explicit_tau03_search_heap>>(a, 0, o);
|
||||
return
|
||||
SPOT_make_shared_enabled__(tau03_search<explicit_tau03_search_heap>,
|
||||
a, 0, o);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -563,9 +563,8 @@ namespace spot
|
|||
emptiness_check_ptr
|
||||
explicit_tau03_opt_search(const const_twa_ptr& a, option_map o)
|
||||
{
|
||||
return
|
||||
std::make_shared<tau03_opt_search<explicit_tau03_opt_search_heap>>(a,
|
||||
0, o);
|
||||
return SPOT_make_shared_enabled__
|
||||
(tau03_opt_search<explicit_tau03_opt_search_heap>, a, 0, o);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue