Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

C++ partial specialization problem with templates differing only in namespace

kovalApr 27 2015 — edited May 7 2015

Solaris Studio 12.3 compiler fails with partial specialization for template classes with the same name in different namespaces.

namespace ns1 {

template<typename T> struct a {};

}

namespace ns2 {

template<typename T> struct a {};

}

template<typename T>

struct is_a { static const bool value = false; };

template<typename T>

struct is_a< ns1::a<T> > { static const bool value = true; };

#ifndef NO_NS2

template<typename T>

struct is_a< ns2::a<T> > { static const bool value = true; };

#endif

template<bool>

struct enable_if {};

template<>

struct enable_if<true> { typedef void type; };

template<typename T>

typename enable_if<is_a<T>::value>::type

fun(const T&)

{

}

void a()

{

    fun(ns1::a<int>());

    fun(ns2::a<char>());

}

Compiling above code gives errors:

Error: Could not find a match for fun<T>(ns1::a<int>) needed in a().

Error: Could not find a match for fun<T>(ns2::a<char>) needed in a().

What is more, compiling with -DNO_NS2 (so that specialization for ns2::a gets #ifdef'ed) produces no errors though there should be no match for fun<T>(ns2::a<char>)

I found this bug when trying to use Boost 1.57. In lexical_cast library, is_stdstring trait which fails because it has specializations for std::basic_string and boost::container::basic_string.

Comments

Venkat Krishna
Hi,


You can install rcu on linux.....



You can follow the below link.

http://obieedeveloper.blogspot.com/2012/10/how-to-install-obiee-111116-on-linux.html


Thanks
Venkat
http://obieedeveloper.blogspot.com/

Edited by: Venkat Krishna on May 16, 2013 11:46 AM
Ysaki
Hi Venkat and thanks for the reply

which is more reliable and more preferable ? to have the DB, RCU and OBIEE all on linux or to have the RCU and OBIEE on windows ?

Also when should i install the JDK and Weblogic ?

Thanks
Venkat Krishna
Hi,

R u installating it on server (or) laptop ? it depends......


When you say reliable what do you mean? what is your environment...


Thanks
Venkat
Ysaki
thanks for replying

its going to be on server, what i mean in reliable is linux have less issues and more performance than the windows.


my environment is my OS in linux 64 bit and has couple of database R11

thanks
Yogi1729
Hi ,
install all the RCU and OBIEE on the same Linux machine it will good. and you can accesses this in windows machine as u state that Linux is server.


Thanks,
Yogi.

Edited by: Yogi1729 on May 17, 2013 8:35 AM
Ysaki
Dear Yogi

Thanks for your help and and reply

Thanks
1 - 6
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 4 2015
Added on Apr 27 2015
4 comments
2,035 views