eolian-cxx: Fix generation of non-inline function in headers
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Wed, 15 Jun 2016 20:48:30 +0000 (17:48 -0300)
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>
Wed, 15 Jun 2016 20:49:56 +0000 (17:49 -0300)
src/lib/eolian_cxx/grammar/class_implementation.hpp

index 093d7af..3e9174f 100644 (file)
@@ -39,11 +39,11 @@ struct class_implementation_generator
          << namespaces
          [
           *function_definition(get_klass_name(cls))
-          << base_class_name << "::operator " << class_name << "() const { return *static_cast< "
+          << "inline " << base_class_name << "::operator " << class_name << "() const { return *static_cast< "
             << class_name << " const*>(static_cast<void const*>(this)); }\n"
-          << base_class_name << "::operator " << class_name << "&() { return *static_cast< "
+          << "inline " << base_class_name << "::operator " << class_name << "&() { return *static_cast< "
             << class_name << "*>(static_cast<void*>(this)); }\n"
-          << base_class_name << "::operator " << class_name << " const&() const { return *static_cast< "
+          << "inline " << base_class_name << "::operator " << class_name << " const&() const { return *static_cast< "
             << class_name << " const*>(static_cast<void const*>(this)); }\n"
          ]
          << "}\n\n"