Re: [PATCH 1/2] Add missing <string> header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> From: Christophe de Dinechin <dinechin@xxxxxxxxxx>
> 
> Without this header, clang complains with messages such as:
> 
> concrete-agent.cpp:62:37: error: invalid operands to binary expression
> ('const std::string' (aka 'const basic_string<char, char_traits<char>,
> allocator<char> >') and 'const char *')
>     std::string pattern = directory + "/*.so";
>                           ~~~~~~~~~ ^ ~~~~~~~
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iterator:743:1:
> note: candidate template ignored: could not match
> 'reverse_iterator<type-parameter-0-0>' against 'char const[6]'
> operator+(typename reverse_iterator<_Iter>::difference_type __n, const
> reverse_iterator<_Iter>& __x)
> ^
> 
> Signed-off-by: Christophe de Dinechin <dinechin@xxxxxxxxxx>
> ---
>  src/concrete-agent.cpp | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/concrete-agent.cpp b/src/concrete-agent.cpp
> index 891c09b..ac37788 100644
> --- a/src/concrete-agent.cpp
> +++ b/src/concrete-agent.cpp
> @@ -9,6 +9,7 @@
>  #include <syslog.h>
>  #include <glob.h>
>  #include <dlfcn.h>
> +#include <string>
>  
>  #include "concrete-agent.hpp"
>  #include "static-plugin.hpp"

Acked.

I suppose on clang the std::string is defined in another header.
Is weird that got basic_string and std::string declarations but not
its operators.

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]