3 --- src
/math
/gfpmath
/gfp_element
.h
.orig
2013-04-30 22:49:33.000000000 +0000
4 +++ src
/math
/gfpmath
/gfp_element
.h
7 #include <botan/bigint.h>
8 #include <botan/gfp_modulus.h>
12 -#if defined(BOTAN_USE_STD_TR1)
13 +#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
15 +#elif defined(BOTAN_USE_STD_TR1)
17 #elif defined(BOTAN_USE_BOOST_TR1)
18 #include <boost/tr1/memory.hpp>
23 +#ifndef BOTAN_SHARED_PTR
24 +#define BOTAN_SHARED_PTR
25 +#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L
26 + using std::shared_ptr
;
28 + using std::tr1::shared_ptr
;
32 struct Illegal_Transformation
: public Exception
34 @@
-40,7 +51,7 @@
struct Illegal_Transformation
: public E
35 class BOTAN_DLL GFpElement
38 - std::tr1::shared_ptr
<GFpModulus
> mp_mod
;
39 + shared_ptr
<GFpModulus
> mp_mod
;
40 mutable BigInt m_value
; // ordinary residue or m-residue respectively
41 mutable BigInt workspace
;
43 @@
-79,7 +90,7 @@
class BOTAN_DLL GFpElement
44 * @param value the element value
45 * @param use_montgm whether
this object will use Montgomery multiplication
47 - explicit GFpElement(std::tr1::shared_ptr
<GFpModulus
> const mod
,
48 + explicit GFpElement(shared_ptr
<GFpModulus
> const mod
,
49 const BigInt
& value
, bool use_mongm
= false);
52 @@ -190,7 +201,7 @@ class BOTAN_DLL GFpElement
53 * the shared GFpModulus objects!
54 * @result the shared pointer to the GFpModulus of *this
56 - inline std::tr1::shared_ptr
<GFpModulus
> const get_ptr_mod() const
57 + inline shared_ptr
<GFpModulus
> const get_ptr_mod() const
61 @@
-203,7 +214,7 @@
class BOTAN_DLL GFpElement
62 * the shared GFpModulus objects
!
63 * @param mod a shared pointer to a GFpModulus that will be held in
*this
65 - void set_shrd_mod(std::tr1::shared_ptr
<GFpModulus
> const mod
);
66 + void set_shrd_mod(shared_ptr
<GFpModulus
> const mod
);
69 * Tells whether this GFpElement is currently transformed to it´ m-residue,