[xsd-users] FreeBSD compilation error

Maxim Maslennikov maxim.maslennikov at gmail.com
Tue Feb 24 15:02:22 EST 2015


Hi Boris,

Result is the same …

root at dev:~/dev # cat main.cpp 
#include <iostream>

int main ()
{
 std::wcerr << "Hello, World!" << std::endl;
}

root at dev:~/dev # clang++ -std=c++98 main.cpp -o test                                                             
root at dev:~/dev # ./test                                                              
Hello, World!
root at dev:~/dev # 

Also tried compiling xsd with -std=c++98 and got the same error :(

/root/dev/xsd-4.0.0+dep/libxsd-frontend/xsd-frontend/semantic-graph/elements.cxx:298:13: error: invalid operands
      to binary expression ('std::wostream' (aka 'basic_ostream<wchar_t>') and 'const value_type *'
      (aka 'const char *'))
  return os << path.string ().c_str ();
         ~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~
/root/dev/xsd-4.0.0+dep/libxsd-frontend/xsd-frontend/semantic-graph/elements.cxx:296:1: note: candidate function
      not viable: no known conversion from 'const value_type *' (aka 'const char *') to 'const
      XSDFrontend::SemanticGraph::Path' (aka 'const basic_path<char>') for 2nd argument
operator<< (std::wostream& os, XSDFrontend::SemanticGraph::Path const& path)
^
/usr/include/c++/v1/memory:5263:1: note: candidate template ignored: could not match
      'shared_ptr<type-parameter-0-2>' against 'const char *'
operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p);
^
/usr/include/c++/v1/string:4088:1: note: candidate template ignored: could not match
      'basic_string<type-parameter-0-0, type-parameter-0-1, type-parameter-0-2>' against 'const char *'
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
1 error generated.

Best Regards,
Maxim Maslennikov
Moscow Russia
+7 985 274-05-70

> On Feb 24, 2015, at 11:37 AM, Boris Kolpackov <boris at codesynthesis.com> wrote:
> 
> Hi Maxim,
> 
> Maxim Maslennikov <maxim.maslennikov at gmail.com> writes:
> 
>> root at dev:~/dev # clang++ -std=c++11 main.cpp -o test                                                                                               
> 
> Try in the c++98 mode since that's how you compile XSD. Clang is
> known to be anal enough not to implement common sense stuff just
> because the standard doesn't mandate it.
> 
> Boris



More information about the xsd-users mailing list