Build fix: g++ < 7.1 mishandles namespaces of specializations
[lttng-tools.git] / src / bin / lttng-sessiond / field.cpp
index 4a7915e203b0fcf74a743b40b3503066dd61eaf8..c00f6d1351085ec92b5bf7dd75c8ea6f5cf33fdc 100644 (file)
@@ -191,37 +191,42 @@ lst::enumeration_type::enumeration_type(unsigned int in_alignment,
 {
 }
 
 {
 }
 
+/*
+ * Due to a bug in g++ < 7.1, these specializations must be enclosed in the namespaces
+ * rather than using the usual `namespace::namespace::function` notation:
+ * see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480.
+ */
 namespace lttng {
 namespace sessiond {
 namespace trace {
 template <>
 namespace lttng {
 namespace sessiond {
 namespace trace {
 template <>
-void lst::signed_enumeration_type::accept(type_visitor& visitor) const
+void signed_enumeration_type::accept(type_visitor& visitor) const
 {
        visitor.visit(*this);
 }
 
 template <>
 {
        visitor.visit(*this);
 }
 
 template <>
-void lst::unsigned_enumeration_type::accept(type_visitor& visitor) const
+void unsigned_enumeration_type::accept(type_visitor& visitor) const
 {
        visitor.visit(*this);
 }
 {
        visitor.visit(*this);
 }
-} /* namespace trace */
-} /* namespace sessiond */
-} /* namespace lttng */
 
 template <>
 
 template <>
-void lst::variant_type<lst::signed_enumeration_type::mapping::range_t::range_integer_t>::accept(
+void variant_type<lst::signed_enumeration_type::mapping::range_t::range_integer_t>::accept(
                lst::type_visitor& visitor) const
 {
        visitor.visit(*this);
 }
 
 template <>
                lst::type_visitor& visitor) const
 {
        visitor.visit(*this);
 }
 
 template <>
-void lst::variant_type<lst::unsigned_enumeration_type::mapping::range_t::range_integer_t>::accept(
+void variant_type<lst::unsigned_enumeration_type::mapping::range_t::range_integer_t>::accept(
                lst::type_visitor& visitor) const
 {
        visitor.visit(*this);
 }
                lst::type_visitor& visitor) const
 {
        visitor.visit(*this);
 }
+} /* namespace trace */
+} /* namespace sessiond */
+} /* namespace lttng */
 
 lst::array_type::array_type(unsigned int in_alignment, type::cuptr in_element_type) :
        type(in_alignment), element_type{std::move(in_element_type)}
 
 lst::array_type::array_type(unsigned int in_alignment, type::cuptr in_element_type) :
        type(in_alignment), element_type{std::move(in_element_type)}
@@ -389,4 +394,4 @@ bool lst::structure_type::_is_equal(const type& base_other) const noexcept
 void lst::structure_type::accept(type_visitor& visitor) const
 {
        visitor.visit(*this);
 void lst::structure_type::accept(type_visitor& visitor) const
 {
        visitor.visit(*this);
-}
\ No newline at end of file
+}
This page took 0.02367 seconds and 4 git commands to generate.