diff options
-rw-r--r-- | example/Makefile | 2 | ||||
-rw-r--r-- | example/operators.cc | 3 | ||||
-rw-r--r-- | include/dwu/operators | 7 |
3 files changed, 6 insertions, 6 deletions
diff --git a/example/Makefile b/example/Makefile index f26d3df..c96a553 100644 --- a/example/Makefile +++ b/example/Makefile @@ -1,4 +1,4 @@ -CXXFLAGS+=-I../include +CXXFLAGS+=-Wall -Werror -I../include .PHONY: all diff --git a/example/operators.cc b/example/operators.cc index cfcd529..d225303 100644 --- a/example/operators.cc +++ b/example/operators.cc @@ -1,9 +1,10 @@ +#include <dwu/operators> + #include <iostream> #include <vector> #include <list> -#include <dwu/operators> template<class S, class T> static void dump(S const &s, T const &v) diff --git a/include/dwu/operators b/include/dwu/operators index daf2481..e9315fc 100644 --- a/include/dwu/operators +++ b/include/dwu/operators @@ -24,7 +24,6 @@ #define DWU__OPERATORS__ 1 #include <algorithm> -#include <utility> namespace dwu { namespace operators { #define DWU_OPERATOR(O) \ @@ -35,7 +34,7 @@ C<Tl,A> operator O (C<Tl,A> const&l, Tr const &r) { \ while( vi != v.end() ){ \ *vi++ = *li++ O r; \ } \ - return std::move(v); \ + return v; \ } \ template<template<typename,typename> class C, typename Tl, typename A, typename Tr> \ C<Tr,A> operator O (Tl const &l, C<Tr,A> const &r) { \ @@ -44,7 +43,7 @@ C<Tr,A> operator O (Tl const &l, C<Tr,A> const &r) { \ while( vi != v.end() ){ \ *vi++ = l O *ri++; \ } \ - return std::move(v); \ + return v; \ } \ template<template<typename,typename> class Cl, template<typename,typename> class Cr, typename Tl, typename Al, typename Tr, typename Ar> \ Cl<Tl,Al> operator O (Cl<Tl,Al> const &l, Cr<Tr,Ar> const &r) { \ @@ -53,7 +52,7 @@ Cl<Tl,Al> operator O (Cl<Tl,Al> const &l, Cr<Tr,Ar> const &r) { \ while( vi != v.end() ){ \ *vi++ = *li++ O *ri++; \ } \ - return std::move(v); \ + return v; \ } \ template<template<typename,typename> class C, typename Tl, typename A, typename Tr> \ C<Tl,A>& operator O##= (C<Tl,A> &l, Tr const& r){ \ |