Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65456 - in sandbox/chrono/libs/type_traits_ext: example test
From: vicente.botet_at_[hidden]
Date: 2010-09-19 04:20:22


Author: viboes
Date: 2010-09-19 04:20:18 EDT (Sun, 19 Sep 2010)
New Revision: 65456
URL: http://svn.boost.org/trac/boost/changeset/65456

Log:
add complex example
Added:
   sandbox/chrono/libs/type_traits_ext/example/complex.cpp (contents, props changed)
Text files modified:
   sandbox/chrono/libs/type_traits_ext/test/Jamfile.v2 | 5 +++++
   1 files changed, 5 insertions(+), 0 deletions(-)

Added: sandbox/chrono/libs/type_traits_ext/example/complex.cpp
==============================================================================
--- (empty file)
+++ sandbox/chrono/libs/type_traits_ext/example/complex.cpp 2010-09-19 04:20:18 EDT (Sun, 19 Sep 2010)
@@ -0,0 +1,27 @@
+// complex.cpp ----------------------------------------------------------//
+
+// Copyright 2008 Howard Hinnant
+// Copyright 2008 Beman Dawes
+// Copyright 2010 Vicente J. Botet Escriba
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+#include <boost/type_traits/common_type.hpp>
+#include <iostream>
+#include <complex>
+
+template <class T, class U>
+typename boost::common_type<std::complex<T>, std::complex<U> >::type
+operator+(std::complex<T>, std::complex<U>);
+
+template <class T, class U>
+std::complex<typename boost::common_type<T, U>::type>
+operator-(std::complex<T>, std::complex<U>);
+
+
+int main()
+{
+
+ return 0;
+}

Modified: sandbox/chrono/libs/type_traits_ext/test/Jamfile.v2
==============================================================================
--- sandbox/chrono/libs/type_traits_ext/test/Jamfile.v2 (original)
+++ sandbox/chrono/libs/type_traits_ext/test/Jamfile.v2 2010-09-19 04:20:18 EDT (Sun, 19 Sep 2010)
@@ -33,6 +33,11 @@
         <toolset>msvc:<cxxflags>/wd4127
     ;
 
+ test-suite "examples"
+ :
+ [ run ../example/complex.cpp ]
+ ;
+
    test-suite "common_type"
         :
         [ run common_type_test.cpp ]


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk