[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master e4aaaa2 4/5: Remove unnecessary definitions o
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master e4aaaa2 4/5: Remove unnecessary definitions of pure virtual functions |
Date: |
Wed, 15 Mar 2017 10:16:24 -0400 (EDT) |
branch: master
commit e4aaaa26ca07d54e1d80717102749bf18fd18100
Author: Vadim Zeitlin <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Remove unnecessary definitions of pure virtual functions
These definitions of pure virtual xml_serializable<T> methods were added
in a77e4974b92148155158c23687f58df3424a148e for some unexplained reason,
but don't seem to be necessary because the methods are pure virtual (and
have always been pure, since the initial commit).
As a side effect, this removes the need for using [[noreturn]] attribute
on these methods definitions, which made the program ill-formed as the
attribute was not used with their declarations.
---
xml_serializable.tpp | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/xml_serializable.tpp b/xml_serializable.tpp
index 9bcfd90..8cfe451 100644
--- a/xml_serializable.tpp
+++ b/xml_serializable.tpp
@@ -184,24 +184,6 @@ void xml_serializable<T>::immit_members_into(xml::element&
root) const
}
}
-/// Backward-compatibility serial number of class T's xml version.
-
-template<typename T>
-[[noreturn]]
-int xml_serializable<T>::class_version() const
-{
- throw "Unreachable--silences a compiler diagnostic.";
-}
-
-/// Root tag (when T is saved as the root of a document).
-
-template<typename T>
-[[noreturn]]
-std::string const& xml_serializable<T>::xml_root_name() const
-{
- throw "Unreachable--silences a compiler diagnostic.";
-}
-
template<typename X, typename Y>
inline Y sfinae_cast
(X const& x