|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65782 - in sandbox/opaque/libs/opaque: example test test/new_class
From: vicente.botet_at_[hidden]
Date: 2010-10-06 07:30:05
Author: viboes
Date: 2010-10-06 07:30:03 EDT (Wed, 06 Oct 2010)
New Revision: 65782
URL: http://svn.boost.org/trac/boost/changeset/65782
Log:
Opaque:
* Fix hiding issue
* FIx warnings
Text files modified:
sandbox/opaque/libs/opaque/example/ex5.cpp | 4 ++++
sandbox/opaque/libs/opaque/example/ex6.cpp | 4 ++++
sandbox/opaque/libs/opaque/test/Jamfile.v2 | 2 +-
sandbox/opaque/libs/opaque/test/new_class/equal_fail.cpp | 2 ++
sandbox/opaque/libs/opaque/test/new_class/greater_than_equal_fail.cpp | 2 ++
sandbox/opaque/libs/opaque/test/new_class/greater_than_fail.cpp | 2 ++
sandbox/opaque/libs/opaque/test/new_class/hiding_less_than_fail.cpp | 2 ++
sandbox/opaque/libs/opaque/test/new_class/less_than_equal_fail.cpp | 3 +++
sandbox/opaque/libs/opaque/test/new_class/less_than_fail.cpp | 3 +++
sandbox/opaque/libs/opaque/test/new_class/not_equal_fail.cpp | 2 ++
sandbox/opaque/libs/opaque/test/new_class/plus_fail.cpp | 2 ++
11 files changed, 27 insertions(+), 1 deletions(-)
Modified: sandbox/opaque/libs/opaque/example/ex5.cpp
==============================================================================
--- sandbox/opaque/libs/opaque/example/ex5.cpp (original)
+++ sandbox/opaque/libs/opaque/example/ex5.cpp 2010-10-06 07:30:03 EDT (Wed, 06 Oct 2010)
@@ -14,11 +14,15 @@
struct B { B(A); };
struct C { C(B); };
+void remove_warning(C) {}
+
void test() {
A a;
B ba = a; // okay: is_subst(A,B)
C cb = ba; // okay: is_subst(B,C)
C ca = a; // oops: ! is_subst(A,C) per [ISO03, §13.3.3.1.2/1]
// error: conversion from `A' to non-scalar type `C' requested
+ remove_warning(cb);
+ remove_warning(ca);
}
Modified: sandbox/opaque/libs/opaque/example/ex6.cpp
==============================================================================
--- sandbox/opaque/libs/opaque/example/ex6.cpp (original)
+++ sandbox/opaque/libs/opaque/example/ex6.cpp 2010-10-06 07:30:03 EDT (Wed, 06 Oct 2010)
@@ -16,9 +16,13 @@
BOOST_OPAQUE_PUBLIC_TYPEDEF(C, B);
BOOST_OPAQUE_PUBLIC_TYPEDEF(B, A);
+void remove_warning(C) {}
+
void test() {
A a;
B ba = a; // okay: is_subst(A,B)
C cb = ba; // okay: is_subst(B,C)
C ca = a; // okay: is_subst(A,C)
+ remove_warning(cb);
+ remove_warning(ca);
}
Modified: sandbox/opaque/libs/opaque/test/Jamfile.v2
==============================================================================
--- sandbox/opaque/libs/opaque/test/Jamfile.v2 (original)
+++ sandbox/opaque/libs/opaque/test/Jamfile.v2 2010-10-06 07:30:03 EDT (Wed, 06 Oct 2010)
@@ -86,7 +86,7 @@
[ run new_class/using_plus_pass.cpp ]
[ compile-fail new_class/plus_fail.cpp ]
- #[ compile-fail new_class/hiding_plus_fail.cpp ]
+ [ compile-fail new_class/hiding_plus_fail.cpp ]
[ run new_class/using_multiply_pass.cpp ]
#[ compile-fail new_class/multiply_fail.cpp ]
Modified: sandbox/opaque/libs/opaque/test/new_class/equal_fail.cpp
==============================================================================
--- sandbox/opaque/libs/opaque/test/new_class/equal_fail.cpp (original)
+++ sandbox/opaque/libs/opaque/test/new_class/equal_fail.cpp 2010-10-06 07:30:03 EDT (Wed, 06 Oct 2010)
@@ -32,10 +32,12 @@
: base_type(r.val_)
{}
};
+void remove_warning(bool) {}
void fail() {
NT1 a1(1), b2(2);
bool b =(a1 == b2);
+ remove_warning(b);
}
Modified: sandbox/opaque/libs/opaque/test/new_class/greater_than_equal_fail.cpp
==============================================================================
--- sandbox/opaque/libs/opaque/test/new_class/greater_than_equal_fail.cpp (original)
+++ sandbox/opaque/libs/opaque/test/new_class/greater_than_equal_fail.cpp 2010-10-06 07:30:03 EDT (Wed, 06 Oct 2010)
@@ -31,10 +31,12 @@
: base_type(r.val_)
{}
};
+void remove_warning(bool) {}
void fail() {
NT1 a1(1), b2(2);
bool b =(a1 >= b2);
+ remove_warning(b);
}
Modified: sandbox/opaque/libs/opaque/test/new_class/greater_than_fail.cpp
==============================================================================
--- sandbox/opaque/libs/opaque/test/new_class/greater_than_fail.cpp (original)
+++ sandbox/opaque/libs/opaque/test/new_class/greater_than_fail.cpp 2010-10-06 07:30:03 EDT (Wed, 06 Oct 2010)
@@ -31,10 +31,12 @@
: base_type(r.val_)
{}
};
+void remove_warning(bool) {}
void fail() {
NT1 a1(1), b2(2);
bool b =(a1 > b2);
+ remove_warning(b);
}
Modified: sandbox/opaque/libs/opaque/test/new_class/hiding_less_than_fail.cpp
==============================================================================
--- sandbox/opaque/libs/opaque/test/new_class/hiding_less_than_fail.cpp (original)
+++ sandbox/opaque/libs/opaque/test/new_class/hiding_less_than_fail.cpp 2010-10-06 07:30:03 EDT (Wed, 06 Oct 2010)
@@ -46,9 +46,11 @@
{}
};
+void remove_warning(bool) {}
void fail() {
NT a1(1), b2(2);
bool b = (a1 < b2);
+ remove_warning(b);
}
Modified: sandbox/opaque/libs/opaque/test/new_class/less_than_equal_fail.cpp
==============================================================================
--- sandbox/opaque/libs/opaque/test/new_class/less_than_equal_fail.cpp (original)
+++ sandbox/opaque/libs/opaque/test/new_class/less_than_equal_fail.cpp 2010-10-06 07:30:03 EDT (Wed, 06 Oct 2010)
@@ -33,9 +33,12 @@
{}
};
+void remove_warning(bool) {}
+
void fail() {
NT1 a1(1), b2(2);
bool b =(a1 <= b2);
+ remove_warning(b);
}
Modified: sandbox/opaque/libs/opaque/test/new_class/less_than_fail.cpp
==============================================================================
--- sandbox/opaque/libs/opaque/test/new_class/less_than_fail.cpp (original)
+++ sandbox/opaque/libs/opaque/test/new_class/less_than_fail.cpp 2010-10-06 07:30:03 EDT (Wed, 06 Oct 2010)
@@ -33,9 +33,12 @@
{}
};
+void remove_warning(bool) {}
+
void fail() {
NT1 a1(1), b2(2);
bool b=(a1<b2);
+ remove_warning(b);
}
Modified: sandbox/opaque/libs/opaque/test/new_class/not_equal_fail.cpp
==============================================================================
--- sandbox/opaque/libs/opaque/test/new_class/not_equal_fail.cpp (original)
+++ sandbox/opaque/libs/opaque/test/new_class/not_equal_fail.cpp 2010-10-06 07:30:03 EDT (Wed, 06 Oct 2010)
@@ -32,10 +32,12 @@
: base_type(r.val_)
{}
};
+void remove_warning(bool) {}
void fail() {
NT1 a1(1), b2(2);
bool b =(a1 != b2);
+ remove_warning(b);
}
Modified: sandbox/opaque/libs/opaque/test/new_class/plus_fail.cpp
==============================================================================
--- sandbox/opaque/libs/opaque/test/new_class/plus_fail.cpp (original)
+++ sandbox/opaque/libs/opaque/test/new_class/plus_fail.cpp 2010-10-06 07:30:03 EDT (Wed, 06 Oct 2010)
@@ -42,9 +42,11 @@
{}
};
+void remove_warning(NT) {}
void fail() {
NT a1(1), b2(2);
NT c = (a1 + b2);
+ remove_warning(c);
}
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