Skip to content

Build Error on OS X 10.11.6: candidate function has been explicitly made unavailable constexpr value_type const& value() const #25

@dbl001

Description

@dbl001

I have a 'make' build error:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
David-Laxers-MacBook-Pro:build davidlaxer$ cmake --version
cmake version 3.9.1
$ make
Scanning dependencies of target deepcoder
[  3%] Building CXX object lib/CMakeFiles/deepcoder.dir/attribute.cc.o
/Users/davidlaxer/deep-coder/lib/attribute.cc:48:58: error: call to unavailable
      member function 'value':
                this->predicate_presence[arg.predicate().value()] = 1;
                                         ~~~~~~~~~~~~~~~~^~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/experimental/optional:525:17: note: 
      candidate function has been explicitly made unavailable
    value_type& value()
                ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/experimental/optional:517:33: note: 
      candidate function has been explicitly made unavailable
    constexpr value_type const& value() const
                                ^
/Users/davidlaxer/deep-coder/lib/attribute.cc:50:78: error: call to unavailable
      member function 'value':
  ...this->one_argument_lambda_presence[arg.one_argument_lambda().value()] = 1;
                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/experimental/optional:525:17: note: 
      candidate function has been explicitly made unavailable
    value_type& value()
                ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/experimental/optional:517:33: note: 
      candidate function has been explicitly made unavailable
    constexpr value_type const& value() const
                                ^
/Users/davidlaxer/deep-coder/lib/attribute.cc:52:80: error: call to unavailable
      member function 'value':
  ...this->two_arguments_lambda_presence[arg.two_arguments_lambda().value()] ...
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/experimental/optional:525:17: note: 
      candidate function has been explicitly made unavailable
    value_type& value()
                ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/experimental/optional:517:33: note: 
      candidate function has been explicitly made unavailable
    constexpr value_type const& value() const
                                ^
3 errors generated.
make[2]: *** [lib/CMakeFiles/deepcoder.dir/attribute.cc.o] Error 1
make[1]: *** [lib/CMakeFiles/deepcoder.dir/all] Error 2
make: *** [all] Error 2

Is this issue related?

https://stackoverflow.com/questions/44217316/how-do-i-use-stdoptional-in-c

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions