implement error_or copy and move operations efficiently and exception-safe