kokkos / mdspan

Reference implementation of mdspan targeting C++23
Other
415 stars 69 forks source link

does not build on osx #9

Closed maddanio closed 5 years ago

maddanio commented 5 years ago

os: 10.14.6 clang: Apple LLVM version 10.0.1 (clang-1001.0.46.4)

MacBook-Pro-3:build daniel$ VERBOSE=1 make
/usr/local/Cellar/cmake/3.14.5/bin/cmake -S/Users/daniel/Documents/git/yagol/submodules/mdspan -B/Users/daniel/Documents/git/yagol/submodules/mdspan/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/Cellar/cmake/3.14.5/bin/cmake -E cmake_progress_start /Users/daniel/Documents/git/yagol/submodules/mdspan/build/CMakeFiles /Users/daniel/Documents/git/yagol/submodules/mdspan/build/CMakeFiles/progress.marks
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f examples/dot_product/CMakeFiles/dot_product.dir/build.make examples/dot_product/CMakeFiles/dot_product.dir/depend
cd /Users/daniel/Documents/git/yagol/submodules/mdspan/build && /usr/local/Cellar/cmake/3.14.5/bin/cmake -E cmake_depends "Unix Makefiles" /Users/daniel/Documents/git/yagol/submodules/mdspan /Users/daniel/Documents/git/yagol/submodules/mdspan/examples/dot_product /Users/daniel/Documents/git/yagol/submodules/mdspan/build /Users/daniel/Documents/git/yagol/submodules/mdspan/build/examples/dot_product /Users/daniel/Documents/git/yagol/submodules/mdspan/build/examples/dot_product/CMakeFiles/dot_product.dir/DependInfo.cmake --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f examples/dot_product/CMakeFiles/dot_product.dir/build.make examples/dot_product/CMakeFiles/dot_product.dir/build
[ 25%] Building CXX object examples/dot_product/CMakeFiles/dot_product.dir/dot_product.cpp.o
cd /Users/daniel/Documents/git/yagol/submodules/mdspan/build/examples/dot_product && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang   -I/Users/daniel/Documents/git/yagol/submodules/mdspan/include  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk   -std=gnu++1z -o CMakeFiles/dot_product.dir/dot_product.cpp.o -c /Users/daniel/Documents/git/yagol/submodules/mdspan/examples/dot_product/dot_product.cpp
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/examples/dot_product/dot_product.cpp:44:
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/mdspan:48:
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/array_workaround.hpp:89:27: error: reference to 'integer_sequence' is ambiguous
struct __array_impl<T, N, integer_sequence<size_t, Idxs...>>
                          ^
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/trait_backports.hpp:89:8: note: candidate found by name lookup is 'std::integer_sequence'
struct integer_sequence {
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/utility:861:29: note: candidate found by name lookup is 'std::__1::integer_sequence'
struct _LIBCPP_TEMPLATE_VIS integer_sequence
                            ^
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/examples/dot_product/dot_product.cpp:44:
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/mdspan:48:
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/array_workaround.hpp:89:43: error: expected '>'
struct __array_impl<T, N, integer_sequence<size_t, Idxs...>>
                                          ^
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/array_workaround.hpp:89:56: error: expected ';' at end of declaration
struct __array_impl<T, N, integer_sequence<size_t, Idxs...>>
                                                       ^
                                                       ;
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/array_workaround.hpp:89:59: error: expected unqualified-id
struct __array_impl<T, N, integer_sequence<size_t, Idxs...>>
                                                          ^
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/array_workaround.hpp:160:37: error: reference to 'make_index_sequence' is ambiguous
struct __array : __array_impl<T, N, make_index_sequence<N>>
                                    ^
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/trait_backports.hpp:120:1: note: candidate found by name lookup is 'std::make_index_sequence'
using make_index_sequence = typename __detail::__make_int_seq_impl<size_t, N, 0, integer_sequence<size_t>>::type;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/utility:906:5: note: candidate found by name lookup is 'std::__1::make_index_sequence'
    using make_index_sequence = make_integer_sequence<size_t, _Np>;
    ^
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/examples/dot_product/dot_product.cpp:44:
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/mdspan:48:
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/array_workaround.hpp:160:56: error: expected '>'
struct __array : __array_impl<T, N, make_index_sequence<N>>
                                                       ^
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/array_workaround.hpp:160:56: error: expected class name
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/array_workaround.hpp:162:37: error: reference to 'make_index_sequence' is ambiguous
  using base_t = __array_impl<T, N, make_index_sequence<N>>;
                                    ^
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/trait_backports.hpp:120:1: note: candidate found by name lookup is 'std::make_index_sequence'
using make_index_sequence = typename __detail::__make_int_seq_impl<size_t, N, 0, integer_sequence<size_t>>::type;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/utility:906:5: note: candidate found by name lookup is 'std::__1::make_index_sequence'
    using make_index_sequence = make_integer_sequence<size_t, _Np>;
    ^
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/examples/dot_product/dot_product.cpp:44:
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/mdspan:48:
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/array_workaround.hpp:162:56: error: expected '>'
  using base_t = __array_impl<T, N, make_index_sequence<N>>;
                                                       ^
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/array_workaround.hpp:162:56: error: expected ';' after alias declaration
  using base_t = __array_impl<T, N, make_index_sequence<N>>;
                                                       ^
                                                       ;
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/array_workaround.hpp:163:9: error: use of undeclared identifier 'base_t'
  using base_t::base_t;
        ^
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/examples/dot_product/dot_product.cpp:44:
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/mdspan:49:
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/basic_mdspan.hpp:48:
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/layout_right.hpp:47:
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/fixed_layout_impl.hpp:46:
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/mixed_size_storage.hpp:60:40: error: no template named 'make_index_sequence'; did you mean '__make_integer_sequence'?
template <class SizesSeq, class, class=make_index_sequence<SizesSeq::size()>>
                                       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/utility:879:1: note: '__make_integer_sequence' declared here
using __make_integer_sequence = __make_integer_seq<integer_sequence, _Tp, _Ep>;
^
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/examples/dot_product/dot_product.cpp:44:
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/mdspan:49:
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/basic_mdspan.hpp:48:
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/layout_right.hpp:47:
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/fixed_layout_impl.hpp:46:
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/mixed_size_storage.hpp:69:3: error: reference to 'integer_sequence' is ambiguous
  integer_sequence<ptrdiff_t, Sizes...>,
  ^
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/trait_backports.hpp:89:8: note: candidate found by name lookup is 'std::integer_sequence'
struct integer_sequence {
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/utility:861:29: note: candidate found by name lookup is 'std::__1::integer_sequence'
struct _LIBCPP_TEMPLATE_VIS integer_sequence
                            ^
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/examples/dot_product/dot_product.cpp:44:
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/mdspan:49:
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/basic_mdspan.hpp:48:
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/layout_right.hpp:47:
In file included from /Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/fixed_layout_impl.hpp:46:
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/mixed_size_storage.hpp:69:19: error: expected '>'
  integer_sequence<ptrdiff_t, Sizes...>,
                  ^
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/mixed_size_storage.hpp:64:16: error: template parameter pack must be the last template parameter
  ptrdiff_t... Sizes,
               ^
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/mixed_size_storage.hpp:65:16: error: template parameter pack must be the last template parameter
  ptrdiff_t... DynamicOffsets,
               ^
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/mixed_size_storage.hpp:69:36: error: expected ';' at end of declaration
  integer_sequence<ptrdiff_t, Sizes...>,
                                   ^
                                   ;
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/mixed_size_storage.hpp:69:39: error: expected unqualified-id
  integer_sequence<ptrdiff_t, Sizes...>,
                                      ^
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/mixed_size_storage.hpp:200:35: error: reference to 'integer_sequence' is ambiguous
struct _make_mixed_impl_helper<N, integer_sequence<size_t, Idxs...>, integer_sequence<ptrdiff_t, Sizes...>> {
                                  ^
/Users/daniel/Documents/git/yagol/submodules/mdspan/include/experimental/__p0009_bits/trait_backports.hpp:89:8: note: candidate found by name lookup is 'std::integer_sequence'
struct integer_sequence {
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/utility:861:29: note: candidate found by name lookup is 'std::__1::integer_sequence'
struct _LIBCPP_TEMPLATE_VIS integer_sequence
                            ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [examples/dot_product/CMakeFiles/dot_product.dir/dot_product.cpp.o] Error 1
make[1]: *** [examples/dot_product/CMakeFiles/dot_product.dir/all] Error 2
make: *** [all] Error 2
maddanio commented 5 years ago

cmake command: cmake .. -DMDSPAN_ENABLE_EXAMPLES=YES

dhollman commented 5 years ago

Try with -DMDSPAN_CXX_STANDARD=14 or -DMDSPAN_CXX_STANDARD=17. Basically, apple-clang is reporting that it only supports C++11, and then providing integer_sequence (which is a C++14 feature) anyway. I'll have to put in a workaround.

maddanio commented 5 years ago

still does not work. this is the compiler command and output when using -DMDSPAN_CXX_STANDARD=17 -DMDSPAN_ENABLE_EXAMPLES=YES:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++   -I../include -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.14   -std=gnu++1z -MD -MT examples/subspan/CMakeFiles/subspan.dir/subspan.cpp.o -MF examples/subspan/CMakeFiles/subspan.dir/subspan.cpp.o.d -o examples/subspan/CMakeFiles/subspan.dir/subspan.cpp.o -c ../examples/subspan/subspan.cpp
In file included from ../examples/subspan/subspan.cpp:45:
In file included from ../include/experimental/mdspan:48:
In file included from ../include/experimental/__p0009_bits/array_workaround.hpp:48:
../include/experimental/__p0009_bits/trait_backports.hpp:95:29: error: no template named 'integer_sequence' in namespace 'std'; did you mean '__integer_sequence'?
using index_sequence = std::integer_sequence<std::size_t, Vals...>;
                       ~~~~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__tuple:93:8: note: '__integer_sequence' declared here
struct __integer_sequence {
       ^
In file included from ../examples/subspan/subspan.cpp:45:
In file included from ../include/experimental/mdspan:48:
In file included from ../include/experimental/__p0009_bits/array_workaround.hpp:48:
../include/experimental/__p0009_bits/trait_backports.hpp:103:37: error: reference to 'integer_sequence' is ambiguous
struct __make_int_seq_impl<T, N, N, integer_sequence<T, Vals...>>
                                    ^
../include/experimental/__p0009_bits/trait_backports.hpp:89:8: note: candidate found by name lookup is 'std::integer_sequence'
struct integer_sequence {
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:868:29: note: candidate found by name lookup is 'std::__1::integer_sequence'
struct _LIBCPP_TEMPLATE_VIS integer_sequence
                            ^
In file included from ../examples/subspan/subspan.cpp:45:
In file included from ../include/experimental/mdspan:48:
In file included from ../include/experimental/__p0009_bits/array_workaround.hpp:48:
../include/experimental/__p0009_bits/trait_backports.hpp:103:53: error: expected '>'
struct __make_int_seq_impl<T, N, N, integer_sequence<T, Vals...>>
                                                    ^
../include/experimental/__p0009_bits/trait_backports.hpp:103:61: error: expected ';' at end of declaration
struct __make_int_seq_impl<T, N, N, integer_sequence<T, Vals...>>
                                                            ^
                                                            ;
../include/experimental/__p0009_bits/trait_backports.hpp:103:64: error: expected unqualified-id
struct __make_int_seq_impl<T, N, N, integer_sequence<T, Vals...>>
                                                               ^
../include/experimental/__p0009_bits/trait_backports.hpp:110:12: error: reference to 'integer_sequence' is ambiguous
  T, N, I, integer_sequence<T, Vals...>
           ^
../include/experimental/__p0009_bits/trait_backports.hpp:89:8: note: candidate found by name lookup is 'std::integer_sequence'
struct integer_sequence {
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:868:29: note: candidate found by name lookup is 'std::__1::integer_sequence'
struct _LIBCPP_TEMPLATE_VIS integer_sequence
                            ^
In file included from ../examples/subspan/subspan.cpp:45:
In file included from ../include/experimental/mdspan:48:
In file included from ../include/experimental/__p0009_bits/array_workaround.hpp:48:
../include/experimental/__p0009_bits/trait_backports.hpp:110:28: error: expected '>'
  T, N, I, integer_sequence<T, Vals...>
                           ^
../include/experimental/__p0009_bits/trait_backports.hpp:110:36: error: expected ';' at end of declaration
  T, N, I, integer_sequence<T, Vals...>
                                   ^
                                   ;
../include/experimental/__p0009_bits/trait_backports.hpp:110:39: error: expected unqualified-id
  T, N, I, integer_sequence<T, Vals...>
                                      ^
../include/experimental/__p0009_bits/trait_backports.hpp:117:79: error: reference to 'integer_sequence' is ambiguous
using make_integer_sequence = typename __detail::__make_int_seq_impl<T, N, 0, integer_sequence<T>>::type;
                                                                              ^
../include/experimental/__p0009_bits/trait_backports.hpp:89:8: note: candidate found by name lookup is 'std::integer_sequence'
struct integer_sequence {
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:868:29: note: candidate found by name lookup is 'std::__1::integer_sequence'
struct _LIBCPP_TEMPLATE_VIS integer_sequence
                            ^
In file included from ../examples/subspan/subspan.cpp:45:
In file included from ../include/experimental/mdspan:48:
In file included from ../include/experimental/__p0009_bits/array_workaround.hpp:48:
../include/experimental/__p0009_bits/trait_backports.hpp:117:95: error: expected '>'
using make_integer_sequence = typename __detail::__make_int_seq_impl<T, N, 0, integer_sequence<T>>::type;
                                                                                              ^
../include/experimental/__p0009_bits/trait_backports.hpp:117:95: error: expected ';' after alias declaration
using make_integer_sequence = typename __detail::__make_int_seq_impl<T, N, 0, integer_sequence<T>>::type;
                                                                                              ^
                                                                                              ;
../include/experimental/__p0009_bits/trait_backports.hpp:120:82: error: reference to 'integer_sequence' is ambiguous
using make_index_sequence = typename __detail::__make_int_seq_impl<size_t, N, 0, integer_sequence<size_t>>::type;
                                                                                 ^
../include/experimental/__p0009_bits/trait_backports.hpp:89:8: note: candidate found by name lookup is 'std::integer_sequence'
struct integer_sequence {
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:868:29: note: candidate found by name lookup is 'std::__1::integer_sequence'
struct _LIBCPP_TEMPLATE_VIS integer_sequence
                            ^
In file included from ../examples/subspan/subspan.cpp:45:
In file included from ../include/experimental/mdspan:48:
In file included from ../include/experimental/__p0009_bits/array_workaround.hpp:48:
../include/experimental/__p0009_bits/trait_backports.hpp:120:98: error: expected '>'
using make_index_sequence = typename __detail::__make_int_seq_impl<size_t, N, 0, integer_sequence<size_t>>::type;
                                                                                                 ^
../include/experimental/__p0009_bits/trait_backports.hpp:120:98: error: expected ';' after alias declaration
using make_index_sequence = typename __detail::__make_int_seq_impl<size_t, N, 0, integer_sequence<size_t>>::type;
                                                                                                 ^
                                                                                                 ;
In file included from ../examples/subspan/subspan.cpp:45:
In file included from ../include/experimental/mdspan:48:
../include/experimental/__p0009_bits/array_workaround.hpp:89:27: error: reference to 'integer_sequence' is ambiguous
struct __array_impl<T, N, integer_sequence<size_t, Idxs...>>
                          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:868:29: note: candidate found by name lookup is 'std::__1::integer_sequence'
struct _LIBCPP_TEMPLATE_VIS integer_sequence
                            ^
../include/experimental/__p0009_bits/trait_backports.hpp:89:8: note: candidate found by name lookup is 'std::integer_sequence'
struct integer_sequence {
       ^
In file included from ../examples/subspan/subspan.cpp:45:
In file included from ../include/experimental/mdspan:48:
../include/experimental/__p0009_bits/array_workaround.hpp:89:43: error: expected '>'
struct __array_impl<T, N, integer_sequence<size_t, Idxs...>>
                                          ^
../include/experimental/__p0009_bits/array_workaround.hpp:89:56: error: expected ';' at end of declaration
struct __array_impl<T, N, integer_sequence<size_t, Idxs...>>
                                                       ^
                                                       ;
../include/experimental/__p0009_bits/array_workaround.hpp:89:59: error: expected unqualified-id
struct __array_impl<T, N, integer_sequence<size_t, Idxs...>>
                                                          ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
dhollman commented 5 years ago

Try the recent change I just pushed. I can't reproduce this issue; I do all of my development on a Mac and have not run in to this problem, so I'm kind of taking a shot in the dark.

maddanio commented 5 years ago

hmm, unfortunately no. the important part in the error I think is:

In file included from ../include/experimental/__p0009_bits/array_workaround.hpp:48:
../include/experimental/__p0009_bits/trait_backports.hpp:104:37: error: reference to 'integer_sequence' is ambiguous
struct __make_int_seq_impl<T, N, N, integer_sequence<T, Vals...>>
                                    ^
../include/experimental/__p0009_bits/trait_backports.hpp:90:8: note: candidate found by name lookup is 'std::integer_sequence'
struct integer_sequence {
       ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:868:29: note: candidate found by name lookup is 'std::__1::integer_sequence'
struct _LIBCPP_TEMPLATE_VIS integer_sequence

if I hard define _MDSPAN_USE_INTEGER_SEQUENCE 1 then something similar happens with enable_if_t, so it seems the feature detection in config.hpp doesnt work very well on osx

maddanio commented 5 years ago

ok, I got examples to build by hand defining _MDSPAN_USE_INTEGER_SEQUENCE 1 and _MDSPAN_USE_STANDARD_TRAIT_ALIASES 1

dalg24 commented 5 years ago

@maddanio I was able to reproduce the error with AppleClang.

Would you please confirm it builds without any modification if you configure with -D MDSPAN_CXX_STANDARD=11?

maddanio commented 5 years ago

I can confirm that. But isnt that somewhat suboptimal?

dalg24 commented 5 years ago

I can confirm that. But isnt that somewhat suboptimal?

We will fix it. Just making sure.

dhollman commented 5 years ago

We just need to fiddle with the macros in config.hpp, and possibly special-case Apple clang. Even though it’s nice for zero-conf use cases, the problem with using feature macros instead of build-system feature compilation tests is that sometimes compilers lie about what they support.

Sent with GitHawk

dhollman commented 5 years ago

@maddanio This should be working now with C++11, C++14, and C++17 modes.

maddanio commented 5 years ago

works great!

VladimirBessonov commented 3 years ago

can somebody explain for the beginner what is the fix? I cannot find any config option with SPAN_

below config I get from CMAKE.

C/C++: Built as dynamic libs?: YES C++ standard: 11 C++ Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ (ver 12.0.5.12050022) C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG C Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -fdiagnostics-show-option -Wno-long-long -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG Linker flags (Release): -Wl,-dead_strip
Linker flags (Debug): -Wl,-dead_strip
ccache: NO Precompiled headers: NO Extra dependencies: 3rdparty dependencies:

VladimirBessonov commented 3 years ago

I also tried -std=c++14 It doesn't help