diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-04-08 03:09:47 +0000 |
---|---|---|
committer | <> | 2015-05-05 14:37:32 +0000 |
commit | f2541bb90af059680aa7036f315f052175999355 (patch) | |
tree | a5b214744b256f07e1dc2bd7273035a7808c659f /libs/fusion/test/sequence/tr1_tuple_auto_conv.cpp | |
parent | ed232fdd34968697a68783b3195b1da4226915b5 (diff) | |
download | boost-tarball-master.tar.gz |
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_58_0.tar.bz2.HEADboost_1_58_0master
Diffstat (limited to 'libs/fusion/test/sequence/tr1_tuple_auto_conv.cpp')
-rw-r--r-- | libs/fusion/test/sequence/tr1_tuple_auto_conv.cpp | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/libs/fusion/test/sequence/tr1_tuple_auto_conv.cpp b/libs/fusion/test/sequence/tr1_tuple_auto_conv.cpp deleted file mode 100644 index 010d4c710..000000000 --- a/libs/fusion/test/sequence/tr1_tuple_auto_conv.cpp +++ /dev/null @@ -1,56 +0,0 @@ -#include <boost/tr1/memory.hpp> -#include <boost/tr1/tuple.hpp> -#include <boost/any.hpp> -#include <iostream> - -namespace Core -{ - class AutoConverter - { - std::tr1::shared_ptr<boost::any> t_; - - public: - AutoConverter(std::tr1::shared_ptr<boost::any> const & t) - : t_(t) - {} - - template <typename C> - operator C () - { - try - { - boost::any & a = (*t_); - - return boost::any_cast<C>(a); - } - catch(boost::bad_any_cast & e) - { - std::cerr << "Internal conversion bug: " - << "Failed to convert data holder to " - << typeid(C).name() << "\n" - << e.what() - << std::endl; - - C c = C(); - return c; - } - } - }; - - - inline AutoConverter Demo() - { - std::tr1::shared_ptr<boost::any> p_result - (new boost::any(std::tr1::make_tuple(1, 2, 3, 4))); - return p_result; - } - -} // namespace Core - - -int main() -{ - std::tr1::tuple<int, int, int, int> test = Core::Demo(); - return 0; -} - |