+++ /dev/null
-// ------------------------------------------------------------------------
-//
-// SPDX-License-Identifier: LGPL-2.1-or-later
-// Copyright (C) 2018 - 2023 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// Part of the source code is dual licensed under Apache-2.0 WITH
-// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
-// governing the source code and code contributions can be found in
-// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
-//
-// ------------------------------------------------------------------------
-
-
-
-// check that unsubscribing with a wrong id is handled correctly
-
-
-#include <deal.II/base/enable_observer_pointer.h>
-#include <deal.II/base/observer_pointer.h>
-
-#include <iostream>
-#include <vector>
-
-#include "../tests.h"
-
-class Test : public EnableObserverPointer
-{};
-
-int
-main()
-{
- deal_II_exceptions::disable_abort_on_exception();
-
- initlog();
-
- EnableObserverPointer subscriptor;
- std::atomic<bool> dummy_a;
- const char *foo_a = "a";
- const char *foo_b = "b";
- subscriptor.subscribe(&dummy_a, foo_a);
- subscriptor.unsubscribe(&dummy_a, foo_b);
- std::atomic<bool> dummy_b;
- subscriptor.unsubscribe(&dummy_b, foo_a);
- subscriptor.unsubscribe(&dummy_a, foo_a);
-
- return 0;
-}
+++ /dev/null
-
-DEAL::Exception: ExcNoSubscriber(object_info->name(), name)
-DEAL::
---------------------------------------------------------
-An error occurred in file <enable_observer_pointer.cc> in function
- void dealii::EnableObserverPointer::unsubscribe(std::atomic<bool>*, const string&) const
-The violated condition was:
- it != counter_map.end()
-Additional information:
- No subscriber with identifier <b> subscribes to this object of class
- N6dealii21EnableObserverPointerE. Consequently, it cannot be
- unsubscribed.
---------------------------------------------------------
-
-DEAL::Exception: ExcMessage( "This EnableObserverPointer object does not know anything about the supplied pointer!")
-DEAL::
---------------------------------------------------------
-An error occurred in file <enable_observer_pointer.cc> in function
- void dealii::EnableObserverPointer::unsubscribe(std::atomic<bool>*, const string&) const
-The violated condition was:
- validity_ptr_it != validity_pointers.end()
-Additional information:
- This EnableObserverPointer object does not know anything about the
- supplied pointer!
---------------------------------------------------------
-
+++ /dev/null
-
-DEAL::Exception: ExcNoSubscriber(object_info->name(), name)
-DEAL::
---------------------------------------------------------
-An error occurred in file <enable_observer_pointer.cc> in function
- void dealii::EnableObserverPointer::unsubscribe(std::atomic<bool> *const, const std::string &) const
-The violated condition was:
- it != counter_map.end()
-Additional information:
- No subscriber with identifier <b> subscribes to this object of class
- N6dealii21EnableObserverPointerE. Consequently, it cannot be
- unsubscribed.
---------------------------------------------------------
-
-DEAL::Exception: ExcMessage( "This EnableObserverPointer object does not know anything about the supplied pointer!")
-DEAL::
---------------------------------------------------------
-An error occurred in file <enable_observer_pointer.cc> in function
- void dealii::EnableObserverPointer::unsubscribe(std::atomic<bool> *const, const std::string &) const
-The violated condition was:
- validity_ptr_it != validity_pointers.end()
-Additional information:
- This EnableObserverPointer object does not know anything about the
- supplied pointer!
---------------------------------------------------------
-
+++ /dev/null
-
-DEAL::Exception: ExcNoSubscriber(object_info->name(), name)
-DEAL::
---------------------------------------------------------
-An error occurred in file <enable_observer_pointer.cc> in function
- void dealii::EnableObserverPointer::unsubscribe(std::atomic<bool>*, const std::string&) const
-The violated condition was:
- it != counter_map.end()
-Additional information:
- No subscriber with identifier <b> subscribes to this object of class
- N6dealii21EnableObserverPointerE. Consequently, it cannot be
- unsubscribed.
---------------------------------------------------------
-
-DEAL::Exception: ExcMessage( "This EnableObserverPointer object does not know anything about the supplied pointer!")
-DEAL::
---------------------------------------------------------
-An error occurred in file <enable_observer_pointer.cc> in function
- void dealii::EnableObserverPointer::unsubscribe(std::atomic<bool>*, const std::string&) const
-The violated condition was:
- validity_ptr_it != validity_pointers.end()
-Additional information:
- This EnableObserverPointer object does not know anything about the
- supplied pointer!
---------------------------------------------------------
-
+++ /dev/null
-
-DEAL::Exception: ExcNoSubscriber(object_info->name(), name)
-DEAL::
---------------------------------------------------------
-An error occurred in file <enable_observer_pointer.cc> in function
- void dealii::EnableObserverPointer::unsubscribe(std::atomic<bool> *, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &) const
-The violated condition was:
- it != counter_map.end()
-Additional information:
- No subscriber with identifier <b> subscribes to this object of class
- N6dealii21EnableObserverPointerE. Consequently, it cannot be
- unsubscribed.
---------------------------------------------------------
-
-DEAL::Exception: ExcMessage( "This EnableObserverPointer object does not know anything about the supplied pointer!")
-DEAL::
---------------------------------------------------------
-An error occurred in file <enable_observer_pointer.cc> in function
- void dealii::EnableObserverPointer::unsubscribe(std::atomic<bool> *, const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> &) const
-The violated condition was:
- validity_ptr_it != validity_pointers.end()
-Additional information:
- This EnableObserverPointer object does not know anything about the
- supplied pointer!
---------------------------------------------------------
-
+++ /dev/null
-// ------------------------------------------------------------------------
-//
-// SPDX-License-Identifier: LGPL-2.1-or-later
-// Copyright (C) 2018 - 2023 by the deal.II authors
-//
-// This file is part of the deal.II library.
-//
-// Part of the source code is dual licensed under Apache-2.0 WITH
-// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
-// governing the source code and code contributions can be found in
-// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
-//
-// ------------------------------------------------------------------------
-
-
-
-// check that unsubscribing with a wrong id is handled correctly. This time,
-// we check that unsubscribung with a different pointer with the same content
-// works as well
-
-
-#include <deal.II/base/enable_observer_pointer.h>
-#include <deal.II/base/observer_pointer.h>
-
-#include <iostream>
-#include <vector>
-
-#include "../tests.h"
-
-class Test : public EnableObserverPointer
-{};
-
-int
-main()
-{
- deal_II_exceptions::disable_abort_on_exception();
-
- initlog();
-
- EnableObserverPointer subscriptor;
- std::atomic<bool> dummy_a;
- const char *foo = "a";
- const std::string foo_string = "a";
- subscriptor.subscribe(&dummy_a, foo);
- subscriptor.unsubscribe(&dummy_a, foo_string.c_str());
-
- deallog << "OK" << std::endl;
-
- subscriptor.subscribe(&dummy_a, foo);
- subscriptor.unsubscribe(&dummy_a, "a");
-
- deallog << "OK" << std::endl;
-
- return 0;
-}
+++ /dev/null
-
-DEAL::OK
-DEAL::OK