Skip to content

Instantly share code, notes, and snippets.

@springmeyer
Created June 23, 2011 21:14
Show Gist options
  • Save springmeyer/1043650 to your computer and use it in GitHub Desktop.
Save springmeyer/1043650 to your computer and use it in GitHub Desktop.
# simple testcase showing compiler error with boost filesystem and clang trunk:
#include "boost/filesystem/operations.hpp"
int main() {
return 0;
}
# g++ works:
g++ -o test.o -c -I/opt/boost-trunk/include test.cpp
# clang does not
clang -v
clang version 3.0 (trunk 131789)
Target: x86_64-apple-darwin10.7.0
Thread model: posix
$ clang++ -o test.o -c -I/opt/boost-trunk/include test.cpp
In file included from test.cpp:1:
In file included from /opt/boost-trunk/include/boost/filesystem/operations.hpp:31:
In file included from /opt/boost-trunk/include/boost/filesystem/v3/operations.hpp:25:
In file included from /opt/boost-trunk/include/boost/filesystem/v3/path.hpp:28:
In file included from /opt/boost-trunk/include/boost/iterator/iterator_facade.hpp:26:
/opt/boost-trunk/include/boost/type_traits/is_pod.hpp:40:5: error: 'T' does not refer to a
value
BOOST_STATIC_CONSTANT(
^
/opt/boost-trunk/include/boost/type_traits/is_pod.hpp:45:13: note: instantiated from:
BOOST_INTERNAL_IS_POD(T)
^
/opt/boost-trunk/include/boost/type_traits/is_pod.hpp:26:34: note: instantiated from:
#define BOOST_INTERNAL_IS_POD(T) BOOST_IS_POD(T)
^
/opt/boost-trunk/include/boost/type_traits/is_pod.hpp:45:13: note: instantiated from:
BOOST_INTERNAL_IS_POD(T)
^
/opt/boost-trunk/include/boost/type_traits/is_pod.hpp:45:35: note: instantiated from:
BOOST_INTERNAL_IS_POD(T)
^
/opt/boost-trunk/include/boost/type_traits/is_pod.hpp:38:20: note: declared here
template <typename T> struct is_pod_impl
^
/opt/boost-trunk/include/boost/type_traits/is_pod.hpp:46:20: error: type name requires a
specifier or qualifier
>::value));
^
/opt/boost-trunk/include/boost/type_traits/is_pod.hpp:46:20: error: C++ requires a type
specifier for all declarations
>::value));
^
/opt/boost-trunk/include/boost/type_traits/is_pod.hpp:46:20: error: expected ')'
/opt/boost-trunk/include/boost/type_traits/is_pod.hpp:40:5: note: to match this '('
BOOST_STATIC_CONSTANT(
^
/opt/boost-trunk/include/boost/type_traits/is_pod.hpp:42:9: note: instantiated from:
(::boost::type_traits::ice_or<
^
/opt/boost-trunk/include/boost/type_traits/is_pod.hpp:134:1: error: non-type template argument
of type 'const bool' is not an integral constant expression
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::boost::detail::is_pod_impl<T>::value)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from test.cpp:1:
In file included from /opt/boost-trunk/include/boost/filesystem/operations.hpp:31:
In file included from /opt/boost-trunk/include/boost/filesystem/v3/operations.hpp:25:
In file included from /opt/boost-trunk/include/boost/filesystem/v3/path.hpp:28:
In file included from /opt/boost-trunk/include/boost/iterator/iterator_facade.hpp:26:
In file included from /opt/boost-trunk/include/boost/type_traits/is_pod.hpp:21:
/opt/boost-trunk/include/boost/type_traits/detail/bool_trait_def.hpp:69:5: note: instantiated from:
BOOST_TT_AUX_BOOL_C_BASE(C) \
^
In file included from test.cpp:1:
In file included from /opt/boost-trunk/include/boost/filesystem/operations.hpp:31:
In file included from /opt/boost-trunk/include/boost/filesystem/v3/operations.hpp:25:
In file included from /opt/boost-trunk/include/boost/filesystem/v3/path.hpp:28:
In file included from /opt/boost-trunk/include/boost/iterator/iterator_facade.hpp:26:
/opt/boost-trunk/include/boost/type_traits/is_pod.hpp:134:1: note: instantiated from:
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::boost::detail::is_pod_impl<T>::value)
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/boost-trunk/include/boost/type_traits/is_pod.hpp:134:39: note: instantiated from:
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::boost::detail::is_pod_impl<T>::value)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/boost-trunk/include/boost/mpl/aux_/nested_type_wknd.hpp:27:7: note: in instantiation of
template class 'boost::is_POD<const boost::filesystem3::path>' requested here
: T::type
^
/opt/boost-trunk/include/boost/mpl/aux_/preprocessed/gcc/and.hpp:51:11: note: in instantiation
of template class 'boost::mpl::aux::nested_type_wknd<boost::is_POD<const
boost::filesystem3::path> >' requested here
BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
^
/opt/boost-trunk/include/boost/mpl/aux_/nested_type_wknd.hpp:38:5: note: instantiated from:
::boost::mpl::aux::nested_type_wknd<T> \
^
/opt/boost-trunk/include/boost/mpl/aux_/nested_type_wknd.hpp:27:7: note: in instantiation of
template class 'boost::mpl::and_<boost::is_POD<const boost::filesystem3::path>,
boost::detail::iterator_writability_disabled<const boost::filesystem3::path, const
boost::filesystem3::path &>, mpl_::bool_<true>, mpl_::bool_<true>, mpl_::bool_<true> >'
requested here
: T::type
^
/opt/boost-trunk/include/boost/mpl/not.hpp:41:11: note: in instantiation of template class
'boost::mpl::aux::nested_type_wknd<boost::mpl::and_<boost::is_POD<const
boost::filesystem3::path>, boost::detail::iterator_writability_disabled<const
boost::filesystem3::path, const boost::filesystem3::path &>, mpl_::bool_<true>,
mpl_::bool_<true>, mpl_::bool_<true> > >' requested here
BOOST_MPL_AUX_NESTED_TYPE_WKND(T)::value
^
/opt/boost-trunk/include/boost/mpl/aux_/nested_type_wknd.hpp:38:5: note: instantiated from:
::boost::mpl::aux::nested_type_wknd<T> \
^
/opt/boost-trunk/include/boost/iterator/iterator_facade.hpp:375:9: note: in instantiation of
template class 'boost::mpl::not_<boost::mpl::and_<boost::is_POD<const
boost::filesystem3::path>, boost::detail::iterator_writability_disabled<const
boost::filesystem3::path, const boost::filesystem3::path &>, mpl_::bool_<true>,
mpl_::bool_<true>, mpl_::bool_<true> > >' requested here
: mpl::not_<
^
/opt/boost-trunk/include/boost/mpl/if.hpp:63:11: note: in instantiation of template class
'boost::detail::use_operator_brackets_proxy<const boost::filesystem3::path, const
boost::filesystem3::path &>' requested here
BOOST_MPL_AUX_STATIC_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(T1)::value)
^
/opt/boost-trunk/include/boost/mpl/if.hpp:63:43: note: instantiated from:
BOOST_MPL_AUX_STATIC_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(T1)::value)
^
/opt/boost-trunk/include/boost/mpl/if.hpp:63:68: note: instantiated from:
BOOST_MPL_AUX_STATIC_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(T1)::value)
^
/opt/boost-trunk/include/boost/iterator/iterator_facade.hpp:388:26: note: in instantiation of
template class 'boost::mpl::if_<boost::detail::use_operator_brackets_proxy<const
boost::filesystem3::path, const boost::filesystem3::path &>,
boost::detail::operator_brackets_proxy<boost::filesystem3::path::iterator>, const
boost::filesystem3::path>' requested here
typedef typename mpl::if_<
^
/opt/boost-trunk/include/boost/iterator/iterator_facade.hpp:651:16: note: in instantiation of
template class
'boost::detail::operator_brackets_result<boost::filesystem3::path::iterator, const
boost::filesystem3::path, const boost::filesystem3::path &>' requested here
typename boost::detail::operator_brackets_result<Derived,Value,reference>::type
^
/opt/boost-trunk/include/boost/filesystem/v3/path.hpp:480:14: note: in instantiation of
template class 'boost::iterator_facade<boost::filesystem3::path::iterator, const
boost::filesystem3::path, boost::bidirectional_traversal_tag, const
boost::filesystem3::path &, long>' requested here
: public boost::iterator_facade<
^
In file included from test.cpp:1:
In file included from /opt/boost-trunk/include/boost/filesystem/operations.hpp:31:
In file included from /opt/boost-trunk/include/boost/filesystem/v3/operations.hpp:25:
In file included from /opt/boost-trunk/include/boost/filesystem/v3/path.hpp:28:
In file included from /opt/boost-trunk/include/boost/iterator/iterator_facade.hpp:26:
/opt/boost-trunk/include/boost/type_traits/is_pod.hpp:134:1: error: non-type template argument
of type 'const bool' is not an integral constant expression
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::boost::detail::is_pod_impl<T>::value)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from test.cpp:1:
In file included from /opt/boost-trunk/include/boost/filesystem/operations.hpp:31:
In file included from /opt/boost-trunk/include/boost/filesystem/v3/operations.hpp:25:
In file included from /opt/boost-trunk/include/boost/filesystem/v3/path.hpp:28:
In file included from /opt/boost-trunk/include/boost/iterator/iterator_facade.hpp:26:
In file included from /opt/boost-trunk/include/boost/type_traits/is_pod.hpp:21:
/opt/boost-trunk/include/boost/type_traits/detail/bool_trait_def.hpp:69:5: note: instantiated from:
BOOST_TT_AUX_BOOL_C_BASE(C) \
^
In file included from test.cpp:1:
In file included from /opt/boost-trunk/include/boost/filesystem/operations.hpp:31:
In file included from /opt/boost-trunk/include/boost/filesystem/v3/operations.hpp:25:
In file included from /opt/boost-trunk/include/boost/filesystem/v3/path.hpp:28:
In file included from /opt/boost-trunk/include/boost/iterator/iterator_facade.hpp:26:
/opt/boost-trunk/include/boost/type_traits/is_pod.hpp:134:1: note: instantiated from:
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::boost::detail::is_pod_impl<T>::value)
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/boost-trunk/include/boost/type_traits/is_pod.hpp:134:39: note: instantiated from:
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::boost::detail::is_pod_impl<T>::value)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/boost-trunk/include/boost/mpl/aux_/nested_type_wknd.hpp:27:7: note: in instantiation of
template class 'boost::is_POD<boost::filesystem3::directory_entry>' requested here
: T::type
^
/opt/boost-trunk/include/boost/mpl/aux_/preprocessed/gcc/and.hpp:51:11: note: in instantiation
of template class
'boost::mpl::aux::nested_type_wknd<boost::is_POD<boost::filesystem3::directory_entry> >'
requested here
BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value
^
/opt/boost-trunk/include/boost/mpl/aux_/nested_type_wknd.hpp:38:5: note: instantiated from:
::boost::mpl::aux::nested_type_wknd<T> \
^
/opt/boost-trunk/include/boost/mpl/aux_/nested_type_wknd.hpp:27:7: note: in instantiation of
template class 'boost::mpl::and_<boost::is_POD<boost::filesystem3::directory_entry>,
boost::detail::iterator_writability_disabled<boost::filesystem3::directory_entry,
boost::filesystem3::directory_entry &>, mpl_::bool_<true>, mpl_::bool_<true>,
mpl_::bool_<true> >' requested here
: T::type
^
/opt/boost-trunk/include/boost/mpl/not.hpp:41:11: note: in instantiation of template class
'boost::mpl::aux::nested_type_wknd<boost::mpl::and_<boost::is_POD<boost::filesystem3::directory_entry>,
boost::detail::iterator_writability_disabled<boost::filesystem3::directory_entry,
boost::filesystem3::directory_entry &>, mpl_::bool_<true>, mpl_::bool_<true>,
mpl_::bool_<true> > >' requested here
BOOST_MPL_AUX_NESTED_TYPE_WKND(T)::value
^
/opt/boost-trunk/include/boost/mpl/aux_/nested_type_wknd.hpp:38:5: note: instantiated from:
::boost::mpl::aux::nested_type_wknd<T> \
^
/opt/boost-trunk/include/boost/iterator/iterator_facade.hpp:375:9: note: in instantiation of
template class
'boost::mpl::not_<boost::mpl::and_<boost::is_POD<boost::filesystem3::directory_entry>,
boost::detail::iterator_writability_disabled<boost::filesystem3::directory_entry,
boost::filesystem3::directory_entry &>, mpl_::bool_<true>, mpl_::bool_<true>,
mpl_::bool_<true> > >' requested here
: mpl::not_<
^
/opt/boost-trunk/include/boost/mpl/if.hpp:63:11: note: in instantiation of template class
'boost::detail::use_operator_brackets_proxy<boost::filesystem3::directory_entry,
boost::filesystem3::directory_entry &>' requested here
BOOST_MPL_AUX_STATIC_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(T1)::value)
^
/opt/boost-trunk/include/boost/mpl/if.hpp:63:43: note: instantiated from:
BOOST_MPL_AUX_STATIC_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(T1)::value)
^
/opt/boost-trunk/include/boost/mpl/if.hpp:63:68: note: instantiated from:
BOOST_MPL_AUX_STATIC_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(T1)::value)
^
/opt/boost-trunk/include/boost/iterator/iterator_facade.hpp:388:26: note: in instantiation of
template class
'boost::mpl::if_<boost::detail::use_operator_brackets_proxy<boost::filesystem3::directory_entry,
boost::filesystem3::directory_entry &>,
boost::detail::operator_brackets_proxy<boost::filesystem3::directory_iterator>,
boost::filesystem3::directory_entry>' requested here
typedef typename mpl::if_<
^
/opt/boost-trunk/include/boost/iterator/iterator_facade.hpp:651:16: note: in instantiation of
template class
'boost::detail::operator_brackets_result<boost::filesystem3::directory_iterator,
boost::filesystem3::directory_entry, boost::filesystem3::directory_entry &>' requested
here
typename boost::detail::operator_brackets_result<Derived,Value,reference>::type
^
/opt/boost-trunk/include/boost/filesystem/v3/operations.hpp:582:14: note: in instantiation of
template class 'boost::iterator_facade<boost::filesystem3::directory_iterator,
boost::filesystem3::directory_entry, boost::single_pass_traversal_tag,
boost::filesystem3::directory_entry &, long>' requested here
: public boost::iterator_facade< directory_iterator,
^
In file included from test.cpp:1:
In file included from /opt/boost-trunk/include/boost/filesystem/operations.hpp:31:
In file included from /opt/boost-trunk/include/boost/filesystem/v3/operations.hpp:25:
In file included from /opt/boost-trunk/include/boost/filesystem/v3/path.hpp:25:
In file included from /opt/boost-trunk/include/boost/filesystem/v3/path_traits.hpp:22:
In file included from /opt/boost-trunk/include/boost/type_traits/decay.hpp:18:
In file included from /opt/boost-trunk/include/boost/mpl/eval_if.hpp:17:
/opt/boost-trunk/include/boost/mpl/if.hpp:63:11: error: no member named 'value' in
'boost::detail::use_operator_brackets_proxy<boost::filesystem3::directory_entry,
boost::filesystem3::directory_entry &>'
BOOST_MPL_AUX_STATIC_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(T1)::value)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/boost-trunk/include/boost/mpl/if.hpp:63:73: note: instantiated from:
BOOST_MPL_AUX_STATIC_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(T1)::value)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/opt/boost-trunk/include/boost/iterator/iterator_facade.hpp:388:26: note: in instantiation of
template class
'boost::mpl::if_<boost::detail::use_operator_brackets_proxy<boost::filesystem3::directory_entry,
boost::filesystem3::directory_entry &>,
boost::detail::operator_brackets_proxy<boost::filesystem3::recursive_directory_iterator>,
boost::filesystem3::directory_entry>' requested here
typedef typename mpl::if_<
^
/opt/boost-trunk/include/boost/iterator/iterator_facade.hpp:651:16: note: in instantiation of
template class
'boost::detail::operator_brackets_result<boost::filesystem3::recursive_directory_iterator,
boost::filesystem3::directory_entry, boost::filesystem3::directory_entry &>' requested
here
typename boost::detail::operator_brackets_result<Derived,Value,reference>::type
^
/opt/boost-trunk/include/boost/filesystem/v3/operations.hpp:728:14: note: in instantiation of
template class 'boost::iterator_facade<boost::filesystem3::recursive_directory_iterator,
boost::filesystem3::directory_entry, boost::single_pass_traversal_tag,
boost::filesystem3::directory_entry &, long>' requested here
: public boost::iterator_facade<
^
7 errors generated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment