Remove invalid constexpr until we get to C++17.
frameworks/av/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp:236:16: error: constexpr variable cannot have non-literal type 'const android::(anonymous namespace)::(lambda at frameworks/av/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp:236:38)'
constexpr auto xmlDeleter<xmlChar> = [](xmlChar *s) { xmlFree(s); };
^
frameworks/av/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp:236:38: note: lambda closure types are non-literal types before C++17
constexpr auto xmlDeleter<xmlChar> = [](xmlChar *s) { xmlFree(s); };
^
Bug: http://b/110779387
Bug: http://b/111067277
Test: Builds with new compiler.
Change-Id: Ia7ed01bf0ff064f422be2cf6026cfe8329c404bf
diff --git a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
index f903845..e062e4e 100644
--- a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
+++ b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
@@ -232,8 +232,9 @@
constexpr void (*xmlDeleter)(T* t);
template <>
constexpr auto xmlDeleter<xmlDoc> = xmlFreeDoc;
+// http://b/111067277 - Add back constexpr when we switch to C++17.
template <>
-constexpr auto xmlDeleter<xmlChar> = [](xmlChar *s) { xmlFree(s); };
+auto xmlDeleter<xmlChar> = [](xmlChar *s) { xmlFree(s); };
/** @return a unique_ptr with the correct deleter for the libxml2 object. */
template <class T>