ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* librados.hpp fix
@ 2010-08-03 12:21 Takuya ASADA
  2010-08-03 16:45 ` Sage Weil
  0 siblings, 1 reply; 2+ messages in thread
From: Takuya ASADA @ 2010-08-03 12:21 UTC (permalink / raw)
  To: ceph-devel

Hi,

I just realized librados.hpp could compile only if "using namespace
std;" is declared before "#include <rados/librados.hpp>", because
"vector" used without std namespace, and I think it's wrong.
It can fix following patch.

syuu

diff --git a/src/include/librados.hpp b/src/include/librados.hpp
index b0d3622..06fa3b2 100644
--- a/src/include/librados.hpp
+++ b/src/include/librados.hpp
@@ -38,7 +38,7 @@ namespace librados {

   struct SnapContext {
     snap_t seq;
-    vector<snap_t> snaps;
+    std::vector<snap_t> snaps;
   };


@@ -57,7 +57,7 @@ public:
   int lookup_pool(const char *name);

   void set_snap(pool_t pool, snap_t seq);
-  int set_snap_context(pool_t pool, snap_t seq, vector<snap_t>& snaps);
+  int set_snap_context(pool_t pool, snap_t seq, std::vector<snap_t>& snaps);


   int create(pool_t pool, const std::string& oid, bool exclusive);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: librados.hpp fix
  2010-08-03 12:21 librados.hpp fix Takuya ASADA
@ 2010-08-03 16:45 ` Sage Weil
  0 siblings, 0 replies; 2+ messages in thread
From: Sage Weil @ 2010-08-03 16:45 UTC (permalink / raw)
  To: Takuya ASADA; +Cc: ceph-devel

Thanks, applied this.  And fixed the acconfig.h #include.  Pushed to 
the testing and unstable branches.

sage

On Tue, 3 Aug 2010, Takuya ASADA wrote:

> Hi,
> 
> I just realized librados.hpp could compile only if "using namespace
> std;" is declared before "#include <rados/librados.hpp>", because
> "vector" used without std namespace, and I think it's wrong.
> It can fix following patch.
> 
> syuu
> 
> diff --git a/src/include/librados.hpp b/src/include/librados.hpp
> index b0d3622..06fa3b2 100644
> --- a/src/include/librados.hpp
> +++ b/src/include/librados.hpp
> @@ -38,7 +38,7 @@ namespace librados {
> 
>    struct SnapContext {
>      snap_t seq;
> -    vector<snap_t> snaps;
> +    std::vector<snap_t> snaps;
>    };
> 
> 
> @@ -57,7 +57,7 @@ public:
>    int lookup_pool(const char *name);
> 
>    void set_snap(pool_t pool, snap_t seq);
> -  int set_snap_context(pool_t pool, snap_t seq, vector<snap_t>& snaps);
> +  int set_snap_context(pool_t pool, snap_t seq, std::vector<snap_t>& snaps);
> 
> 
>    int create(pool_t pool, const std::string& oid, bool exclusive);
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-03 16:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-03 12:21 librados.hpp fix Takuya ASADA
2010-08-03 16:45 ` Sage Weil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).