Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build example error #29

Closed
crudine9 opened this issue May 19, 2019 · 2 comments
Closed

Build example error #29

crudine9 opened this issue May 19, 2019 · 2 comments

Comments

@crudine9
Copy link

crudine9 commented May 19, 2019

Hi,

with the flag -DEXPECTED_LITE_OPT_BUILD_EXAMPLES=ON the build (gcc-7) produces following error

`expected-lite/include/nonstd/expected.hpp: In instantiation of ‘class nonstd::expected_lite::expected<required, char>’:

expected-lite/example/02-required.cpp:45:30: required from here
expected-lite/include/nonstd/expected.hpp:1103:22: error: no type named ‘type’ in ‘struct std::enable_if<false, void*>’
nsel_constexpr14 expected( expected const & other
^~~~~~~~
expected-lite/include/nonstd/expected.hpp:1214:22: error: no type named ‘type’ in ‘struct std::enable_if<false, void*>’
nsel_constexpr14 expected( value_type const & value
^~~~~~~~
expected-lite/include/nonstd/expected.hpp:1378:5: error: no type named ‘type’ in ‘struct std::enable_if<false, nonstd::expected_lite::expected<required, char>&>’
operator=( expected const & other )
^~~~~~~~
expected-lite/include/nonstd/expected.hpp:1391:5: error: no type named ‘type’ in ‘struct std::enable_if<false, nonstd::expected_lite::expected<required, char>&>’
operator=( expected && other ) noexcept
^~~~~~~~
expected-lite/include/nonstd/expected.hpp:1469:5: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
swap( expected & other ) noexcept
^~~~
`
Trying to use it in project produces also the same error. I don't understand what could be the problem.

@martinmoene
Copy link
Owner

Thanks @crudine9 , example/02-required.cpp no longer compiles after changes to the implementation of expected.hpp to make it follow the proposal more strictly. I'll have to reconsider this example.

@martinmoene
Copy link
Owner

Think this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants