[Botan-devel] Ambiguity between unsigned int *() and const unsigned int *()

topmop topmop at gmail.com
Mon Jun 11 15:26:12 EDT 2007


Hello Friends

I have compiled Botan 1.6.2 in VC++ environment without any problem. And now
i am trying to use it in Borland C++ Builder.

When i try to compile a test program in C++ Builder, It gives me below error
in bigint.h

------------------------------------------------------------------------------------------------------------------------------
Build
  [C++ Error] bigint.h(61): E2015 Ambiguity between 'MemoryRegion<unsigned
int>::operator unsigned int *()' and 'MemoryRegion<unsigned int>::operator
const unsigned int *() const'
  [C++ Error] bigint.h(83): E2015 Ambiguity between 'MemoryRegion<unsigned
int>::operator unsigned int *()' and 'MemoryRegion<unsigned int>::operator
const unsigned int *() const'
  [C++ Error] bigint.h(84): E2015 Ambiguity between 'MemoryRegion<unsigned
int>::operator unsigned int *()' and 'MemoryRegion<unsigned int>::operator
const unsigned int *() const'
----------------------------------------------------------------------------------------------------------------------

These 3 errors are on below 3 lines in bigint.h
--------return ((n < size()) ? reg[n] : 0);
-------- word& operator[](u32bit index) { return reg[index]; }
-------- word operator[](u32bit index) const { return reg[index]; }

Just for testing, If i take out the reg variable from these lines and use a
constant value then i dont get any other error.

Variable reg is of below type.
SecureVector<word> reg;


If you will ask for the code i am using, Then as such i am not using
anything, Just included below files and tried to compile to make sure they
will work, But apparently i need to change something to make it compatible
with Borland C++ Compiler?

#include <botan/botan.h>
#include <botan/dsa.h>

Just to make it clear, I am not compiling Botan itself in Borland C++
Builder, I am trying to use Botan in C++ Builder.

Anyone can provide me some hints about that specific error ?

Thanks in Advance.

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.randombit.net/pipermail/botan-devel/attachments/20070612/6a2ad489/attachment.html>


More information about the botan-devel mailing list