$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [type_traits] extension has_operator_xxx - cv qualifiers and references
From: Edward Diener (eldiener_at_[hidden])
Date: 2011-02-11 10:34:59
On 2/9/2011 3:50 PM, Frédéric Bron wrote:
>> What appears to be happening is that the include path for the entire Boost
>> tree installation, which in my case I am pointing to the latest SVN trunk,
>> takes precedence to the include path in the sandbox type_traits directory.
>> This may be the reason why the errors are being seen since if it picks up
>> the appropriate include files from the SVN Boost trunk it will not find your
>> changes.
>
> This is strange as with linux it does the contrary.
> For me, it is even more difficult as it seems that MS Visual Studio
> Express 2010 does not modify the PATH so I had to add some directories
> by hand.
> Even with that, the compiler cannot find the standard headers:
> fatal error C1083: Cannot open file include: 'cstddef': No such file
> or directory
> But I can see that the include directories are in the wrong order as for you.
> Maybe John you can help on that point?
>
> So the question is:
> Who knows how to run the tests in the sandbox on windows with msvc?
> Or who could test for us?
I needed to change the project-root.jam in the sandbox libs/type_traits
so that the last lines read:
project tt
: requirements
<include>$(tt-header-include)&&$(boost-root)
: # build everything in ./bin.v2
build-dir bin.v2
;
This forces the tt header directory to be included before a Boost
distribution. Finally I could run the test using msvc 10.0 without
compiler errors:
When I ran the operator tests I see, as an example:
has_operator_multiplies_test.cpp
msvc.link
..\bin.v2\test\has_operator_multiplies_test.test\msvc-10.0\debug\threading-multi\has_operator_multiplies_test.exe
msvc.manifest
..\bin.v2\test\has_operator_multiplies_test.test\msvc-10.0\debug\threading-multi\has_operator_multiplies_test.exe
testing.capture-output
..\bin.v2\test\has_operator_multiplies_test.test\msvc-10.0\debug\threading-multi\has_operator_multiplies_test.run
====== BEGIN OUTPUT ======
c:\programming\versioncontrol\sandbox\type_traits\libs\type_traits\test\has_no_pointer_operator_test.hpp:312:
The expression:
"(::boost::has_operator_multiplies<bool,bool,bool>::value)" had an
invalid value (found 0, expected 1)
c:\programming\versioncontrol\sandbox\type_traits\libs\type_traits\test\has_no_pointer_operator_test.hpp:313:
The expression:
"(::boost::has_operator_multiplies<bool,char,bool>::value)" had an
invalid value (found 0, expected 1)
c:\programming\versioncontrol\sandbox\type_traits\libs\type_traits\test\has_no_pointer_operator_test.hpp:314:
The expression: "(::boost::has_operator_multiplies<bool,signed
char,bool>::value)" had an invalid value (found 0, expected 1)
c:\programming\versioncontrol\sandbox\type_traits\libs\type_traits\test\has_no_pointer_operator_test.hpp:315:
The expression: "(::boost::has_operator_multiplies<bool,short
int,bool>::value)" had an invalid value (found 0, expected 1)
c:\programming\versioncontrol\sandbox\type_traits\libs\type_traits\test\has_no_pointer_operator_test.hpp:316:
The expression:
"(::boost::has_operator_multiplies<bool,int,bool>::value)" had an
invalid value (found 0, expected 1)
c:\programming\versioncontrol\sandbox\type_traits\libs\type_traits\test\has_no_pointer_operator_test.hpp:317:
The expression: "(::boost::has_operator_multiplies<bool,long
int,bool>::value)" had an invalid value (found 0, expected 1)
This goes on for each line of that test.
There is also a huge amount of chuff for some other test along the lines of:
compile-c-c++
..\bin.v2\test\has_operator_not_equal_to_test.test\msvc-10.0\debug\threading-multi\has_operator_not_equal_to_test.obj
has_operator_not_equal_to_test.cpp
C:\Programming\VersionControl\sandbox\type_traits\boost/type_traits/detail/has_binary_operator.hpp(102)
: warning C4805: '!=' : unsafe mix of type 'bool' and type 'char' in
operation
C:\Programming\VersionControl\sandbox\type_traits\boost/type_traits/detail/has_binary_operator.hpp(141)
: see reference to class template instantiation
'boost::detail::has_operator_not_equal_to_impl::has_operator_not_equal_to_impl1<LHS,RHS,RET,forbidden_if>'
being compiled
with
[
LHS=bool,
RHS=char,
RET=void,
forbidden_if=false
]
C:\Programming\VersionControl\sandbox\type_traits\boost/type_traits/detail/has_binary_operator.hpp(147)
: see reference to class template instantiation
'boost::detail::has_operator_not_equal_to_impl::has_operator_not_equal_to_impl<LHS,RHS,RET>'
being compiled
with
[
LHS=bool,
RHS=char,
RET=void
]
c:\programming\versioncontrol\sandbox\type_traits\libs\type_traits\test\has_comparison_operator_test.hpp(87)
: see reference to class template instantiation
'boost::has_operator_not_equal_to<LHS,RHS>' being compiled
with
[
LHS=bool,
RHS=char
]
And this warning is repeated for line 102 of has_binary_operator.hpp
endlessly. You need a pragma in there to turn off C4806 else the output
is very huge and unreadable. I will put something in there myself
temporarily to try to remove the warning for VC and then try to run the
test again.