Skip to content

Compilation error with AppleClang 17.0 + MacOSX SDK 15.4 #1684

@mxp1983

Description

@mxp1983

After the upgrade to MacOSX SDK 15.4 + Clang 17.0, the following compilation error can be observed:

`.../thirdparty/sol2/include/sol/optional_implementation.hpp:2194:10: error: no member named 'construct' in 'optional<type-parameter-0-0 &>'
 2194 |                         this->construct(std::forward<Args>(args)...);
      |                         ~~~~  ^

The function:

		template <class... Args>
		T& emplace(Args&&... args) noexcept {
			static_assert(std::is_constructible<T, Args&&...>::value, "T must be constructible with Args");

			*this = nullopt;
			this->construct(std::forward<Args>(args)...);
		}

Specialization of:

	template <class T>
	class optional<T&> {

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