From: levill_r <levill_r@4aad255d-cdde-0310-9447-f3009e2ae8c0>
* src/name_of.hh: Include typeinfo for typeif.
* test/fixtures/my_lib/damien.hh (operator<<)
* test/fixtures/my_lib/lib.hh (foo1, foo2, foo2b):
Qualify these functions as inline to pacify the compiler.
git-svn-id:
https://svn.lrde.epita.fr/svn/oln/trunk@4652
4aad255d-cdde-0310-9447-f3009e2ae8c0
---
dynamic-use-of-static-c++/ChangeLog | 9 +++++++++
dynamic-use-of-static-c++/src/name_of.hh | 2 ++
.../test/fixtures/my_lib/damien.hh | 1 +
.../test/fixtures/my_lib/lib.hh | 3 +++
4 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/dynamic-use-of-static-c++/ChangeLog b/dynamic-use-of-static-c++/ChangeLog
index 469d2b7..0cb57c3 100644
--- a/dynamic-use-of-static-c++/ChangeLog
+++ b/dynamic-use-of-static-c++/ChangeLog
@@ -1,5 +1,14 @@
2009-10-14 Roland Levillain <roland(a)lrde.epita.fr>
+ Address compilation warnings.
+
+ * src/name_of.hh: Include typeinfo for typeif.
+ * test/fixtures/my_lib/damien.hh (operator<<)
+ * test/fixtures/my_lib/lib.hh (foo1, foo2, foo2b):
+ Qualify these functions as inline to pacify the compiler.
+
+2009-10-14 Roland Levillain <roland(a)lrde.epita.fr>
+
Convert the test on Olena from proto-stl-style to Milena.
* configure.ac (OLENA_PROTO_STL_STYLE): Remove variable.
diff --git a/dynamic-use-of-static-c++/src/name_of.hh
b/dynamic-use-of-static-c++/src/name_of.hh
index 04b40ad..67e26a5 100644
--- a/dynamic-use-of-static-c++/src/name_of.hh
+++ b/dynamic-use-of-static-c++/src/name_of.hh
@@ -1,6 +1,8 @@
#ifndef NAME_OF
# define NAME_OF
+# include <typeinfo>
+
# include <string>
# include <sstream>
diff --git a/dynamic-use-of-static-c++/test/fixtures/my_lib/damien.hh
b/dynamic-use-of-static-c++/test/fixtures/my_lib/damien.hh
index a045f1a..369ebe9 100644
--- a/dynamic-use-of-static-c++/test/fixtures/my_lib/damien.hh
+++ b/dynamic-use-of-static-c++/test/fixtures/my_lib/damien.hh
@@ -44,6 +44,7 @@ struct down : public up
};
+inline
std::ostream& operator<<(std::ostream& ostr, const up& obj)
{
obj.print(ostr);
diff --git a/dynamic-use-of-static-c++/test/fixtures/my_lib/lib.hh
b/dynamic-use-of-static-c++/test/fixtures/my_lib/lib.hh
index 8088724..c861ea5 100644
--- a/dynamic-use-of-static-c++/test/fixtures/my_lib/lib.hh
+++ b/dynamic-use-of-static-c++/test/fixtures/my_lib/lib.hh
@@ -37,11 +37,13 @@ std::ostream& operator<< (std::ostream& ostr, const
t<T, V>& x)
return ostr << "t< " << x.x_ << ", " <<
x.y_ << " >";
}
+inline
void foo1()
{
std::cout << "foo1()" << std::endl;
}
+inline
int* foo2()
{
static int i = 42;
@@ -49,6 +51,7 @@ int* foo2()
return &i;
}
+inline
int foo2b()
{
std::cout << "foo2b() => 42" << std::endl;
--
1.6.5