Skip to content

Compile break when building with Microsoft STL using a different compiler then msvc #1311

@ChristophStrehle

Description

@ChristophStrehle

When building with the Microsoft STL and a different compiler then the msvc I get the following compile break in std::vector:

1>..\MSVC\14.43.34808\include\vector(656,38): error : no matching conversion for static_cast from '_Alty' (aka 'AllocatorWithCleanup<unsigned char, false>') to '_Rebind_alloc_t<_Alty, _Container_proxy>' (aka 'AllocatorWithCleanup<std::_Container_proxy, false>')
1>..\MSVC\14.43.34808\include\vector(656,38): error :   656 |         _Mypair._Myval2._Alloc_proxy(_GET_PROXY_ALLOCATOR(_Alty, _Getal()));
1>..\MSVC\14.43.34808\include\vector(656,38): error :       |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1>..\MSVC\14.43.34808\include\xmemory(1504,42): message : expanded from macro '_GET_PROXY_ALLOCATOR'
1>..\MSVC\14.43.34808\include\xmemory(1504,42): message :  1504 | #define _GET_PROXY_ALLOCATOR(_Alty, _Al) static_cast<_Rebind_alloc_t<_Alty, _Container_proxy>>(_Al)
1>..\MSVC\14.43.34808\include\xmemory(1504,42): message :       |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1>..include\crypto++/xed25519.h(284,5): message : in instantiation of member function 'std::vector<unsigned char, CryptoPP::AllocatorWithCleanup<byte>>::vector' requested here
1>..include\crypto++/xed25519.h(284,5): message :   284 |     ed25519_MessageAccumulator() {
1>..include\crypto++/xed25519.h(284,5): message :       |     ^
1>..include\crypto++\secblock.h(187,7): message : candidate constructor (the implicit copy constructor) not viable: no known conversion from 'AllocatorWithCleanup<unsigned char, [...]>' to 'const AllocatorWithCleanup<std::_Container_proxy, [...]>' for 1st argument
1>..include\crypto++\secblock.h(187,7): message :   187 | class AllocatorWithCleanup : public AllocatorBase<T>
1>..include\crypto++\secblock.h(187,7): message :       |       ^~~~~~~~~~~~~~~~~~~~
1>..include\crypto++\secblock.h(187,7): message : candidate constructor (the implicit move constructor) not viable: no known conversion from 'AllocatorWithCleanup<unsigned char, [...]>' to 'AllocatorWithCleanup<std::_Container_proxy, [...]>' for 1st argument
1>..include\crypto++\secblock.h(187,7): message :   187 | class AllocatorWithCleanup : public AllocatorBase<T>
1>..include\crypto++\secblock.h(187,7): message :       |       ^~~~~~~~~~~~~~~~~~~~
1>..include\crypto++\secblock.h(187,7): message : candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 1 was provided

This can be reproduced when building a simple program using cryptopp and clang-cl.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions