mirror of
https://github.com/topjohnwu/cxx.git
synced 2025-02-19 07:38:02 +00:00
Fix blobstore compilation on macOS and MSVC
macOS: src/blobstore.cc:25:73: error: typename specifier refers to non-type member 'impl' in 'org::blobstore::BlobstoreClient' BlobstoreClient::BlobstoreClient() : impl(new typename BlobstoreClient::impl) {} ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~ cxxbridge/crate/demo/include/blobstore.h:20:25: note: referenced member 'impl' is declared here std::shared_ptr<impl> impl; ^ MSVC: src/blobstore.cc(25): error C2061: syntax error: identifier 'impl'
This commit is contained in:
parent
4ca366fa57
commit
ced948046e
@ -16,8 +16,8 @@ public:
|
||||
BlobMetadata metadata(uint64_t blobid) const;
|
||||
|
||||
private:
|
||||
class impl;
|
||||
std::shared_ptr<impl> impl;
|
||||
class Impl;
|
||||
std::shared_ptr<Impl> impl;
|
||||
};
|
||||
|
||||
std::unique_ptr<BlobstoreClient> new_blobstore_client();
|
||||
|
@ -13,7 +13,7 @@ namespace blobstore {
|
||||
//
|
||||
// In reality the implementation of BlobstoreClient could be a large complex C++
|
||||
// library.
|
||||
class BlobstoreClient::impl {
|
||||
class BlobstoreClient::Impl {
|
||||
friend BlobstoreClient;
|
||||
using Blob = struct {
|
||||
std::string data;
|
||||
@ -22,7 +22,7 @@ class BlobstoreClient::impl {
|
||||
std::unordered_map<uint64_t, Blob> blobs;
|
||||
};
|
||||
|
||||
BlobstoreClient::BlobstoreClient() : impl(new typename BlobstoreClient::impl) {}
|
||||
BlobstoreClient::BlobstoreClient() : impl(new BlobstoreClient::Impl) {}
|
||||
|
||||
// Upload a new blob and return a blobid that serves as a handle to the blob.
|
||||
uint64_t BlobstoreClient::put(MultiBuf &buf) const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user