Skip to content
Snippets Groups Projects
Commit 6f1cbcf2 authored by Oliver Sander's avatar Oliver Sander
Browse files

SameType --> is_same

[[Imported from SVN: r4853]]
parent 631bb204
No related branches found
No related tags found
No related merge requests found
......@@ -1081,7 +1081,7 @@ namespace Dune {
typename FieldType<A>::type
operator * (const Vector<A> & a, const Expression<B> & b)
{
IsTrue< SameType<FieldType<A>,FieldType<B> >::value == true >::yes();
IsTrue< is_same<FieldType<A>,FieldType<B> >::value == true >::yes();
assert(a.N() == b.N());
typename FieldType<A>::type x = 0;
for (size_t i=0; i<a.N(); i++)
......@@ -1094,7 +1094,7 @@ namespace Dune {
typename FieldType<A>::type
operator * (const Expression<A> & a, const Vector<B> & b)
{
IsTrue< SameType<FieldType<A>,FieldType<B> >::value == true >::yes();
IsTrue< is_same<FieldType<A>,FieldType<B> >::value == true >::yes();
assert(a.N() == b.N());
typename FieldType<A>::type x = 0;
for (size_t i=0; i<a.N(); i++)
......
......@@ -49,8 +49,8 @@ template<class T1, class T2, class T3 = T1> struct Can_multiply {
Example for compile time check whether two types are the same:
\code
IsTrue<SameType<int,int>::value>::yes(); //
IsTrue<SameType<bool,int>::value>::yes(); // false, will trigger a compile time error
IsTrue<is_same<int,int>::value>::yes(); //
IsTrue<is_same<bool,int>::value>::yes(); // false, will trigger a compile time error
\endcode
A test that trigger a compile time error if condition is true:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment