These are simple enough that they should live in the header. This will
allow classes inheriting from Subscriptor to potentially inline some
more constructors too.
//---------------------------------------------------------------------------
+inline Subscriptor::Subscriptor()
+ : counter(0)
+ , object_info(nullptr)
+{}
+
+
+
+inline Subscriptor::Subscriptor(const Subscriptor &)
+ : counter(0)
+ , object_info(nullptr)
+{}
+
+
+
+inline Subscriptor &
+Subscriptor::operator=(const Subscriptor &s)
+{
+ object_info = s.object_info;
+ return *this;
+}
+
+
+
+inline unsigned int
+Subscriptor::n_subscriptions() const
+{
+ return counter;
+}
+
+
+
template <class Archive>
inline void
Subscriptor::serialize(Archive &, const unsigned int)
std::mutex Subscriptor::mutex;
-Subscriptor::Subscriptor()
- : counter(0)
- , object_info(nullptr)
-{
- // this has to go somewhere to avoid an extra warning.
- (void)unknown_subscriber;
-}
-
-
-
-Subscriptor::Subscriptor(const Subscriptor &)
- : counter(0)
- , object_info(nullptr)
-{}
-
-
-
Subscriptor::Subscriptor(Subscriptor &&subscriptor) noexcept
: counter(0)
, object_info(subscriptor.object_info)
-Subscriptor &
-Subscriptor::operator=(const Subscriptor &s)
-{
- object_info = s.object_info;
- return *this;
-}
-
-
-
Subscriptor &
Subscriptor::operator=(Subscriptor &&s) noexcept
{
-unsigned int
-Subscriptor::n_subscriptions() const
-{
- return counter;
-}
-
-
-
void
Subscriptor::list_subscribers() const
{
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams