Skip to content

Use explicit Aws::Map constructor in UploadFileRequest constructor #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

zwass
Copy link

@zwass zwass commented Apr 1, 2016

Fixes the following error when building on Mac <= 10.10, Clang <= 6.0 (issue #141)

[ 90%] Building CXX object aws-cpp-sdk-transfer/CMakeFiles/aws-cpp-sdk-transfer.dir/source/transfer/UploadFileRequest.cpp.o
/Users/zwass/aws-sdk-cpp/aws-cpp-sdk-transfer/source/transfer/UploadFileRequest.cpp:117:63: error: 
      chosen constructor is explicit in copy-initialization
UploadFileRequest(fileName, bucketName, keyName, contentType, {}, s3Client, cr...
                                                              ^~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/map:838:14: note: 
      constructor declared here
    explicit map(const key_compare& __comp = key_compare())
             ^
/Users/zwass/aws-sdk-cpp/aws-cpp-sdk-transfer/source/transfer/UploadFileRequest.cpp:58:75: note: 
      passing argument to parameter 'metadata' here
                                     Aws::Map<Aws::String, Aws::String>&& metadata,
                                                                          ^
1 error generated.

@@ -114,7 +114,7 @@ UploadFileRequest::UploadFileRequest(const Aws::String& fileName,
const std::shared_ptr<Aws::S3::S3Client>& s3Client,
bool createBucket,
bool doConsistencyChecks) :
UploadFileRequest(fileName, bucketName, keyName, contentType, {}, s3Client, createBucket, doConsistencyChecks)
UploadFileRequest(fileName, bucketName, keyName, contentType, Aws::Map<Aws::String, Aws::String>(), s3Client, createBucket, doConsistencyChecks)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use Aws::Map<Aws::String, Aws::String>{} ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Effectively it should be the same thing, no? I have no objection to that.

Fixes the following error when building on Mac <= 10.10, Clang <= 6.0
```
[ 90%] Building CXX object aws-cpp-sdk-transfer/CMakeFiles/aws-cpp-sdk-transfer.dir/source/transfer/UploadFileRequest.cpp.o
/Users/zwass/aws-sdk-cpp/aws-cpp-sdk-transfer/source/transfer/UploadFileRequest.cpp:117:63: error:
      chosen constructor is explicit in copy-initialization
UploadFileRequest(fileName, bucketName, keyName, contentType, {}, s3Client, cr...
                                                              ^~
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/map:838:14: note:
      constructor declared here
    explicit map(const key_compare& __comp = key_compare())
             ^
/Users/zwass/aws-sdk-cpp/aws-cpp-sdk-transfer/source/transfer/UploadFileRequest.cpp:58:75: note:
      passing argument to parameter 'metadata' here
                                     Aws::Map<Aws::String, Aws::String>&& metadata,
                                                                          ^
1 error generated.
```
@zwass
Copy link
Author

zwass commented Apr 5, 2016

@JonathanHenson Please take a look at this and let me know what you think.

@JonathanHenson
Copy link
Contributor

looks good I'll merge in later today.

@ilovezfs
Copy link

ilovezfs commented Apr 9, 2016

Bump. Is this still good-to-go to be merged?

@JonathanHenson
Copy link
Contributor

sorry for the delay again. I've commited it and it's running the CI gammit. Will push out as soon as I get the all clear.

JonathanHenson added a commit that referenced this pull request Apr 12, 2016
@JonathanHenson
Copy link
Contributor

I pushed this out, it's in tag 0.10.5

krzysztof-trzepla added a commit to krzysztof-trzepla/aws-sdk-cpp that referenced this pull request May 21, 2016
aa46c42 VFS-1428 Extend IStorageHelper interface.
811824e VFS-1428 Add option that disables proxy IO helper build.
63defee Merge branch 'develop' of ssh://git.plgrid.pl:7999/vfs/helpers into feature/VFS-1428-support-for-multi-storage-types
2145289 VFS-1428 Add abstract storage helper context layer.
5aaae93 Merge pull request aws#147 in VFS/helpers from feature/VFS-1407-client-get-subscriptions-on-handshake to develop
c8f8915 VFS-1407 Change handshake response message behaviour.
39b5eaf Merge branch 'develop' of ssh://git.plgrid.pl:7999/vfs/helpers into feature/VFS-1407-client-get-subscriptions-on-handshake
8b2e83b VFS-1411 Add Ceph storage helper.
afb68ad Merge pull request aws#144 in VFS/helpers from feature/VFS-1371-clusterproxy-storage-helper to develop
20464d1 VFS-1371 Fix strange merge artifact.
01c6c70 Merge remote-tracking branch 'origin/develop' into feature/VFS-1371-clusterproxy-storage-helper
facd129 VFS-1371 Add SpaceID to proxyio requests.
3500ed7 Merge commit 'e72b0520dddb16f1599ba889ed23da288487c424' into feature/VFS-1371-clusterproxy-storage-helper
e72b052 Squashed 'clproto/' changes from 7e5d95b..8afb7e1
0cb160d Merge pull request aws#146 in VFS/helpers from feature/VFS-1363-add-user-context-to-helpers-operations to develop
da55b41 VFS-1371 Extract inline constant into a named constant.
19d0425 Merge remote-tracking branch 'origin/develop' into feature/VFS-1371-clusterproxy-storage-helper
8865c80 Merge pull request aws#148 in VFS/helpers from feature/VFS-1376-acceptance-tests-for-events to develop
89b2c4f VFS-1376 Fix spinlock in typedStream and client hung after umount in foreground.
1da7ae2 Merge branch 'develop' of ssh://git.plgrid.pl:7999/vfs/helpers into feature/VFS-1407-client-get-subscriptions-on-handshake
3768c24 Merge pull request aws#142 in VFS/helpers from feature/VFS-1289-event-manager-for-one-client-v.3.0 to develop
80692df VFS-1289 Apply recommended changes.
0f52bbb VFS-1407 Apply recommended changes.
5ece72b Merge commit 'cb8ba6fa10e4779dee0ebaf3cf2d5e3c234a56b8' into feature/VFS-1407-client-get-subscriptions-on-handshake
cb8ba6f Squashed 'clproto/' changes from e78734c..8ac886e
a1cf9c4 VFS-1407 Getting subscriptions on handshake response.
14bc168 Merge pull request aws#145 in VFS/helpers from bugfix/VFS-1355-fix-segmentation-fault-when-mounting to develop
9ee6869 Merge pull request aws#143 in VFS/helpers from feature/VFS-1378-global-http-and-websocket-client to feature/VFS-1289-event-manager-for-one-client-v.3.0
bc53f1e Merge commit 'edb0d8533be120fd699b7bb53d7cadcc680f1095' into feature/VFS-1378-global-http-and-websocket-client
edb0d85 Squashed 'appmock/' changes from 8d64333..0e1718a
62118bc Merge commit '872d1320a4cbc5777f49859b4086da83f1815dcd' into feature/VFS-1378-global-http-and-websocket-client
872d132 Squashed 'appmock/' changes from 5490d65..8d64333
909a8c1 Merge commit '7b118d115b3d8f82bdc253d9db3fb53306551284' into feature/VFS-1378-global-http-and-websocket-client
7b118d1 Squashed 'appmock/' changes from 9bad307..5490d65
51baa76 VFS-1355 Fix some race conditions in PersistentConnection.
a0d5ce1 Merge commit '49e0838ae62ab558a72e34487499a1ea6c887994' into feature/VFS-1378-global-http-and-websocket-client
49e0838 Squashed 'appmock/' changes from c3bc2cc..9bad307
5c9b8a9 Merge commit '6769c04efd4ccc2607a6dc839ea97f07bd5ec01b' into feature/VFS-1378-global-http-and-websocket-client
6769c04 Squashed 'appmock/' changes from 740af5e..c3bc2cc
55e0bd1 VFS-1371 Remove SpaceID from ProxyIO arguments.
82af8d0 VFS-1371 Refactor perf Parameter factories.
0c9b9ad VFS-1371 Add 'messages per second' performance test result.
6612e31 VFS-1371 Reply only if message_id is set in integration tests helpers.
79260e0 VFS-1371 Reimplement performance on top of pytest.
b1d5e4f VFS-1371 Fix surprise compilation errors.
614de9e VFS-1371 Enable creating ProxyIO in StorageHelperFactory.
d90b834 VFS-1371 Change messages to conform to the new protocol.
717311c Squashed 'clproto/' content from commit 7e5d95b
218a256 Merge commit '717311c1579eb31c51a3f38a699945cd593e5679' as 'clproto'
dbd8549 VFS-1371 Remove clproto directory.
ecb5058 VFS-1371 Test ProxyIO.
8e01071 VFS-1371 Streamline writing performance tests.
9575562 VFS-1371 Compile protocol for integration tests.
8d934f7 VFS-1371 Add ProxyIO helper.
fb6163a VFS-1371 Add protocol messages for ProxyIO helper.
28fb632 Squashed 'clproto/' changes from f7f9162..e78734c
145b1dd Merge commit '28fb632e74af38fe57cf4af60dec6df1d599412e' into feature/VFS-1289-event-manager-for-one-client-v.3.0
fb42b0a VFS-1371 Provide default implementations for IStorageHelper methods.
d505f6b Merge branch 'develop' of ssh://git.plgrid.pl:7999/vfs/helpers into feature/VFS-1289-event-manager-for-one-client-v.3.0
5e5e879 VFS-1371 Change ClientMessage::serialize to serializeAndDestroy.
0b7ab67 Merge branch 'develop' of ssh://git.plgrid.pl:7999/vfs/helpers into feature/VFS-1289-event-manager-for-one-client-v.3.0
62510fe VFS-1289 Update Sequencer, so that it periodically sends message requests for expected messages. Change TypedStream behaviour.
03ab708 Squashed 'clproto/' changes from 863b0ca..f7f9162
3c76675 Merge commit '03ab708f582896c6cff273a325b29d3c13483f6a' into feature/VFS-1289-event-manager-for-one-client-v.3.0
590f473 Merge commit 'c59c547b7147e8dcf78ea5bd4b40c95071acd20f' into feature/VFS-1289-event-manager-for-one-client-v.3.0
c59c547 Squashed 'clproto/' changes from d606115..863b0ca
d59ec04 VFS-1289 New events multilayer architecture. Unit and integration tests extension.
8be91e5 VFS-1289 Fix compilation errors of NIF libs.
2411b36 Merge commit '1a1105c65d9a2e13d99effa9d9f331beb6ba93b1' into feature/VFS-1289-event-manager-for-one-client-v.3.0
1a1105c Squashed 'clproto/' changes from d69169c..d606115
b20409f Implement sequencer tests.
2ad100e Merge commit '34caa7f1ce287843c8f7db7d8fc31e5efacd8140' into feature/VFS-1289-event-manager-for-one-client-v.3.0
820aad7 VFS-1289 Implement sequencer behaviour.
cec651b Merge branch 'develop' of ssh://git.plgrid.pl:7999/vfs/oneclient into feature/VFS-1289-event-manager-for-one-client-v.3.0
c795f90 VFS-1289 Refactor events framework. Extend unit tests. Fix integration tests.
3856a01 Merge remote-tracking branch 'origin/develop' into feature/VFS-1235-operations-on-files-at-the-client
7ea0f06 VFS-1235 Implement PushListener.
23668b1 VFS-1223 Add a refreshing macaroons capability.

git-subtree-dir: helpers
git-subtree-split: aa46c42b478a7a60a12773f2d137bffbd2717252
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants