Ticket #9049: phx-function-constexpr.patch

File phx-function-constexpr.patch, 791 bytes (added by Eric Niebler, 9 years ago)

constexpr for phoenix::function

  • boost/phoenix/function/function.hpp

     
    88#ifndef BOOST_PHOENIX_FUNCTION_FUNCTION_HPP
    99#define BOOST_PHOENIX_FUNCTION_FUNCTION_HPP
    1010
     11#include <boost/config.hpp>
    1112//#include <boost/phoenix/function/function_handling.hpp>
    1213#include <boost/phoenix/core/detail/function_eval.hpp>
    1314#include <boost/preprocessor/facilities/expand.hpp>
     
    3233    template<typename F>
    3334    struct function
    3435    {
    35         function() {}
     36        BOOST_CONSTEXPR function()
     37          : f()
     38        {}
    3639
    37         function(F f)
     40        BOOST_CONSTEXPR function(F f)
    3841          : f(f)
    3942        {}
    4043