diff options
author | Kjell Ahlstedt <kjell.ahlstedt@bredband.net> | 2014-07-14 15:54:37 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjell.ahlstedt@bredband.net> | 2014-07-14 15:54:37 +0200 |
commit | 1ce41a0a59214d896d2dead06f5431440a8b6c34 (patch) | |
tree | 6823b2e837a89012f2b9a816607acc3ef53bb6a3 /tests/test_track_obj.cc | |
parent | 62617fc598292925117e63e372b138caebbca1f0 (diff) | |
download | sigc++-1ce41a0a59214d896d2dead06f5431440a8b6c34.tar.gz |
Fix 'make check' with clang++ and --enable-warnings=fatal
* tests/test_cpp11_lambda.cc:
* tests/test_deduce_result_type.cc:
* tests/test_track_obj.cc: Don't define functions which are not used.
The clang++ compiler considers unused functions an error, when libsigc++ is
configured with --enable-warnings=fatal. Bug #724496.
Diffstat (limited to 'tests/test_track_obj.cc')
-rw-r--r-- | tests/test_track_obj.cc | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/tests/test_track_obj.cc b/tests/test_track_obj.cc index 5e8a824..80fcd59 100644 --- a/tests/test_track_obj.cc +++ b/tests/test_track_obj.cc @@ -56,12 +56,6 @@ namespace { std::ostringstream result_stream; -void egon(std::string& str) -{ - result_stream << "egon(string '" << str << "')"; - str = "egon was here"; -} - struct book : public sigc::trackable { explicit book(const std::string& name) : name_(name) {} @@ -70,12 +64,6 @@ struct book : public sigc::trackable std::string name_; }; -inline std::ostringstream& operator << (std::ostringstream& s, const book& b) -{ - s << b.name_; - return s; -} - struct bar_group4 : public sigc::trackable { }; @@ -118,10 +106,25 @@ private: const book& aBook_; }; +#ifdef USING_CPP11_LAMBDA_EXPRESSIONS + +inline std::ostringstream& operator << (std::ostringstream& s, const book& b) +{ + s << b.name_; + return s; +} + +void egon(std::string& str) +{ + result_stream << "egon(string '" << str << "')"; + str = "egon was here"; +} + void foo_group4(bar_group4&) { result_stream << "foo_group4(bar_group4&)"; } +#endif // USING_CPP11_LAMBDA_EXPRESSIONS } // end anonymous namespace |